1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 04:37:46 +00:00
astra/launcher/ui/Settings/GeneralSettings.qml

74 lines
2.1 KiB
QML
Raw Normal View History

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
2023-12-17 12:47:13 -05:00
pragma ComponentBehavior: Bound
2023-09-17 19:20:41 -04:00
import QtQuick
2023-11-10 17:31:05 -05:00
import QtQuick.Window
2023-09-17 19:20:41 -04:00
import QtQuick.Controls as QQC2
2023-09-20 15:30:50 -04:00
import QtQuick.Layouts
2023-09-17 19:20:41 -04:00
2023-09-20 15:30:50 -04:00
import org.kde.kirigami as Kirigami
2023-09-16 18:15:11 -04:00
import org.kde.kirigamiaddons.formcard as FormCard
import zone.xiv.astra
2023-08-19 10:49:00 -04:00
FormCard.FormCardPage {
2023-12-17 12:47:13 -05:00
id: page
2023-09-20 15:30:50 -04:00
title: i18nc("@title:window", "General")
2023-08-19 10:49:00 -04:00
FormCard.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing * 4
2023-09-20 15:30:50 -04:00
2023-08-19 10:49:00 -04:00
FormCard.FormCheckDelegate {
id: closeAstraDelegate
text: i18n("Hide Astra when game is launched")
checked: LauncherCore.settings.closeWhenLaunched
onCheckedChanged: LauncherCore.settings.closeWhenLaunched = checked
2023-08-19 10:49:00 -04:00
}
FormCard.FormDelegateSeparator {
above: closeAstraDelegate
below: showDevToolsDelegate
}
FormCard.FormCheckDelegate {
id: showDevToolsDelegate
text: i18n("Show Developer Settings")
description: i18n("Enable settings that are useful for developers and tinkerers.")
checked: LauncherCore.settings.showDevTools
onCheckedChanged: LauncherCore.settings.showDevTools = checked
}
2023-10-11 12:58:53 -04:00
FormCard.FormDelegateSeparator {
above: showDevToolsDelegate
below: screenshotsPathDelegate
}
FormFolderDelegate {
id: screenshotsPathDelegate
text: i18n("Screenshots Folder")
folder: LauncherCore.settings.screenshotDir
2023-10-11 12:58:53 -04:00
onAccepted: (folder) => LauncherCore.settings.screenshotDir = folder
2023-10-11 12:58:53 -04:00
}
}
FormCard.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
FormCard.FormButtonDelegate {
text: i18n("Clear Lodestone Avatar Cache")
description: i18n("Refreshes the avatars for all accounts, and requires Astra to restart to take effect.")
icon.name: "delete"
onClicked: LauncherCore.clearAvatarCache()
}
}
}