mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 23:42:51 -05:00
fix: System Updater focus
This commit is contained in:
@@ -251,68 +251,96 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
FocusScope {
|
||||||
width: parent.width - Theme.spacingM * 2
|
width: parent.width - Theme.spacingM * 2
|
||||||
spacing: Theme.spacingXS
|
height: customCommandColumn.implicitHeight
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: Theme.spacingM
|
anchors.leftMargin: Theme.spacingM
|
||||||
|
|
||||||
StyledText {
|
Column {
|
||||||
text: I18n.tr("System update custom command")
|
id: customCommandColumn
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
color: Theme.surfaceVariantText
|
|
||||||
}
|
|
||||||
|
|
||||||
DankTextField {
|
|
||||||
id: updaterCustomCommand
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 48
|
spacing: Theme.spacingXS
|
||||||
placeholderText: "myPkgMngr --sysupdate"
|
|
||||||
backgroundColor: Theme.surfaceVariant
|
|
||||||
normalBorderColor: Theme.primarySelected
|
|
||||||
focusedBorderColor: Theme.primary
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
StyledText {
|
||||||
if (SettingsData.updaterCustomCommand) {
|
text: I18n.tr("System update custom command")
|
||||||
text = SettingsData.updaterCustomCommand;
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
}
|
color: Theme.surfaceVariantText
|
||||||
}
|
}
|
||||||
|
|
||||||
onTextEdited: {
|
DankTextField {
|
||||||
SettingsData.setUpdaterCustomCommand(text.trim());
|
id: updaterCustomCommand
|
||||||
|
width: parent.width
|
||||||
|
height: 48
|
||||||
|
placeholderText: "myPkgMngr --sysupdate"
|
||||||
|
backgroundColor: Theme.surfaceVariant
|
||||||
|
normalBorderColor: Theme.primarySelected
|
||||||
|
focusedBorderColor: Theme.primary
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (SettingsData.updaterCustomCommand) {
|
||||||
|
text = SettingsData.updaterCustomCommand;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onTextEdited: {
|
||||||
|
SettingsData.setUpdaterCustomCommand(text.trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onPressed: mouse => {
|
||||||
|
updaterCustomCommand.forceActiveFocus()
|
||||||
|
mouse.accepted = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
FocusScope {
|
||||||
width: parent.width - Theme.spacingM * 2
|
width: parent.width - Theme.spacingM * 2
|
||||||
spacing: Theme.spacingXS
|
height: terminalParamsColumn.implicitHeight
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: Theme.spacingM
|
anchors.leftMargin: Theme.spacingM
|
||||||
|
|
||||||
StyledText {
|
Column {
|
||||||
text: I18n.tr("Terminal custom additional parameters")
|
id: terminalParamsColumn
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
color: Theme.surfaceVariantText
|
|
||||||
}
|
|
||||||
|
|
||||||
DankTextField {
|
|
||||||
id: updaterTerminalCustomClass
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 48
|
spacing: Theme.spacingXS
|
||||||
placeholderText: "-T udpClass"
|
|
||||||
backgroundColor: Theme.surfaceVariant
|
|
||||||
normalBorderColor: Theme.primarySelected
|
|
||||||
focusedBorderColor: Theme.primary
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
StyledText {
|
||||||
if (SettingsData.updaterTerminalAdditionalParams) {
|
text: I18n.tr("Terminal custom additional parameters")
|
||||||
text = SettingsData.updaterTerminalAdditionalParams;
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
}
|
color: Theme.surfaceVariantText
|
||||||
}
|
}
|
||||||
|
|
||||||
onTextEdited: {
|
DankTextField {
|
||||||
SettingsData.setUpdaterTerminalAdditionalParams(text.trim());
|
id: updaterTerminalCustomClass
|
||||||
|
width: parent.width
|
||||||
|
height: 48
|
||||||
|
placeholderText: "-T udpClass"
|
||||||
|
backgroundColor: Theme.surfaceVariant
|
||||||
|
normalBorderColor: Theme.primarySelected
|
||||||
|
focusedBorderColor: Theme.primary
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (SettingsData.updaterTerminalAdditionalParams) {
|
||||||
|
text = SettingsData.updaterTerminalAdditionalParams;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onTextEdited: {
|
||||||
|
SettingsData.setUpdaterTerminalAdditionalParams(text.trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onPressed: mouse => {
|
||||||
|
updaterTerminalCustomClass.forceActiveFocus()
|
||||||
|
mouse.accepted = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user