mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
Fix show news setting
This commit is contained in:
parent
ca23ca348f
commit
7176ee528e
2 changed files with 15 additions and 7 deletions
|
@ -109,17 +109,21 @@ Kirigami.ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onShowNewsChanged() {
|
|
||||||
// workaround annoying Qt layout bug
|
|
||||||
// TODO: see if this changed in Qt6
|
|
||||||
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "MainPage"))
|
|
||||||
}
|
|
||||||
|
|
||||||
function onCurrentProfileChanged() {
|
function onCurrentProfileChanged() {
|
||||||
checkSetup();
|
checkSetup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: LauncherCore.settings
|
||||||
|
|
||||||
|
function onShowNewsChanged() {
|
||||||
|
// workaround annoying Qt layout bug
|
||||||
|
// TODO: see if this changed in Qt7
|
||||||
|
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "MainPage"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: checkSetup()
|
Component.onCompleted: checkSetup()
|
||||||
|
|
||||||
property Item hoverLinkIndicator: QQC2.Control {
|
property Item hoverLinkIndicator: QQC2.Control {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Window
|
||||||
import QtQuick.Controls as QQC2
|
import QtQuick.Controls as QQC2
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
@ -71,7 +72,10 @@ FormCard.FormCardPage {
|
||||||
|
|
||||||
text: i18n("Enable and show news")
|
text: i18n("Enable and show news")
|
||||||
checked: LauncherCore.settings.showNews
|
checked: LauncherCore.settings.showNews
|
||||||
onCheckedChanged: LauncherCore.settings.showNews = checked
|
onCheckedChanged: {
|
||||||
|
LauncherCore.settings.showNews = checked;
|
||||||
|
Window.window.close(); // if we don't close the dialog it crashes!
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FormCard.FormDelegateSeparator {
|
FormCard.FormDelegateSeparator {
|
||||||
|
|
Loading…
Add table
Reference in a new issue