[kcmkwin/kwindesktop] Remove pointless layout container
Summary: ColumnLayout only contains one item so is rather pointless, but more importantly prevents size hints from the formLayout propogating up to the ScrollViewKCM. Test Plan: Opened KCM Reviewers: #kwin, broulik Reviewed By: broulik Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D18297icc-effect-5.17.5
parent
f95a9618a7
commit
e6b5903fff
|
@ -174,123 +174,119 @@ ScrollViewKCM {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: ColumnLayout {
|
footer: Kirigami.FormLayout {
|
||||||
Kirigami.FormLayout {
|
Connections {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
target: kcm
|
||||||
|
|
||||||
Connections {
|
onNavWrapsChanged: navWraps.checked = kcm.navWraps
|
||||||
target: kcm
|
|
||||||
|
|
||||||
onNavWrapsChanged: navWraps.checked = kcm.navWraps
|
onOsdEnabledChanged: osdEnabled.checked = kcm.osdEnabled
|
||||||
|
onOsdDurationChanged: osdDuration.value = kcm.osdDuration
|
||||||
|
onOsdTextOnlyChanged: osdTextOnly.checked = !kcm.osdTextOnly
|
||||||
|
}
|
||||||
|
|
||||||
onOsdEnabledChanged: osdEnabled.checked = kcm.osdEnabled
|
QtControls.CheckBox {
|
||||||
onOsdDurationChanged: osdDuration.value = kcm.osdDuration
|
id: navWraps
|
||||||
onOsdTextOnlyChanged: osdTextOnly.checked = !kcm.osdTextOnly
|
|
||||||
|
Kirigami.FormData.label: i18n("Options:")
|
||||||
|
|
||||||
|
text: i18n("Navigation wraps around")
|
||||||
|
|
||||||
|
checked: kcm.navWraps
|
||||||
|
|
||||||
|
onCheckedChanged: kcm.navWraps = checked
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
QtControls.CheckBox {
|
||||||
|
id: animationEnabled
|
||||||
|
|
||||||
|
text: i18n("Show animation when switching:")
|
||||||
|
|
||||||
|
checked: kcm.animationsModel.enabled
|
||||||
|
|
||||||
|
onCheckedChanged: kcm.animationsModel.enabled = checked
|
||||||
|
}
|
||||||
|
|
||||||
|
QtControls.ComboBox {
|
||||||
|
enabled: animationEnabled.checked
|
||||||
|
|
||||||
|
model: kcm.animationsModel
|
||||||
|
textRole: "NameRole"
|
||||||
|
currentIndex: kcm.animationsModel.currentIndex
|
||||||
|
onActivated: kcm.animationsModel.currentIndex = currentIndex
|
||||||
|
}
|
||||||
|
|
||||||
|
QtControls.Button {
|
||||||
|
enabled: animationEnabled.checked && kcm.animationsModel.currentConfigurable
|
||||||
|
|
||||||
|
icon.name: "configure"
|
||||||
|
|
||||||
|
onClicked: kcm.configureAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
QtControls.Button {
|
||||||
|
enabled: animationEnabled.checked
|
||||||
|
|
||||||
|
icon.name: "dialog-information"
|
||||||
|
|
||||||
|
onClicked: kcm.showAboutAnimation()
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
QtControls.CheckBox {
|
||||||
|
id: osdEnabled
|
||||||
|
|
||||||
|
text: i18n("Show on-screen display when switching:")
|
||||||
|
|
||||||
|
checked: kcm.osdEnabled
|
||||||
|
|
||||||
|
onToggled: kcm.osdEnabled = checked
|
||||||
|
}
|
||||||
|
|
||||||
|
QtControls.SpinBox {
|
||||||
|
id: osdDuration
|
||||||
|
|
||||||
|
enabled: osdEnabled.checked
|
||||||
|
|
||||||
|
from: 0
|
||||||
|
to: 10000
|
||||||
|
stepSize: 100
|
||||||
|
|
||||||
|
textFromValue: function(value, locale) { return i18n("%1 ms", value)}
|
||||||
|
|
||||||
|
value: kcm.osdDuration
|
||||||
|
|
||||||
|
onValueChanged: kcm.osdDuration = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
Item {
|
||||||
|
width: units.largeSpacing
|
||||||
}
|
}
|
||||||
|
|
||||||
QtControls.CheckBox {
|
QtControls.CheckBox {
|
||||||
id: navWraps
|
id: osdTextOnly
|
||||||
|
|
||||||
Kirigami.FormData.label: i18n("Options:")
|
enabled: osdEnabled.checked
|
||||||
|
|
||||||
text: i18n("Navigation wraps around")
|
text: i18n("Show desktop layout indicators")
|
||||||
|
|
||||||
checked: kcm.navWraps
|
checked: !kcm.osdTextOnly
|
||||||
|
|
||||||
onCheckedChanged: kcm.navWraps = checked
|
onToggled: kcm.osdTextOnly = !checked
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
QtControls.CheckBox {
|
|
||||||
id: animationEnabled
|
|
||||||
|
|
||||||
text: i18n("Show animation when switching:")
|
|
||||||
|
|
||||||
checked: kcm.animationsModel.enabled
|
|
||||||
|
|
||||||
onCheckedChanged: kcm.animationsModel.enabled = checked
|
|
||||||
}
|
|
||||||
|
|
||||||
QtControls.ComboBox {
|
|
||||||
enabled: animationEnabled.checked
|
|
||||||
|
|
||||||
model: kcm.animationsModel
|
|
||||||
textRole: "NameRole"
|
|
||||||
currentIndex: kcm.animationsModel.currentIndex
|
|
||||||
onActivated: kcm.animationsModel.currentIndex = currentIndex
|
|
||||||
}
|
|
||||||
|
|
||||||
QtControls.Button {
|
|
||||||
enabled: animationEnabled.checked && kcm.animationsModel.currentConfigurable
|
|
||||||
|
|
||||||
icon.name: "configure"
|
|
||||||
|
|
||||||
onClicked: kcm.configureAnimation()
|
|
||||||
}
|
|
||||||
|
|
||||||
QtControls.Button {
|
|
||||||
enabled: animationEnabled.checked
|
|
||||||
|
|
||||||
icon.name: "dialog-information"
|
|
||||||
|
|
||||||
onClicked: kcm.showAboutAnimation()
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
QtControls.CheckBox {
|
|
||||||
id: osdEnabled
|
|
||||||
|
|
||||||
text: i18n("Show on-screen display when switching:")
|
|
||||||
|
|
||||||
checked: kcm.osdEnabled
|
|
||||||
|
|
||||||
onToggled: kcm.osdEnabled = checked
|
|
||||||
}
|
|
||||||
|
|
||||||
QtControls.SpinBox {
|
|
||||||
id: osdDuration
|
|
||||||
|
|
||||||
enabled: osdEnabled.checked
|
|
||||||
|
|
||||||
from: 0
|
|
||||||
to: 10000
|
|
||||||
stepSize: 100
|
|
||||||
|
|
||||||
textFromValue: function(value, locale) { return i18n("%1 ms", value)}
|
|
||||||
|
|
||||||
value: kcm.osdDuration
|
|
||||||
|
|
||||||
onValueChanged: kcm.osdDuration = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
Item {
|
|
||||||
width: units.largeSpacing
|
|
||||||
}
|
|
||||||
|
|
||||||
QtControls.CheckBox {
|
|
||||||
id: osdTextOnly
|
|
||||||
|
|
||||||
enabled: osdEnabled.checked
|
|
||||||
|
|
||||||
text: i18n("Show desktop layout indicators")
|
|
||||||
|
|
||||||
checked: !kcm.osdTextOnly
|
|
||||||
|
|
||||||
onToggled: kcm.osdTextOnly = !checked
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue