GlosSIConfig: declutter UI

pull/179/head
Peter Repukat 2 years ago
parent 00e9bbe485
commit 14796604d1

@ -25,7 +25,7 @@ RPane {
property alias content: ldr.sourceComponent property alias content: ldr.sourceComponent
clip: true clip: true
height: paneTitle.height + collapseColumn.spacing height: paneHeader.height + collapseColumn.spacing
property bool collapsed: true property bool collapsed: true
id: collapsePane id: collapsePane
@ -41,8 +41,9 @@ RPane {
width: parent.width width: parent.width
spacing: 16 spacing: 16
Item { Item {
id: paneHeader
width: parent.width width: parent.width
height: paneTitle.height height: paneTitle.height + 32
Label { Label {
id: paneTitle id: paneTitle
anchors.left: parent.left anchors.left: parent.left
@ -50,7 +51,7 @@ RPane {
font.bold: true font.bold: true
font.pixelSize: 24 font.pixelSize: 24
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: -2 anchors.topMargin: 14
} }
RoundButton { RoundButton {
width: 48 width: 48
@ -58,13 +59,13 @@ RPane {
Material.elevation: 0 Material.elevation: 0
anchors.rightMargin: 0 anchors.rightMargin: 0
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: -12 anchors.topMargin: 0
onClicked: function(){ onClicked: function(){
collapsed = !collapsed; collapsed = !collapsed;
if (collapsed) { if (collapsed) {
collapsePane.height = paneTitle.height + collapseColumn.spacing collapsePane.height = paneHeader.height + collapseColumn.spacing
} else { } else {
collapsePane.height = paneTitle.height + collapseColumn.spacing * 3 + ldr.item.height collapsePane.height = paneHeader.height + collapseColumn.spacing * 3 + ldr.item.height
} }
} }
Image { Image {

@ -140,7 +140,6 @@ Item {
} }
RPane { RPane {
width: parent.width width: parent.width
height: 248
radius: 4 radius: 4
Material.elevation: 32 Material.elevation: 32
bgOpacity: 0.97 bgOpacity: 0.97
@ -151,7 +150,6 @@ Item {
Row { Row {
spacing: 32 spacing: 32
width: parent.width width: parent.width
height: closeOnExitCol.height
CheckBox { CheckBox {
id: launchApp id: launchApp
text: qsTr("Launch app") text: qsTr("Launch app")
@ -171,54 +169,6 @@ Item {
} }
} }
} }
Column {
id: closeOnExitCol
spacing: 2
CheckBox {
id: closeOnExit
text: qsTr("Close when launched app quits")
checked: shortcutInfo.launch.closeOnExit
onCheckedChanged: function() {
shortcutInfo.launch.closeOnExit = checked
if (checked) {
waitForChildren.enabled = true;
} else {
waitForChildren.enabled = false;
}
}
}
Label {
text: qsTr("Recommended to disable for launcher-games")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
topPadding: -8
}
CheckBox {
id: waitForChildren
text: qsTr("Wait for child processes")
checked: shortcutInfo.launch.waitForChildProcs
onCheckedChanged: function(){
shortcutInfo.launch.waitForChildProcs = checked
}
}
}
Column {
spacing: 2
CheckBox {
id: allowDesktopConfig
text: qsTr("Allow desktop-config")
checked: shortcutInfo.controller.allowDesktopConfig
onCheckedChanged: function(){
shortcutInfo.controller.allowDesktopConfig = checked
}
}
Label {
text: qsTr("Use desktop-config if launched application is not focused")
leftPadding: 32
topPadding: -8
}
}
} }
Item { Item {
width: 1 width: 1
@ -227,7 +177,10 @@ Item {
RowLayout { RowLayout {
id: launchlayout id: launchlayout
spacing: 4 spacing: 4
width: parent.width anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 32
anchors.rightMargin: 32
Image { Image {
id: maybeIcon id: maybeIcon
source: shortcutInfo.icon source: shortcutInfo.icon
@ -317,233 +270,304 @@ Item {
Material.elevation: 32 Material.elevation: 32
bgOpacity: 0.97 bgOpacity: 0.97
title: qsTr("Advanced") title: qsTr("Advanced")
content: Row { content:
Column {
spacing: 16 spacing: 16
width: parent.width
RPane { RPane {
width: parent.width / 2 - 8 width: parent.width
height: 264
radius: 4 radius: 4
Material.elevation: 32 Material.elevation: 32
bgOpacity: 0.97 bgOpacity: 0.97
height: advancedLaunchCol.height + 24
Column { Column {
spacing: 2 id: advancedLaunchCol
width: parent.width spacing: 4
height: advancedLaunchedRow.height
Row { Row {
CheckBox { id: advancedLaunchedRow
id: hideDevices spacing: 32
text: qsTr("Hide (Real) Controllers") width: parent.width
checked: shortcutInfo.devices.hideDevices height: closeOnExitCol.height
onCheckedChanged: shortcutInfo.devices.hideDevices = checked Column {
id: closeOnExitCol
spacing: 2
CheckBox {
id: closeOnExit
text: qsTr("Close when launched app quits")
checked: shortcutInfo.launch.closeOnExit
onCheckedChanged: function() {
shortcutInfo.launch.closeOnExit = checked
if (checked) {
waitForChildren.enabled = true;
} else {
waitForChildren.enabled = false;
}
}
}
Label {
text: qsTr("Recommended to disable for launcher-games")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
topPadding: -8
}
CheckBox {
id: waitForChildren
text: qsTr("Wait for child processes")
checked: shortcutInfo.launch.waitForChildProcs
onCheckedChanged: function(){
shortcutInfo.launch.waitForChildProcs = checked
}
}
} }
RoundButton { Column {
onClicked: () => { spacing: 2
helpInfoDialog.titleText = qsTr("Hide (Real) Controllers") CheckBox {
helpInfoDialog.text = id: allowDesktopConfig
qsTr("Hides real game controllers from the system\nThis may prevent doubled inputs") text: qsTr("Allow desktop-config")
+ "\n" checked: shortcutInfo.controller.allowDesktopConfig
+ qsTr("You can change this setting and which devices are hidden in the GlosSI overlay") onCheckedChanged: function(){
shortcutInfo.controller.allowDesktopConfig = checked
helpInfoDialog.open() }
} }
width: 48 Label {
height: 48 text: qsTr("Use desktop-config if launched application is not focused")
Material.elevation: 0 leftPadding: 32
anchors.topMargin: 16 topPadding: -8
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
} }
} }
} }
Item { }
width: 1 }
height: 4
} Row {
Row { spacing: 16
CheckBox { width: parent.width
id: realDeviceIds
text: qsTr("Use real device (USB)-IDs") RPane {
checked: shortcutInfo.devices.realDeviceIds width: parent.width / 2 - 8
onCheckedChanged: shortcutInfo.devices.realDeviceIds = checked height: 264
} radius: 4
RoundButton { Material.elevation: 32
onClicked: () => { bgOpacity: 0.97
helpInfoDialog.titleText = qsTr("Use real device (USB)-IDs")
helpInfoDialog.text = Column {
qsTr("Only enable if input's are not recognized by the game") spacing: 2
+ "\n" width: parent.width
+ qsTr("If enabled, device-hiding won't work.\nUse the \"Max. Controller count\" setting!") Row {
CheckBox {
helpInfoDialog.open() id: hideDevices
text: qsTr("Hide (Real) Controllers")
checked: shortcutInfo.devices.hideDevices
onCheckedChanged: shortcutInfo.devices.hideDevices = checked
} }
width: 48 RoundButton {
height: 48 onClicked: () => {
Material.elevation: 0 helpInfoDialog.titleText = qsTr("Hide (Real) Controllers")
anchors.topMargin: 16 helpInfoDialog.text =
Image { qsTr("Hides real game controllers from the system\nThis may prevent doubled inputs")
anchors.centerIn: parent + "\n"
source: "qrc:/svg/help_outline_white_24dp.svg" + qsTr("You can change this setting and which devices are hidden in the GlosSI overlay")
width: 24
height: 24 helpInfoDialog.open()
}
width: 48
height: 48
Material.elevation: 0
anchors.topMargin: 16
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
}
} }
} }
} Item {
Item { width: 1
width: 1 height: 4
height: 4
}
Row {
CheckBox {
id: emulateDS4
text: qsTr("Emulate DS4")
checked: shortcutInfo.controller.emulateDS4 || false
onCheckedChanged: shortcutInfo.controller.emulateDS4 = checked
} }
RoundButton { Row {
onClicked: () => { CheckBox {
helpInfoDialog.titleText = qsTr("Emulate DS4") id: realDeviceIds
helpInfoDialog.text = text: qsTr("Use real device (USB)-IDs")
qsTr("Emulates a DS4 instead of X360 Pad") checked: shortcutInfo.devices.realDeviceIds
+ "\n" onCheckedChanged: shortcutInfo.devices.realDeviceIds = checked
qsTr("for usage with, for example, PSNow")
+ "\n"
+ qsTr("If enabled you have to disable \"Playstation Configuration support\" in Steam")
helpInfoDialog.open()
} }
width: 48 RoundButton {
height: 48 onClicked: () => {
Material.elevation: 0 helpInfoDialog.titleText = qsTr("Use real device (USB)-IDs")
anchors.topMargin: 16 helpInfoDialog.text =
Image { qsTr("Only enable if input's are not recognized by the game")
anchors.centerIn: parent + "\n"
source: "qrc:/svg/help_outline_white_24dp.svg" + qsTr("If enabled, device-hiding won't work.\nUse the \"Max. Controller count\" setting!")
width: 24
height: 24 helpInfoDialog.open()
}
width: 48
height: 48
Material.elevation: 0
anchors.topMargin: 16
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
}
} }
} }
} Item {
Item { width: 1
width: 1 height: 4
height: 4
}
Row {
leftPadding: 16
Label {
text: qsTr("Max. emulated controllers")
topPadding: 16
}
SpinBox {
id: maxControllersSpinBox
width: 128
value: shortcutInfo.controller.maxControllers
from: 0
to: 4
onValueChanged: shortcutInfo.controller.maxControllers = value
} }
RoundButton { Row {
onClicked: () => { CheckBox {
helpInfoDialog.titleText = qsTr("Max. emulated controllers") id: emulateDS4
helpInfoDialog.text = text: qsTr("Emulate DS4")
qsTr("GlosSI will only provide [NUMBER] of controllers") checked: shortcutInfo.controller.emulateDS4 || false
+ "\n" onCheckedChanged: shortcutInfo.controller.emulateDS4 = checked
+ qsTr("Required to set to actually connected controller count when using \"real devuce IDs\" ")
helpInfoDialog.open()
} }
width: 48 RoundButton {
height: 48 onClicked: () => {
Material.elevation: 0 helpInfoDialog.titleText = qsTr("Emulate DS4")
anchors.topMargin: 16 helpInfoDialog.text =
Image { qsTr("Emulates a DS4 instead of X360 Pad")
anchors.centerIn: parent + "\n"
source: "qrc:/svg/help_outline_white_24dp.svg" qsTr("for usage with, for example, PSNow")
width: 24 + "\n"
height: 24 + qsTr("If enabled you have to disable \"Playstation Configuration support\" in Steam")
helpInfoDialog.open()
}
width: 48
height: 48
Material.elevation: 0
anchors.topMargin: 16
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
}
} }
} }
} Item {
} width: 1
} height: 4
RPane {
width: parent.width / 2 - 8
height: 264
radius: 4
Material.elevation: 32
bgOpacity: 0.97
Column {
spacing: 2
width: parent.width
Row {
CheckBox {
id: windowMode
text: qsTr("Steam/GlosSI overlay as separate window")
checked: shortcutInfo.window.windowMode
onCheckedChanged: shortcutInfo.window.windowMode = checked
} }
RoundButton { Row {
onClicked: () => { leftPadding: 16
helpInfoDialog.titleText = qsTr("Steam/GlosSI overlay as separate window") Label {
helpInfoDialog.text = text: qsTr("Max. emulated controllers")
qsTr("Doesn't show overlay on top, but as separate window") topPadding: 16
+ "\n"
+ qsTr("Use if blackscreen-issues are encountered.")
helpInfoDialog.open()
} }
width: 48 SpinBox {
height: 48 id: maxControllersSpinBox
Material.elevation: 0 width: 128
anchors.topMargin: 16 value: shortcutInfo.controller.maxControllers
Image { from: 0
anchors.centerIn: parent to: 4
source: "qrc:/svg/help_outline_white_24dp.svg" onValueChanged: shortcutInfo.controller.maxControllers = value
width: 24 }
height: 24 RoundButton {
onClicked: () => {
helpInfoDialog.titleText = qsTr("Max. emulated controllers")
helpInfoDialog.text =
qsTr("GlosSI will only provide [NUMBER] of controllers")
+ "\n"
+ qsTr("Required to set to actually connected controller count when using \"real device IDs\" ")
helpInfoDialog.open()
}
width: 48
height: 48
Material.elevation: 0
anchors.topMargin: 16
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
}
} }
} }
} }
Item { }
width: 1 RPane {
height: 4 width: parent.width / 2 - 8
} height: 264
radius: 4
Material.elevation: 32
bgOpacity: 0.97
Column {
spacing: 2
width: parent.width
Row {
CheckBox {
id: windowMode
text: qsTr("Steam/GlosSI overlay as separate window")
checked: shortcutInfo.window.windowMode
onCheckedChanged: shortcutInfo.window.windowMode = checked
}
RoundButton {
onClicked: () => {
helpInfoDialog.titleText = qsTr("Steam/GlosSI overlay as separate window")
helpInfoDialog.text =
qsTr("Doesn't show overlay on top, but as separate window")
+ "\n"
+ qsTr("Use if blackscreen-issues are encountered.")
Row { helpInfoDialog.open()
CheckBox { }
id: disableOverlayCheckbox width: 48
text: qsTr("Disable Steam/GlosSI overlay") height: 48
checked: shortcutInfo.window.disableOverlay Material.elevation: 0
onCheckedChanged: shortcutInfo.window.disableOverlay = checked anchors.topMargin: 16
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
}
}
}
Item {
width: 1
height: 4
} }
RoundButton {
onClicked: () => {
helpInfoDialog.titleText = qsTr("Disable Steam/GlosSI overlay")
helpInfoDialog.text =
qsTr("Only controller emulation - No extra window")
+ "\n"
+ qsTr("Might help with Steam remote play.")
helpInfoDialog.open() Row {
CheckBox {
id: disableOverlayCheckbox
text: qsTr("Disable Steam/GlosSI overlay")
checked: shortcutInfo.window.disableOverlay
onCheckedChanged: shortcutInfo.window.disableOverlay = checked
} }
width: 48 RoundButton {
height: 48 onClicked: () => {
Material.elevation: 0 helpInfoDialog.titleText = qsTr("Disable Steam/GlosSI overlay")
anchors.topMargin: 16 helpInfoDialog.text =
Image { qsTr("Only controller emulation - No extra window")
anchors.centerIn: parent + "\n"
source: "qrc:/svg/help_outline_white_24dp.svg" + qsTr("Might help with Steam remote play.")
width: 24
height: 24 helpInfoDialog.open()
}
width: 48
height: 48
Material.elevation: 0
anchors.topMargin: 16
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
}
} }
} }
} }
} }
} }
} }
} }
Item { Item {

Loading…
Cancel
Save