diff --git a/applets/binary-clock/package/contents/ui/configGeneral.qml b/applets/binary-clock/package/contents/ui/configGeneral.qml index 717adcf5f..7b6520a9a 100644 --- a/applets/binary-clock/package/contents/ui/configGeneral.qml +++ b/applets/binary-clock/package/contents/ui/configGeneral.qml @@ -1,110 +1,110 @@ /* * Copyright 2014 Joseph Wenninger * Copyright 2018 Piotr KÄ…kol * * Based on analog-clock configGeneral.qml: * Copyright 2013 David Edmundson * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * 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.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 property alias cfg_showSeconds: showSecondsCheckBox.checked property alias cfg_showBcdFormat: showBcdFormatCheckBox.checked property alias cfg_useCustomColorForActive: useCustomColorForActiveCheckBox.checked property alias cfg_customColorForActive: customColorForActive.color property alias cfg_useCustomColorForInactive: useCustomColorForInactiveCheckBox.checked property alias cfg_customColorForInactive: customColorForInactive.color 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 +}