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,7 +270,78 @@ 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
RPane {
width: parent.width
radius: 4
Material.elevation: 32
bgOpacity: 0.97
height: advancedLaunchCol.height + 24
Column {
id: advancedLaunchCol
spacing: 4
height: advancedLaunchedRow.height
Row {
id: advancedLaunchedRow
spacing: 32
width: parent.width
height: closeOnExitCol.height
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
}
}
}
}
}
Row {
spacing: 16 spacing: 16
width: parent.width width: parent.width
@ -451,7 +475,7 @@ Item {
helpInfoDialog.text = helpInfoDialog.text =
qsTr("GlosSI will only provide [NUMBER] of controllers") qsTr("GlosSI will only provide [NUMBER] of controllers")
+ "\n" + "\n"
+ qsTr("Required to set to actually connected controller count when using \"real devuce IDs\" ") + qsTr("Required to set to actually connected controller count when using \"real device IDs\" ")
helpInfoDialog.open() helpInfoDialog.open()
} }
width: 48 width: 48
@ -543,7 +567,7 @@ Item {
} }
} }
} }
}
} }
Item { Item {

Loading…
Cancel
Save