mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-04 00:36:36 +00:00
Improve settings page behavior when the window is too small
This commit is contained in:
parent
4c3a23b1bd
commit
ce99b0e162
@ -6,8 +6,10 @@ import SdlGamepadKeyNavigation 1.0
|
|||||||
// https://stackoverflow.com/questions/45029968/how-do-i-set-the-combobox-width-to-fit-the-largest-item
|
// https://stackoverflow.com/questions/45029968/how-do-i-set-the-combobox-width-to-fit-the-largest-item
|
||||||
ComboBox {
|
ComboBox {
|
||||||
property int textWidth
|
property int textWidth
|
||||||
|
property int desiredWidth : leftPadding + textWidth + indicator.width + rightPadding
|
||||||
|
property int maximumWidth : parent.width
|
||||||
|
|
||||||
implicitWidth: leftPadding + textWidth + indicator.width + rightPadding
|
implicitWidth: desiredWidth < maximumWidth ? desiredWidth : maximumWidth
|
||||||
|
|
||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: popupMetrics
|
id: popupMetrics
|
||||||
|
@ -78,6 +78,7 @@ Flickable {
|
|||||||
|
|
||||||
Row {
|
Row {
|
||||||
spacing: 5
|
spacing: 5
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
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
|
||||||
@ -165,6 +166,7 @@ Flickable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
id: resolutionComboBox
|
id: resolutionComboBox
|
||||||
|
maximumWidth: parent.width / 2
|
||||||
textRole: "text"
|
textRole: "text"
|
||||||
model: ListModel {
|
model: ListModel {
|
||||||
id: resolutionListModel
|
id: resolutionListModel
|
||||||
@ -281,6 +283,7 @@ Flickable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
id: fpsComboBox
|
id: fpsComboBox
|
||||||
|
maximumWidth: parent.width / 2
|
||||||
textRole: "text"
|
textRole: "text"
|
||||||
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
// ::onActivated must be used, as it only listens for when the index is changed by a human
|
||||||
onActivated : {
|
onActivated : {
|
||||||
@ -401,6 +404,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: vsyncCheck
|
id: vsyncCheck
|
||||||
|
width: parent.width
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
text: "V-Sync"
|
text: "V-Sync"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
@ -417,6 +421,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: framePacingCheck
|
id: framePacingCheck
|
||||||
|
width: parent.width
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
text: "Frame pacing"
|
text: "Frame pacing"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
@ -507,6 +512,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: startMaximizedCheck
|
id: startMaximizedCheck
|
||||||
|
width: parent.width
|
||||||
text: "Maximize Moonlight window on startup"
|
text: "Maximize Moonlight window on startup"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
enabled: SystemProperties.hasWindowManager
|
enabled: SystemProperties.hasWindowManager
|
||||||
@ -518,6 +524,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: connectionWarningsCheck
|
id: connectionWarningsCheck
|
||||||
|
width: parent.width
|
||||||
text: "Show connection quality warnings"
|
text: "Show connection quality warnings"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: StreamingPreferences.connectionWarnings
|
checked: StreamingPreferences.connectionWarnings
|
||||||
@ -529,6 +536,7 @@ Flickable {
|
|||||||
CheckBox {
|
CheckBox {
|
||||||
visible: SystemProperties.hasDiscordIntegration
|
visible: SystemProperties.hasDiscordIntegration
|
||||||
id: discordPresenceCheck
|
id: discordPresenceCheck
|
||||||
|
width: parent.width
|
||||||
text: "Discord Rich Presence integration"
|
text: "Discord Rich Presence integration"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: StreamingPreferences.richPresence
|
checked: StreamingPreferences.richPresence
|
||||||
@ -564,6 +572,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: singleControllerCheck
|
id: singleControllerCheck
|
||||||
|
width: parent.width
|
||||||
text: "Force gamepad #1 always present"
|
text: "Force gamepad #1 always present"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: !StreamingPreferences.multiController
|
checked: !StreamingPreferences.multiController
|
||||||
@ -581,6 +590,7 @@ Flickable {
|
|||||||
CheckBox {
|
CheckBox {
|
||||||
id: absoluteMouseCheck
|
id: absoluteMouseCheck
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
width: parent.width
|
||||||
text: "Optimize mouse for remote desktop instead of games"
|
text: "Optimize mouse for remote desktop instead of games"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
enabled: SystemProperties.hasWindowManager
|
enabled: SystemProperties.hasWindowManager
|
||||||
@ -599,6 +609,7 @@ Flickable {
|
|||||||
CheckBox {
|
CheckBox {
|
||||||
id: absoluteTouchCheck
|
id: absoluteTouchCheck
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
width: parent.width
|
||||||
text: "Use touchscreen as a trackpad"
|
text: "Use touchscreen as a trackpad"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: !StreamingPreferences.absoluteTouchMode
|
checked: !StreamingPreferences.absoluteTouchMode
|
||||||
@ -615,6 +626,7 @@ Flickable {
|
|||||||
CheckBox {
|
CheckBox {
|
||||||
id: gamepadMouseCheck
|
id: gamepadMouseCheck
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
width: parent.width
|
||||||
text: "Gamepad mouse mode support"
|
text: "Gamepad mouse mode support"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: StreamingPreferences.gamepadMouse
|
checked: StreamingPreferences.gamepadMouse
|
||||||
@ -643,6 +655,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: optimizeGameSettingsCheck
|
id: optimizeGameSettingsCheck
|
||||||
|
width: parent.width
|
||||||
text: "Optimize game settings"
|
text: "Optimize game settings"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: StreamingPreferences.gameOptimizations
|
checked: StreamingPreferences.gameOptimizations
|
||||||
@ -653,6 +666,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: audioPcCheck
|
id: audioPcCheck
|
||||||
|
width: parent.width
|
||||||
text: "Play audio on host PC"
|
text: "Play audio on host PC"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: StreamingPreferences.playAudioOnHost
|
checked: StreamingPreferences.playAudioOnHost
|
||||||
@ -772,6 +786,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: unlockUnsupportedFps
|
id: unlockUnsupportedFps
|
||||||
|
width: parent.width
|
||||||
text: "Unlock unsupported FPS options"
|
text: "Unlock unsupported FPS options"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: StreamingPreferences.unsupportedFps
|
checked: StreamingPreferences.unsupportedFps
|
||||||
@ -790,6 +805,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: enableMdns
|
id: enableMdns
|
||||||
|
width: parent.width
|
||||||
text: "Automatically find PCs on the local network (Recommended)"
|
text: "Automatically find PCs on the local network (Recommended)"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: StreamingPreferences.enableMdns
|
checked: StreamingPreferences.enableMdns
|
||||||
@ -814,6 +830,7 @@ Flickable {
|
|||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: quitAppAfter
|
id: quitAppAfter
|
||||||
|
width: parent.width
|
||||||
text: "Quit app after quitting session"
|
text: "Quit app after quitting session"
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
checked: StreamingPreferences.quitAppAfter
|
checked: StreamingPreferences.quitAppAfter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user