Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WelcomePage: add vertical ScrollView around content #1728

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 74 additions & 69 deletions resources/qml/pages/WelcomePage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,93 +10,98 @@ import im.nheko 1.0
import "../components/"
import ".."

ColumnLayout {
Item {
Layout.fillHeight: true
}

Image {
Layout.alignment: Qt.AlignHCenter
source: "qrc:/logos/splash.png"
Layout.preferredHeight: 256
Layout.preferredWidth: 256
}
ScrollView {
contentWidth: availableWidth
ColumnLayout {
width: parent.width

Label {
Layout.margins: Nheko.paddingLarge
Layout.bottomMargin: 0
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
text: qsTr("Welcome to nheko! The desktop client for the Matrix protocol.")
color: palette.text
font.pointSize: fontMetrics.font.pointSize*2
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
}
Label {
Layout.margins: Nheko.paddingLarge
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
text: qsTr("Enjoy your stay!")
color: palette.text
font.pointSize: fontMetrics.font.pointSize*1.5
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
}

RowLayout {
Item {
Layout.fillWidth: true
Layout.fillHeight: true
}
FlatButton {
Layout.margins: Nheko.paddingLarge

Image {
Layout.alignment: Qt.AlignHCenter
text: qsTr("REGISTER")
onClicked: {
mainWindow.push(registerPage);
}
source: "qrc:/logos/splash.png"
Layout.preferredHeight: 256
Layout.preferredWidth: 256
}
FlatButton {

Label {
Layout.margins: Nheko.paddingLarge
Layout.bottomMargin: 0
Layout.alignment: Qt.AlignHCenter
text: qsTr("LOGIN")
onClicked: {
mainWindow.push(loginPage);
}
Layout.fillWidth: true
text: qsTr("Welcome to nheko! The desktop client for the Matrix protocol.")
color: palette.text
font.pointSize: fontMetrics.font.pointSize * 2
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
}

Item {
Label {
Layout.margins: Nheko.paddingLarge
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
text: qsTr("Enjoy your stay!")
color: palette.text
font.pointSize: fontMetrics.font.pointSize * 1.5
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
}

}
RowLayout {
Item {
Layout.fillWidth: true
}
FlatButton {
Layout.margins: Nheko.paddingLarge
Layout.alignment: Qt.AlignHCenter
text: qsTr("REGISTER")
onClicked: {
mainWindow.push(registerPage);
}
}
FlatButton {
Layout.margins: Nheko.paddingLarge
Layout.alignment: Qt.AlignHCenter
text: qsTr("LOGIN")
onClicked: {
mainWindow.push(loginPage);
}
}

RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.margins: Nheko.paddingLarge
Item {
Layout.fillWidth: true
}

ToggleButton {
Layout.margins: Nheko.paddingLarge
Layout.alignment: Qt.AlignRight
checked: Settings.reducedMotion
onCheckedChanged: Settings.reducedMotion = checked
}

Label {
Layout.alignment: Qt.AlignLeft
RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.margins: Nheko.paddingLarge
text: qsTr("Reduce animations")
color: palette.text

HoverHandler {
id: hovered
ToggleButton {
Layout.margins: Nheko.paddingLarge
Layout.alignment: Qt.AlignRight
checked: Settings.reducedMotion
onCheckedChanged: Settings.reducedMotion = checked
}

Label {
Layout.alignment: Qt.AlignLeft
Layout.margins: Nheko.paddingLarge
text: qsTr("Reduce animations")
color: palette.text

HoverHandler {
id: hovered
}
ToolTip.visible: hovered.hovered
ToolTip.text: qsTr("Nheko uses animations in several places to make stuff pretty. This allows you to turn those off if they make you feel unwell.")
ToolTip.delay: Nheko.tooltipDelay
}
ToolTip.visible: hovered.hovered
ToolTip.text: qsTr("Nheko uses animations in several places to make stuff pretty. This allows you to turn those off if they make you feel unwell.")
ToolTip.delay: Nheko.tooltipDelay
}
}
Item {
Layout.fillHeight: true
Item {
Layout.fillHeight: true
}
}
}