mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 19:38:48 +03:00
WelcomePage: add vertical ScrollView around content
This solves the problem of the window being sized smaller than it's content and part of it being out of view.
This commit is contained in:
parent
e7d28b96da
commit
16cce08b43
1 changed files with 81 additions and 76 deletions
|
@ -10,93 +10,98 @@ import im.nheko 1.0
|
||||||
import "../components/"
|
import "../components/"
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
ColumnLayout {
|
ScrollView {
|
||||||
Item {
|
contentWidth: availableWidth
|
||||||
Layout.fillHeight: true
|
ColumnLayout {
|
||||||
}
|
width: parent.width
|
||||||
|
|
||||||
Image {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
source: "qrc:/logos/splash.png"
|
|
||||||
Layout.preferredHeight: 256
|
|
||||||
Layout.preferredWidth: 256
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
Image {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
RowLayout {
|
source: "qrc:/logos/splash.png"
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.preferredHeight: 256
|
||||||
Layout.margins: Nheko.paddingLarge
|
Layout.preferredWidth: 256
|
||||||
|
|
||||||
ToggleButton {
|
|
||||||
Layout.margins: Nheko.paddingLarge
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
checked: Settings.reducedMotion
|
|
||||||
onCheckedChanged: Settings.reducedMotion = checked
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
Layout.margins: Nheko.paddingLarge
|
Layout.margins: Nheko.paddingLarge
|
||||||
text: qsTr("Reduce animations")
|
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
|
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
|
||||||
|
}
|
||||||
|
|
||||||
HoverHandler {
|
RowLayout {
|
||||||
id: hovered
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
ToolTip.visible: hovered.hovered
|
FlatButton {
|
||||||
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.")
|
Layout.margins: Nheko.paddingLarge
|
||||||
ToolTip.delay: Nheko.tooltipDelay
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.margins: Nheko.paddingLarge
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue