1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

Improve TopBar and login window layout

This provides a bit more spacing around the logo and aligns the text to
the bottom of the logo, rather than to its horizontal center. Looks
cleaner.

Text in the login page is now aligned towards the inputs, giving a
closer connection between label and widget.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Sebastian Kügler 2015-11-07 03:32:37 +01:00 committed by Dirk Hohndel
parent 09b7ebf28b
commit ff82d1cc15
2 changed files with 34 additions and 17 deletions

View file

@ -20,14 +20,15 @@ Item {
anchors.margins: units.gridUnit anchors.margins: units.gridUnit
Label { Label {
text: "Enter your Subsurface cloud credentials" text: "Cloud credentials"
Layout.bottomMargin: units.largeSpacing Layout.bottomMargin: units.largeSpacing
font.pointSize: units.titlePointSize font.pointSize: units.titlePointSize
Layout.columnSpan: 2 Layout.columnSpan: 2
} }
Label { Label {
text: "Email Address:" text: "Email Address"
Layout.alignment: Qt.AlignRight
} }
TextField { TextField {
@ -38,6 +39,7 @@ Item {
Label { Label {
text: "Password" text: "Password"
Layout.alignment: Qt.AlignRight
} }
TextField { TextField {
@ -49,6 +51,7 @@ Item {
Label { Label {
text: "Show password" text: "Show password"
Layout.alignment: Qt.AlignRight
} }
CheckBox { CheckBox {

View file

@ -13,28 +13,42 @@ Rectangle {
property bool goBack: (stackView.depth > 1) property bool goBack: (stackView.depth > 1)
color: theme.accentColor color: theme.accentColor
Layout.minimumHeight: units.gridUnit * 2 + units.smallSpacing * 2 Layout.minimumHeight: units.gridUnit * 2 + units.largeSpacing
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: 0 Layout.margins: 0
RowLayout { RowLayout {
anchors.bottom: topPart.bottom anchors.bottom: topPart.bottom
anchors.bottomMargin: units.smallSpacing anchors.bottomMargin: units.largeSpacing / 2
anchors.left: topPart.left anchors.left: topPart.left
anchors.leftMargin: units.smallSpacing anchors.leftMargin: units.largeSpacing / 2
anchors.right: topPart.right anchors.right: topPart.right
anchors.rightMargin: units.smallSpacing anchors.rightMargin: units.largeSpacing / 2
Item {
Layout.preferredHeight: subsurfaceLogo.height
Image { Image {
id: subsurfaceLogo
source: "qrc:/qml/subsurface-mobile-icon.png" source: "qrc:/qml/subsurface-mobile-icon.png"
Layout.maximumWidth: units.gridUnit * 2 anchors {
Layout.preferredWidth: units.gridUnit * 2 top: parent.top
Layout.preferredHeight: units.gridUnit * 2 left: parent.left
}
width: units.gridUnit * 2
height: width
} }
Text { Text {
text: qsTr("Subsurface") text: qsTr("Subsurface")
font.pointSize: units.fontMetrics.font.pointSize * 2 height: subsurfaceLogo.height
anchors {
left: subsurfaceLogo.right
bottom: subsurfaceLogo.bottom
leftMargin: units.gridUnit / 2
}
font.pointSize: units.fontMetrics.font.pointSize * 1.5
verticalAlignment: Text.AlignBottom
Layout.fillWidth: false Layout.fillWidth: false
color: theme.accentTextColor color: theme.accentTextColor
} }
}
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
} }