Changeset View
Changeset View
Standalone View
Standalone View
applets/binary-clock/package/contents/ui/configGeneral.qml
Show All 14 Lines | |||||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. | ||
17 | * | 17 | * | ||
18 | * You should have received a copy of the GNU General Public License | 18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | import QtQuick 2.0 | 23 | import QtQuick 2.12 | ||
ngraham: Is this actually necessary for anything in the diff? If not, I would recommend against changing… | |||||
24 | import QtQuick.Controls 1.0 as QtControls | 24 | import QtQuick.Controls 2.5 as QtControls | ||
25 | import QtQuick.Layouts 1.1 | 25 | import QtQuick.Layouts 1.12 | ||
26 | import org.kde.kquickcontrols 2.0 as KQuickControls | 26 | import org.kde.kquickcontrols 2.0 as KQuickControls | ||
27 | import org.kde.kirigami 2.5 as Kirigami | ||||
27 | 28 | | |||
28 | ColumnLayout { | 29 | Kirigami.FormLayout { | ||
29 | id: generalConfigPage | 30 | id: generalConfigPage | ||
31 | anchors.horizontalCenter: parent.horizontalCenter | ||||
Anchor left and right to the parent's left and right, or else if we ever decide to make the formlayout not horizontally centered, this layout won't get that change automatically. ngraham: Anchor left and right to the parent's left and right, or else if we ever decide to make the… | |||||
30 | 32 | | |||
31 | property alias cfg_showGrid: showGridCheckBox.checked | 33 | property alias cfg_showGrid: showGridCheckBox.checked | ||
32 | property alias cfg_showOffLeds: showOffLedsCheckBox.checked | 34 | property alias cfg_showOffLeds: showOffLedsCheckBox.checked | ||
33 | property alias cfg_showSeconds: showSecondsCheckBox.checked | 35 | property alias cfg_showSeconds: showSecondsCheckBox.checked | ||
34 | property alias cfg_showBcdFormat: showBcdFormatCheckBox.checked | 36 | property alias cfg_showBcdFormat: showBcdFormatCheckBox.checked | ||
35 | property alias cfg_useCustomColorForActive: useCustomColorForActiveCheckBox.checked | 37 | property alias cfg_useCustomColorForActive: useCustomColorForActiveCheckBox.checked | ||
36 | property alias cfg_customColorForActive: customColorForActive.color | 38 | property alias cfg_customColorForActive: customColorForActive.color | ||
37 | property alias cfg_useCustomColorForInactive: useCustomColorForInactiveCheckBox.checked | 39 | property alias cfg_useCustomColorForInactive: useCustomColorForInactiveCheckBox.checked | ||
38 | property alias cfg_customColorForInactive: customColorForInactive.color | 40 | property alias cfg_customColorForInactive: customColorForInactive.color | ||
39 | property alias cfg_useCustomColorForGrid: useCustomColorForGridCheckBox.checked | 41 | property alias cfg_useCustomColorForGrid: useCustomColorForGridCheckBox.checked | ||
40 | property alias cfg_customColorForGrid: customColorForGrid.color | 42 | property alias cfg_customColorForGrid: customColorForGrid.color | ||
41 | 43 | | |||
42 | QtControls.GroupBox { | | |||
43 | Layout.fillWidth: true | | |||
44 | flat: true | | |||
45 | | ||||
46 | title: i18nc("@title:group", "Display") | | |||
47 | | ||||
48 | ColumnLayout { | | |||
49 | anchors.fill: parent | | |||
50 | | ||||
51 | QtControls.CheckBox { | 44 | QtControls.CheckBox { | ||
52 | id: showGridCheckBox | 45 | id: showGridCheckBox | ||
53 | text: i18nc("@option:check", "Draw grid") | 46 | Kirigami.FormData.label:i18n("Display:") | ||
47 | text: i18nc("@option:check", "Grid") | ||||
54 | } | 48 | } | ||
49 | | ||||
55 | QtControls.CheckBox { | 50 | QtControls.CheckBox { | ||
56 | id: showOffLedsCheckBox | 51 | id: showOffLedsCheckBox | ||
57 | text: i18nc("@option:check", "Show inactive LEDs") | 52 | text: i18nc("@option:check", "Inactive LEDs") | ||
58 | } | 53 | } | ||
54 | | ||||
59 | QtControls.CheckBox { | 55 | QtControls.CheckBox { | ||
60 | id: showSecondsCheckBox | 56 | id: showSecondsCheckBox | ||
61 | text: i18nc("@option:check", "Display seconds") | 57 | text: i18nc("@option:check", "Seconds") | ||
62 | } | 58 | } | ||
59 | | ||||
63 | QtControls.CheckBox { | 60 | QtControls.CheckBox { | ||
64 | id: showBcdFormatCheckBox | 61 | id: showBcdFormatCheckBox | ||
65 | text: i18nc("@option:check", "Display in BCD format (decimal)") | 62 | text: i18nc("@option:check", "In BCD format (decimal)") | ||
66 | } | | |||
67 | } | | |||
68 | } | 63 | } | ||
69 | 64 | | |||
70 | QtControls.GroupBox { | | |||
71 | Layout.fillWidth: true | | |||
72 | flat: true | | |||
73 | 65 | | |||
74 | title: i18nc("@title:group", "Colors") | 66 | Item { | ||
67 | Kirigami.FormData.isSection:true | ||||
68 | } | ||||
69 | | ||||
70 | RowLayout { | ||||
71 | Kirigami.FormData.label:i18n("Use custom color for:") | ||||
75 | 72 | | |||
76 | GridLayout { | | |||
77 | columns: 2 | | |||
78 | QtControls.CheckBox { | 73 | QtControls.CheckBox { | ||
79 | id: useCustomColorForActiveCheckBox | 74 | id: useCustomColorForActiveCheckBox | ||
80 | text: i18nc("@option:check", "Use custom color for active LEDs") | 75 | text: i18nc("@option:check", "Active LEDs") | ||
81 | } | 76 | } | ||
77 | | ||||
82 | KQuickControls.ColorButton { | 78 | KQuickControls.ColorButton { | ||
83 | id: customColorForActive | 79 | id: customColorForActive | ||
84 | enabled: useCustomColorForActiveCheckBox.checked | 80 | enabled: useCustomColorForActiveCheckBox.checked | ||
85 | } | 81 | } | ||
82 | } | ||||
83 | | ||||
84 | RowLayout { | ||||
86 | 85 | | |||
87 | QtControls.CheckBox { | 86 | QtControls.CheckBox { | ||
88 | id: useCustomColorForInactiveCheckBox | 87 | id: useCustomColorForInactiveCheckBox | ||
89 | text: i18nc("@option:check", "Use custom color for inactive LEDs") | 88 | text: i18nc("@option:check", "Inactive LEDs") | ||
90 | } | 89 | } | ||
90 | | ||||
91 | KQuickControls.ColorButton { | 91 | KQuickControls.ColorButton { | ||
92 | id:customColorForInactive | 92 | id:customColorForInactive | ||
93 | enabled: useCustomColorForInactiveCheckBox.checked | 93 | enabled: useCustomColorForInactiveCheckBox.checked | ||
94 | } | 94 | } | ||
95 | } | ||||
96 | | ||||
97 | RowLayout { | ||||
95 | 98 | | |||
96 | QtControls.CheckBox { | 99 | QtControls.CheckBox { | ||
97 | id: useCustomColorForGridCheckBox | 100 | id: useCustomColorForGridCheckBox | ||
98 | text: i18nc("@option:check", "Use custom color for grid") | 101 | text: i18nc("@option:check", "Grid") | ||
99 | } | 102 | } | ||
103 | | ||||
100 | KQuickControls.ColorButton { | 104 | KQuickControls.ColorButton { | ||
101 | id:customColorForGrid | 105 | id:customColorForGrid | ||
102 | enabled: useCustomColorForGridCheckBox.checked | 106 | enabled: useCustomColorForGridCheckBox.checked | ||
103 | } | 107 | } | ||
104 | } | 108 | } | ||
105 | } | 109 | } | ||
106 | | ||||
107 | Item { // tighten layout | | |||
108 | Layout.fillHeight: true | | |||
109 | } | | |||
110 | } | | |||
111 | No newline at end of file | |
Is this actually necessary for anything in the diff? If not, I would recommend against changing it.