native: add color function
This commit is contained in:
parent
937921eb0f
commit
e777e948e2
1 changed files with 8 additions and 4 deletions
|
@ -7,11 +7,15 @@ Window {
|
||||||
SystemPalette { id: inactiveColors; colorGroup: SystemPalette.Inactive }
|
SystemPalette { id: inactiveColors; colorGroup: SystemPalette.Inactive }
|
||||||
SystemPalette { id: disabledColors; colorGroup: SystemPalette.Disabled }
|
SystemPalette { id: disabledColors; colorGroup: SystemPalette.Disabled }
|
||||||
|
|
||||||
|
function getColors() {
|
||||||
|
return root.active ? activeColors : inactiveColors;
|
||||||
|
}
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
width: 640
|
width: 640
|
||||||
height: 480
|
height: 480
|
||||||
visible: true
|
visible: true
|
||||||
color: active ? activeColors.window : inactiveColors.window
|
color: getColors().window
|
||||||
|
|
||||||
title: qsTr("Alisa - License Managment")
|
title: qsTr("Alisa - License Managment")
|
||||||
|
|
||||||
|
@ -20,11 +24,11 @@ Window {
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.rightali
|
right: parent.right
|
||||||
}
|
}
|
||||||
height: 50
|
height: 50
|
||||||
border.width: 5
|
border.width: 5
|
||||||
border.color: root.active ? activeColors.accent : inactiveColors.accent
|
border.color: getColors().accent
|
||||||
color: root.active ? activeColors.midlight : inactiveColors.midlight
|
color: getColors().midlight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue