Commit 7437b39c authored by Filip Fila's avatar Filip Fila 🌆

[binary-clock] Port configuration window to QQC2 and Kirigami.FormLayout

Summary: This patch ports binary-clock's configuration window to QQC2 and Kirigami.FormLayout.

Test Plan:
Before:
{F6682645}

After:
{F6682649}

Reviewers: #vdg, #plasma, ngraham

Reviewed By: #vdg, ngraham

Subscribers: abetts, ngraham, plasma-devel

Tags: #plasma

Maniphest Tasks: T10586

Differential Revision: https://phabricator.kde.org/D19669
parent d0c5e541
......@@ -21,12 +21,15 @@
*/
import QtQuick 2.0
import QtQuick.Controls 1.0 as QtControls
import QtQuick.Controls 2.5 as QtControls
import QtQuick.Layouts 1.1
import org.kde.kquickcontrols 2.0 as KQuickControls
import org.kde.kirigami 2.5 as Kirigami
ColumnLayout {
Kirigami.FormLayout {
id: generalConfigPage
anchors.left: parent.left
anchors.right: parent.right
property alias cfg_showGrid: showGridCheckBox.checked
property alias cfg_showOffLeds: showOffLedsCheckBox.checked
......@@ -39,72 +42,69 @@ ColumnLayout {
property alias cfg_useCustomColorForGrid: useCustomColorForGridCheckBox.checked
property alias cfg_customColorForGrid: customColorForGrid.color
QtControls.GroupBox {
Layout.fillWidth: true
flat: true
QtControls.CheckBox {
id: showGridCheckBox
Kirigami.FormData.label:i18n("Display:")
text: i18nc("@option:check", "Grid")
}
title: i18nc("@title:group", "Display")
QtControls.CheckBox {
id: showOffLedsCheckBox
text: i18nc("@option:check", "Inactive LEDs")
}
ColumnLayout {
anchors.fill: parent
QtControls.CheckBox {
id: showSecondsCheckBox
text: i18nc("@option:check", "Seconds")
}
QtControls.CheckBox {
id: showGridCheckBox
text: i18nc("@option:check", "Draw grid")
}
QtControls.CheckBox {
id: showOffLedsCheckBox
text: i18nc("@option:check", "Show inactive LEDs")
}
QtControls.CheckBox {
id: showSecondsCheckBox
text: i18nc("@option:check", "Display seconds")
}
QtControls.CheckBox {
id: showBcdFormatCheckBox
text: i18nc("@option:check", "Display in BCD format (decimal)")
}
QtControls.CheckBox {
id: showBcdFormatCheckBox
text: i18nc("@option:check", "In BCD format (decimal)")
}
}
QtControls.GroupBox {
Layout.fillWidth: true
flat: true
title: i18nc("@title:group", "Colors")
Item {
Kirigami.FormData.isSection:true
}
RowLayout {
Kirigami.FormData.label:i18n("Use custom color for:")
GridLayout {
columns: 2
QtControls.CheckBox {
id: useCustomColorForActiveCheckBox
text: i18nc("@option:check", "Use custom color for active LEDs")
text: i18nc("@option:check", "Active LEDs")
}
KQuickControls.ColorButton {
id: customColorForActive
enabled: useCustomColorForActiveCheckBox.checked
}
}
RowLayout {
QtControls.CheckBox {
id: useCustomColorForInactiveCheckBox
text: i18nc("@option:check", "Use custom color for inactive LEDs")
text: i18nc("@option:check", "Inactive LEDs")
}
KQuickControls.ColorButton {
id:customColorForInactive
enabled: useCustomColorForInactiveCheckBox.checked
}
}
RowLayout {
QtControls.CheckBox {
id: useCustomColorForGridCheckBox
text: i18nc("@option:check", "Use custom color for grid")
text: i18nc("@option:check", "Grid")
}
KQuickControls.ColorButton {
id:customColorForGrid
enabled: useCustomColorForGridCheckBox.checked
}
}
}
Item { // tighten layout
Layout.fillHeight: true
}
}
\ No newline at end of file
}
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