Commit a3836058 authored by David Redondo's avatar David Redondo 🏎
Browse files

Use FormLayout with twinFormLayouts for alignment of lockscreen config

Much simpler and also needed for correctly aligning with  wallpaper plugins
parent 0ec7a3e2
import QtQuick 2.5
import QtQuick.Controls 2.5 as QQC2
import QtQuick.Layouts 1.1
import org.kde.kirigami 2.12 as Kirigami
ColumnLayout {
Kirigami.FormLayout {
property alias cfg_alwaysShowClock: alwaysClock.checked
property alias cfg_showMediaControls: showMediaControls.checked
spacing: 0
twinFormLayouts: parentLayout
RowLayout {
spacing: units.largeSpacing / 2
QQC2.Label {
Layout.minimumWidth: formAlignment - units.largeSpacing //to match wallpaper config...
horizontalAlignment: Text.AlignRight
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Clock:")
}
QQC2.CheckBox {
id: alwaysClock
text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "verb, to show something", "Always show")
}
Item {
Layout.fillWidth: true
}
QQC2.CheckBox {
id: alwaysClock
Kirigami.FormData.label: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Clock:")
text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "verb, to show something", "Show always")
}
RowLayout {
spacing: units.largeSpacing / 2
QQC2.Label {
Layout.minimumWidth: formAlignment - units.largeSpacing //to match wallpaper config...
horizontalAlignment: Text.AlignRight
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Media controls:")
}
QQC2.CheckBox {
id: showMediaControls
text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "verb, to show something", "Show")
}
Item {
Layout.fillWidth: true
}
QQC2.CheckBox {
id: showMediaControls
Kirigami.FormData.label: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Media controls:")
text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "verb, to show something", "Show")
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment