Minor fixes to kiosk mode PR

- UI_FULLSCREEN_WINDOWED -> UI_MAXIMIZED
- Propagate user configuration from old "start windowed" option
- Use FullScreen when a window manager isn't present
- Set disabled control to FullScreen with no window manager
This commit is contained in:
Cameron Gutman
2021-01-10 10:09:31 -06:00
parent 19dac306d1
commit 5372cfba20
4 changed files with 22 additions and 13 deletions

View File

@@ -716,7 +716,7 @@ Flickable {
Label {
width: parent.width
id: uiDisplayModeTitle
text: qsTr("Display Mode")
text: qsTr("GUI display mode")
font.pointSize: 12
wrapMode: Text.Wrap
}
@@ -724,15 +724,22 @@ Flickable {
AutoResizingComboBox {
// ignore setting the index at first, and actually set it when the component is loaded
Component.onCompleted: {
var saved_uidisplaymode = StreamingPreferences.uiDisplayMode
currentIndex = 0
for (var i = 0; i < uiDisplayModeListModel.count; i++) {
var el_uidisplaymode = uiDisplayModeListModel.get(i).val;
if (saved_uidisplaymode === el_uidisplaymode) {
currentIndex = i
break
if (SystemProperties.hasWindowManager) {
var saved_uidisplaymode = StreamingPreferences.uiDisplayMode
currentIndex = 0
for (var i = 0; i < uiDisplayModeListModel.count; i++) {
var el_uidisplaymode = uiDisplayModeListModel.get(i).val;
if (saved_uidisplaymode === el_uidisplaymode) {
currentIndex = i
break
}
}
}
else {
// Full-screen is always selected when there is no window manager
currentIndex = 2
}
activated(currentIndex)
}
@@ -747,7 +754,7 @@ Flickable {
}
ListElement {
text: qsTr("Maximized")
val: StreamingPreferences.UI_FULLSCREEN_WINDOWED
val: StreamingPreferences.UI_MAXIMIZED
}
ListElement {
text: qsTr("Fullscreen")

View File

@@ -20,10 +20,10 @@ ApplicationWindow {
visibility: {
if (SystemProperties.hasWindowManager) {
if (StreamingPreferences.uiDisplayMode == StreamingPreferences.UI_WINDOWED) return "Windowed"
else if (StreamingPreferences.uiDisplayMode == StreamingPreferences.UI_FULLSCREEN_WINDOWED) return "Maximized"
else if (StreamingPreferences.uiDisplayMode == StreamingPreferences.UI_MAXIMIZED) return "Maximized"
else if (StreamingPreferences.uiDisplayMode == StreamingPreferences.UI_FULLSCREEN) return "FullScreen"
} else {
return "Maximized"
return "FullScreen"
}
}