1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 21:07:45 +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 { RowLayout {
anchors.fill: parent anchors.fill: parent
spacing: Kirigami.Units.largeSpacing spacing: 0
LoginPage { LoginPage {
id: loginPage id: loginPage
@ -43,6 +43,11 @@ Kirigami.Page {
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
Layout.minimumWidth: LauncherCore.settings.showNews ? Kirigami.Units.gridUnit * 26 : 0 Layout.minimumWidth: LauncherCore.settings.showNews ? Kirigami.Units.gridUnit * 26 : 0
Layout.fillWidth: !LauncherCore.settings.showNews Layout.fillWidth: !LauncherCore.settings.showNews
Layout.topMargin: Kirigami.Units.largeSpacing
}
Kirigami.Separator {
Layout.fillHeight: true
} }
Loader { Loader {
@ -56,7 +61,7 @@ Kirigami.Page {
NewsPage { NewsPage {
width: scrollView.availableWidth 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 { QQC2.Control {
id: page id: page
Component.onCompleted: LauncherCore.refreshNews()
property int currentBannerIndex: 0 property int currentBannerIndex: 0
property int numBannerImages: 0 property int numBannerImages: 0
Component.onCompleted: LauncherCore.refreshNews()
Connections { Connections {
target: LauncherCore 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 { contentItem: ColumnLayout {
id: layout id: layout
@ -63,6 +72,7 @@ QQC2.Control {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: aspectRatio * width Layout.preferredHeight: aspectRatio * width
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.topMargin: Kirigami.Units.largeSpacing
source: { source: {
if (LauncherCore.headline === null) { if (LauncherCore.headline === null) {
@ -131,6 +141,8 @@ QQC2.Control {
description: i18n("No news.") description: i18n("No news.")
visible: LauncherCore.headline !== null ? LauncherCore.headline.failedToLoad : false visible: LauncherCore.headline !== null ? LauncherCore.headline.failedToLoad : false
} }
Kirigami.Theme.colorSet: Kirigami.Theme.Window
} }
FormCard.FormHeader { FormCard.FormHeader {
@ -165,6 +177,8 @@ QQC2.Control {
description: i18n("No topics.") description: i18n("No topics.")
visible: LauncherCore.headline !== null ? LauncherCore.headline.failedToLoad : false visible: LauncherCore.headline !== null ? LauncherCore.headline.failedToLoad : false
} }
Kirigami.Theme.colorSet: Kirigami.Theme.Window
} }
Item { Item {