mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-09-20 14:11:54 +00:00
Add option to determine if Moonlight launches in full-screen. Fixes #103
This commit is contained in:
parent
dda22fd387
commit
1a5a6773ce
4 changed files with 30 additions and 5 deletions
|
@ -466,6 +466,29 @@ ScrollView {
|
|||
}
|
||||
}
|
||||
|
||||
GroupBox {
|
||||
id: uiSettingsGroupBox
|
||||
width: (parent.width - parent.padding)
|
||||
padding: 12
|
||||
title: "<font color=\"skyblue\">UI Settings</font>"
|
||||
font.pointSize: 12
|
||||
|
||||
Row {
|
||||
anchors.fill: parent
|
||||
spacing: 5
|
||||
|
||||
CheckBox {
|
||||
id: startWindowedCheck
|
||||
text: "<font color=\"white\">Start Moonlight in windowed mode</font>"
|
||||
font.pointSize: 12
|
||||
checked: prefs.startWindowed
|
||||
onCheckedChanged: {
|
||||
prefs.startWindowed = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GroupBox {
|
||||
id: hostSettingsGroupBox
|
||||
width: (parent.width - parent.padding)
|
||||
|
|
|
@ -18,11 +18,7 @@ ApplicationWindow {
|
|||
width: 1280
|
||||
height: 600
|
||||
|
||||
// Maximize the window by default when the stream is configured
|
||||
// for full-screen or borderless windowed. This is ideal for TV
|
||||
// setups where the user doesn't want a tiny window in the middle
|
||||
// of their screen when starting Moonlight.
|
||||
visibility: prefs.windowMode != StreamingPreferences.WM_WINDOWED ? "Maximized" : "Windowed"
|
||||
visibility: prefs.startWindowed ? "Windowed" : "Maximized"
|
||||
|
||||
Material.theme: Material.Dark
|
||||
Material.accent: Material.Purple
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define SER_UNSUPPORTEDFPS "unsupportedfps"
|
||||
#define SER_MDNS "mdns"
|
||||
#define SER_MOUSEACCELERATION "mouseacceleration"
|
||||
#define SER_STARTWINDOWED "startwindowed"
|
||||
|
||||
StreamingPreferences::StreamingPreferences(QObject *parent)
|
||||
: QObject(parent)
|
||||
|
@ -43,6 +44,7 @@ void StreamingPreferences::reload()
|
|||
unsupportedFps = settings.value(SER_UNSUPPORTEDFPS, false).toBool();
|
||||
enableMdns = settings.value(SER_MDNS, true).toBool();
|
||||
mouseAcceleration = settings.value(SER_MOUSEACCELERATION, false).toBool();
|
||||
startWindowed = settings.value(SER_STARTWINDOWED, false).toBool();
|
||||
audioConfig = static_cast<AudioConfig>(settings.value(SER_AUDIOCFG,
|
||||
static_cast<int>(AudioConfig::AC_STEREO)).toInt());
|
||||
videoCodecConfig = static_cast<VideoCodecConfig>(settings.value(SER_VIDEOCFG,
|
||||
|
@ -70,6 +72,7 @@ void StreamingPreferences::save()
|
|||
settings.setValue(SER_UNSUPPORTEDFPS, unsupportedFps);
|
||||
settings.setValue(SER_MDNS, enableMdns);
|
||||
settings.setValue(SER_MOUSEACCELERATION, mouseAcceleration);
|
||||
settings.setValue(SER_STARTWINDOWED, startWindowed);
|
||||
settings.setValue(SER_AUDIOCFG, static_cast<int>(audioConfig));
|
||||
settings.setValue(SER_VIDEOCFG, static_cast<int>(videoCodecConfig));
|
||||
settings.setValue(SER_VIDEODEC, static_cast<int>(videoDecoderSelection));
|
||||
|
|
|
@ -74,6 +74,7 @@ public:
|
|||
Q_PROPERTY(bool unsupportedFps MEMBER unsupportedFps NOTIFY unsupportedFpsChanged)
|
||||
Q_PROPERTY(bool enableMdns MEMBER enableMdns NOTIFY enableMdnsChanged)
|
||||
Q_PROPERTY(bool mouseAcceleration MEMBER mouseAcceleration NOTIFY mouseAccelerationChanged)
|
||||
Q_PROPERTY(bool startWindowed MEMBER startWindowed NOTIFY startWindowedChanged)
|
||||
Q_PROPERTY(AudioConfig audioConfig MEMBER audioConfig NOTIFY audioConfigChanged)
|
||||
Q_PROPERTY(VideoCodecConfig videoCodecConfig MEMBER videoCodecConfig NOTIFY videoCodecConfigChanged)
|
||||
Q_PROPERTY(VideoDecoderSelection videoDecoderSelection MEMBER videoDecoderSelection NOTIFY videoDecoderSelectionChanged)
|
||||
|
@ -91,6 +92,7 @@ public:
|
|||
bool unsupportedFps;
|
||||
bool enableMdns;
|
||||
bool mouseAcceleration;
|
||||
bool startWindowed;
|
||||
AudioConfig audioConfig;
|
||||
VideoCodecConfig videoCodecConfig;
|
||||
VideoDecoderSelection videoDecoderSelection;
|
||||
|
@ -110,5 +112,6 @@ signals:
|
|||
void videoCodecConfigChanged();
|
||||
void videoDecoderSelectionChanged();
|
||||
void windowModeChanged();
|
||||
void startWindowedChanged();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue