diff --git a/applets/binary-clock/package/contents/ui/configGeneral.qml b/applets/binary-clock/package/contents/ui/configGeneral.qml --- a/applets/binary-clock/package/contents/ui/configGeneral.qml +++ b/applets/binary-clock/package/contents/ui/configGeneral.qml @@ -20,13 +20,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ -import QtQuick 2.0 -import QtQuick.Controls 1.0 as QtControls -import QtQuick.Layouts 1.1 +import QtQuick 2.12 +import QtQuick.Controls 2.5 as QtControls import org.kde.kquickcontrols 2.0 as KQuickControls +import org.kde.kirigami 2.5 as Kirigami -ColumnLayout { - id: generalConfigPage +Item { + width: childrenRect.width + height: childrenRect.height property alias cfg_showGrid: showGridCheckBox.checked property alias cfg_showOffLeds: showOffLedsCheckBox.checked @@ -39,72 +40,65 @@ property alias cfg_useCustomColorForGrid: useCustomColorForGridCheckBox.checked property alias cfg_customColorForGrid: customColorForGrid.color - QtControls.GroupBox { - Layout.fillWidth: true - flat: true - - title: i18nc("@title:group", "Display") - - ColumnLayout { - anchors.fill: parent + Kirigami.FormLayout { + id: generalConfigPage + anchors.left: parent.left + anchors.right: parent.right QtControls.CheckBox { id: showGridCheckBox - text: i18nc("@option:check", "Draw grid") + Kirigami.FormData.label:i18n("Display:") + text: i18nc("@option:check", "Grid") } + QtControls.CheckBox { id: showOffLedsCheckBox - text: i18nc("@option:check", "Show inactive LEDs") + text: i18nc("@option:check", "Inactive LEDs") } + QtControls.CheckBox { id: showSecondsCheckBox - text: i18nc("@option:check", "Display seconds") + text: i18nc("@option:check", "Seconds") } + QtControls.CheckBox { id: showBcdFormatCheckBox - text: i18nc("@option:check", "Display in BCD format (decimal)") + 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 + } - GridLayout { - columns: 2 QtControls.CheckBox { id: useCustomColorForActiveCheckBox - text: i18nc("@option:check", "Use custom color for active LEDs") + Kirigami.FormData.label:i18n("Use custom color for:") + text: i18nc("@option:check", "Active LEDs") } + KQuickControls.ColorButton { id: customColorForActive enabled: useCustomColorForActiveCheckBox.checked } 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 } 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 +}