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

@ -140,7 +140,6 @@ Item {
}
RPane {
width: parent.width
height: 248
radius: 4
Material.elevation: 32
bgOpacity: 0.97
@ -151,7 +150,6 @@ Item {
Row {
spacing: 32
width: parent.width
height: closeOnExitCol.height
CheckBox {
id: launchApp
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 {
width: 1
@ -227,7 +177,10 @@ Item {
RowLayout {
id: launchlayout
spacing: 4
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 32
anchors.rightMargin: 32
Image {
id: maybeIcon
source: shortcutInfo.icon
@ -317,7 +270,78 @@ Item {
Material.elevation: 32
bgOpacity: 0.97
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
width: parent.width
@ -451,7 +475,7 @@ Item {
helpInfoDialog.text =
qsTr("GlosSI will only provide [NUMBER] of controllers")
+ "\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()
}
width: 48
@ -543,7 +567,7 @@ Item {
}
}
}
}
}
Item {

Loading…
Cancel
Save