mirror of
https://github.com/kbumsik/VirtScreen.git
synced 2025-03-09 15:40:18 +00:00
QML: added theme color preference
This commit is contained in:
parent
a0f29de12c
commit
db125fe7c5
4 changed files with 93 additions and 2 deletions
|
|
@ -12,9 +12,10 @@ ApplicationWindow {
|
|||
flags: Qt.FramelessWindowHint
|
||||
title: "Basic layouts"
|
||||
|
||||
property int theme_color: settings.theme_color
|
||||
Material.theme: Material.Light
|
||||
Material.primary: Material.Teal
|
||||
Material.accent: Material.Teal
|
||||
Material.primary: theme_color
|
||||
Material.accent: theme_color
|
||||
// Material.background: Material.Grey
|
||||
|
||||
width: 380
|
||||
|
|
@ -53,6 +54,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
id: vncStateLabel
|
||||
color: "white"
|
||||
text: vncStateText.text
|
||||
}
|
||||
|
||||
|
|
@ -60,12 +62,28 @@ ApplicationWindow {
|
|||
id: menuButton
|
||||
anchors.right: parent.right
|
||||
text: qsTr("⋮")
|
||||
contentItem: Text {
|
||||
text: parent.text
|
||||
font: parent.font
|
||||
color: "white"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
onClicked: menu.open()
|
||||
|
||||
Menu {
|
||||
id: menu
|
||||
y: toolbar.height
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("&Preference")
|
||||
onTriggered: {
|
||||
preferenceLoader.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("&About")
|
||||
onTriggered: {
|
||||
|
|
@ -202,6 +220,17 @@ ApplicationWindow {
|
|||
}
|
||||
onRejected: passwordFIeld.text = ""
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: preferenceLoader
|
||||
active: false
|
||||
source: "preferenceDialog.qml"
|
||||
onLoaded: {
|
||||
item.onClosed.connect(function() {
|
||||
preferenceLoader.active = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
SwipeView {
|
||||
anchors.top: tabBar.bottom
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue