mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
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:
@@ -716,7 +716,7 @@ Flickable {
|
|||||||
Label {
|
Label {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
id: uiDisplayModeTitle
|
id: uiDisplayModeTitle
|
||||||
text: qsTr("Display Mode")
|
text: qsTr("GUI display mode")
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
}
|
}
|
||||||
@@ -724,15 +724,22 @@ Flickable {
|
|||||||
AutoResizingComboBox {
|
AutoResizingComboBox {
|
||||||
// ignore setting the index at first, and actually set it when the component is loaded
|
// ignore setting the index at first, and actually set it when the component is loaded
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var saved_uidisplaymode = StreamingPreferences.uiDisplayMode
|
if (SystemProperties.hasWindowManager) {
|
||||||
currentIndex = 0
|
var saved_uidisplaymode = StreamingPreferences.uiDisplayMode
|
||||||
for (var i = 0; i < uiDisplayModeListModel.count; i++) {
|
currentIndex = 0
|
||||||
var el_uidisplaymode = uiDisplayModeListModel.get(i).val;
|
for (var i = 0; i < uiDisplayModeListModel.count; i++) {
|
||||||
if (saved_uidisplaymode === el_uidisplaymode) {
|
var el_uidisplaymode = uiDisplayModeListModel.get(i).val;
|
||||||
currentIndex = i
|
if (saved_uidisplaymode === el_uidisplaymode) {
|
||||||
break
|
currentIndex = i
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// Full-screen is always selected when there is no window manager
|
||||||
|
currentIndex = 2
|
||||||
|
}
|
||||||
|
|
||||||
activated(currentIndex)
|
activated(currentIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -747,7 +754,7 @@ Flickable {
|
|||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
text: qsTr("Maximized")
|
text: qsTr("Maximized")
|
||||||
val: StreamingPreferences.UI_FULLSCREEN_WINDOWED
|
val: StreamingPreferences.UI_MAXIMIZED
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
text: qsTr("Fullscreen")
|
text: qsTr("Fullscreen")
|
||||||
|
|||||||
+2
-2
@@ -20,10 +20,10 @@ ApplicationWindow {
|
|||||||
visibility: {
|
visibility: {
|
||||||
if (SystemProperties.hasWindowManager) {
|
if (SystemProperties.hasWindowManager) {
|
||||||
if (StreamingPreferences.uiDisplayMode == StreamingPreferences.UI_WINDOWED) return "Windowed"
|
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 if (StreamingPreferences.uiDisplayMode == StreamingPreferences.UI_FULLSCREEN) return "FullScreen"
|
||||||
} else {
|
} else {
|
||||||
return "Maximized"
|
return "FullScreen"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#define SER_QUITAPPAFTER "quitAppAfter"
|
#define SER_QUITAPPAFTER "quitAppAfter"
|
||||||
#define SER_ABSMOUSEMODE "mouseacceleration"
|
#define SER_ABSMOUSEMODE "mouseacceleration"
|
||||||
#define SER_ABSTOUCHMODE "abstouchmode"
|
#define SER_ABSTOUCHMODE "abstouchmode"
|
||||||
|
#define SER_STARTWINDOWED "startwindowed"
|
||||||
#define SER_FRAMEPACING "framepacing"
|
#define SER_FRAMEPACING "framepacing"
|
||||||
#define SER_CONNWARNINGS "connwarnings"
|
#define SER_CONNWARNINGS "connwarnings"
|
||||||
#define SER_UIDISPLAYMODE "uidisplaymode"
|
#define SER_UIDISPLAYMODE "uidisplaymode"
|
||||||
@@ -90,7 +91,8 @@ void StreamingPreferences::reload()
|
|||||||
static_cast<int>(settings.value(SER_FULLSCREEN, true).toBool() ?
|
static_cast<int>(settings.value(SER_FULLSCREEN, true).toBool() ?
|
||||||
recommendedFullScreenMode : WindowMode::WM_WINDOWED)).toInt());
|
recommendedFullScreenMode : WindowMode::WM_WINDOWED)).toInt());
|
||||||
uiDisplayMode = static_cast<UIDisplayMode>(settings.value(SER_UIDISPLAYMODE,
|
uiDisplayMode = static_cast<UIDisplayMode>(settings.value(SER_UIDISPLAYMODE,
|
||||||
static_cast<int>(UIDisplayMode::UI_WINDOWED)).toInt());
|
static_cast<int>(settings.value(SER_STARTWINDOWED, true).toBool() ? UIDisplayMode::UI_WINDOWED
|
||||||
|
: UIDisplayMode::UI_MAXIMIZED)).toInt());
|
||||||
|
|
||||||
|
|
||||||
// Perform default settings updates as required based on last default version
|
// Perform default settings updates as required based on last default version
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
enum UIDisplayMode
|
enum UIDisplayMode
|
||||||
{
|
{
|
||||||
UI_WINDOWED,
|
UI_WINDOWED,
|
||||||
UI_FULLSCREEN_WINDOWED,
|
UI_MAXIMIZED,
|
||||||
UI_FULLSCREEN
|
UI_FULLSCREEN
|
||||||
};
|
};
|
||||||
Q_ENUM(UIDisplayMode)
|
Q_ENUM(UIDisplayMode)
|
||||||
|
|||||||
Reference in New Issue
Block a user