1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-24 05:17:46 +00:00

Try to improve colors and margins on the login page

This commit is contained in:
Joshua Goins 2024-03-22 20:41:10 -04:00
parent e7b2802545
commit 6e1cf37ecc
2 changed files with 23 additions and 4 deletions

View file

@ -35,7 +35,7 @@ Kirigami.Page {
RowLayout {
anchors.fill: parent
spacing: Kirigami.Units.largeSpacing
spacing: 0
LoginPage {
id: loginPage
@ -43,6 +43,11 @@ Kirigami.Page {
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
Layout.minimumWidth: LauncherCore.settings.showNews ? Kirigami.Units.gridUnit * 26 : 0
Layout.fillWidth: !LauncherCore.settings.showNews
Layout.topMargin: Kirigami.Units.largeSpacing
}
Kirigami.Separator {
Layout.fillHeight: true
}
Loader {
@ -56,7 +61,7 @@ Kirigami.Page {
NewsPage {
width: scrollView.availableWidth
height: scrollView.availableHeight
height: Math.max(scrollView.availableHeight, page.height, implicitHeight)
}
}
}

View file

@ -16,11 +16,11 @@ import zone.xiv.astra
QQC2.Control {
id: page
Component.onCompleted: LauncherCore.refreshNews()
property int currentBannerIndex: 0
property int numBannerImages: 0
Component.onCompleted: LauncherCore.refreshNews()
Connections {
target: LauncherCore
@ -47,6 +47,15 @@ QQC2.Control {
}
}
background: Rectangle {
anchors.fill: parent
color: Kirigami.Theme.backgroundColor
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.View
}
contentItem: ColumnLayout {
id: layout
@ -63,6 +72,7 @@ QQC2.Control {
Layout.fillWidth: true
Layout.preferredHeight: aspectRatio * width
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.topMargin: Kirigami.Units.largeSpacing
source: {
if (LauncherCore.headline === null) {
@ -131,6 +141,8 @@ QQC2.Control {
description: i18n("No news.")
visible: LauncherCore.headline !== null ? LauncherCore.headline.failedToLoad : false
}
Kirigami.Theme.colorSet: Kirigami.Theme.Window
}
FormCard.FormHeader {
@ -165,6 +177,8 @@ QQC2.Control {
description: i18n("No topics.")
visible: LauncherCore.headline !== null ? LauncherCore.headline.failedToLoad : false
}
Kirigami.Theme.colorSet: Kirigami.Theme.Window
}
Item {