mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-11-07 04:52:15 +00:00
wip: basic theming support
This commit is contained in:
@ -10,6 +10,45 @@ ApplicationWindow {
|
||||
width: 800
|
||||
height: 600
|
||||
|
||||
SystemPalette {
|
||||
id: systemPaletteActive
|
||||
colorGroup: SystemPalette.Active
|
||||
}
|
||||
|
||||
SystemPalette {
|
||||
id: systemPaletteDisabled
|
||||
colorGroup: SystemPalette.Disabled
|
||||
}
|
||||
|
||||
palette {
|
||||
accent: systemPaletteActive.accent
|
||||
alternateBase: systemPaletteActive.alternateBase
|
||||
base: systemPaletteActive.base
|
||||
button: systemPaletteActive.button
|
||||
buttonText: systemPaletteActive.buttonText
|
||||
dark: systemPaletteActive.dark
|
||||
highlight: systemPaletteActive.highlight
|
||||
highlightedText: systemPaletteActive.highlightedText
|
||||
light: systemPaletteActive.light
|
||||
mid: systemPaletteActive.mid
|
||||
midlight: systemPaletteActive.midlight
|
||||
placeholderText: systemPaletteActive.placeholderText
|
||||
shadow: systemPaletteActive.shadow
|
||||
text: systemPaletteActive.text
|
||||
window: systemPaletteActive.window
|
||||
windowText: systemPaletteActive.windowText
|
||||
|
||||
disabled {
|
||||
button: systemPaletteDisabled.button
|
||||
buttonText: systemPaletteDisabled.buttonText
|
||||
}
|
||||
|
||||
inactive {
|
||||
button: systemPaletteDisabled.button
|
||||
buttonText: systemPaletteDisabled.buttonText
|
||||
}
|
||||
}
|
||||
|
||||
StackLayout {
|
||||
id: stackLayout
|
||||
anchors.fill: parent
|
||||
|
||||
@ -27,8 +27,7 @@ ColumnLayout {
|
||||
function displayBool(value): string {
|
||||
if (value === undefined)
|
||||
return '-';
|
||||
// TODO: color success & error
|
||||
return value ? `<font color="lightgreen">Yes</font>` : `<font color="lightpink">No</font>`;
|
||||
return value ? `<font color="${appTheme.success}">Yes</font>` : `<font color="${appTheme.error}">No</font>`;
|
||||
}
|
||||
|
||||
component LabelLabel: Label {
|
||||
|
||||
Reference in New Issue
Block a user