Changeset View
Changeset View
Standalone View
Standalone View
applets/timer/package/contents/ui/configAppearance.qml
Show All 10 Lines | |||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.2 | 19 | import QtQuick 2.5 | ||
20 | import QtQuick.Controls 1.0 as QtControls | 20 | import QtQuick.Controls 2.5 as QQC2 | ||
21 | import QtQuick.Layouts 1.0 as QtLayouts | 21 | import QtQuick.Layouts 1.0 | ||
22 | 22 | | |||
23 | QtLayouts.ColumnLayout { | 23 | import org.kde.kirigami 2.5 as Kirigami | ||
24 | | ||||
25 | Kirigami.FormLayout { | ||||
24 | id: appearancePage | 26 | id: appearancePage | ||
25 | 27 | | |||
26 | property alias cfg_showTitle: showTitle.checked | 28 | property alias cfg_showTitle: showTitle.checked | ||
27 | property alias cfg_title: title.text | 29 | property alias cfg_title: title.text | ||
28 | 30 | | |||
29 | property alias cfg_showSeconds: showSeconds.checked | 31 | property alias cfg_showSeconds: showSeconds.checked | ||
30 | 32 | | |||
31 | property alias cfg_showNotification: showNotification.checked | 33 | property alias cfg_showNotification: showNotification.checked | ||
32 | property alias cfg_notificationText: notificationText.text | 34 | property alias cfg_notificationText: notificationText.text | ||
33 | 35 | | |||
34 | QtControls.GroupBox { | 36 | RowLayout { | ||
35 | id: displayGroup | 37 | Layout.fillWidth: true | ||
36 | 38 | | |||
37 | QtLayouts.Layout.fillWidth: true | 39 | Kirigami.FormData.label: i18nc("@title:label", "Display:") | ||
38 | flat: true | | |||
39 | 40 | | |||
40 | title: i18nc("@title:group", "Display") | 41 | QQC2.CheckBox { | ||
42 | id: showTitle | ||||
41 | 43 | | |||
42 | QtLayouts.ColumnLayout { | | |||
43 | anchors.fill: parent | | |||
44 | 44 | | |||
45 | QtControls.CheckBox { | 45 | text: i18nc("@option:check", "Show title:"); | ||
46 | id: showTitle | | |||
47 | text: i18nc("@option:check", "Show title"); | | |||
48 | onClicked: { | 46 | onClicked: { | ||
49 | if (checked) { | 47 | if (checked) { | ||
50 | title.forceActiveFocus(); | 48 | title.forceActiveFocus(); | ||
51 | } | 49 | } | ||
52 | } | 50 | } | ||
53 | } | 51 | } | ||
54 | QtLayouts.RowLayout { | 52 | | ||
55 | QtControls.Label { | 53 | QQC2.TextField { | ||
56 | enabled: showTitle.checked | | |||
57 | text: i18nc("@label:textbox", "Title:") | | |||
58 | } | | |||
59 | QtControls.TextField { | | |||
60 | id: title | 54 | id: title | ||
61 | QtLayouts.Layout.fillWidth: true | 55 | Layout.fillWidth: true | ||
62 | enabled: showTitle.checked | 56 | enabled: showTitle.checked | ||
63 | } | 57 | } | ||
64 | } | 58 | } | ||
65 | 59 | | |||
66 | QtControls.CheckBox { | 60 | QQC2.CheckBox { | ||
67 | id: showSeconds | 61 | id: showSeconds | ||
68 | text: i18nc("@option:check", "Show seconds"); | 62 | text: i18nc("@option:check", "Show seconds"); | ||
69 | } | 63 | } | ||
70 | } | | |||
71 | } | | |||
72 | 64 | | |||
73 | QtControls.GroupBox { | | |||
74 | id: notificationGroup | | |||
75 | 65 | | |||
76 | QtLayouts.Layout.fillWidth: true | 66 | Item { | ||
77 | flat: true | 67 | Kirigami.FormData.isSection: true | ||
68 | } | ||||
78 | 69 | | |||
79 | title: i18nc("@title:group", "Notifications") | | |||
80 | 70 | | |||
81 | QtLayouts.ColumnLayout { | 71 | RowLayout { | ||
82 | anchors.fill: parent | 72 | Layout.fillWidth: true | ||
83 | 73 | | |||
84 | QtControls.CheckBox { | 74 | Kirigami.FormData.label: i18nc("@title:label", "Notifications:") | ||
75 | | ||||
76 | QQC2.CheckBox { | ||||
85 | id: showNotification | 77 | id: showNotification | ||
86 | text: i18nc("@option:check", "Show notification"); | 78 | text: i18nc("@option:check", "Show notification text:"); | ||
87 | onClicked: { | 79 | onClicked: { | ||
88 | if (checked) { | 80 | if (checked) { | ||
89 | notificationText.forceActiveFocus(); | 81 | notificationText.forceActiveFocus(); | ||
90 | } | 82 | } | ||
91 | } | 83 | } | ||
92 | } | 84 | } | ||
93 | QtLayouts.RowLayout { | 85 | | ||
94 | QtControls.Label { | 86 | QQC2.TextField { | ||
95 | enabled: showNotification.checked | | |||
96 | text: i18nc("@label:textbox", "Text:") | | |||
97 | } | | |||
98 | QtControls.TextField { | | |||
99 | id: notificationText | 87 | id: notificationText | ||
100 | QtLayouts.Layout.fillWidth: true | 88 | Layout.fillWidth: true | ||
101 | enabled: showNotification.checked | 89 | enabled: showNotification.checked | ||
102 | } | 90 | } | ||
103 | } | 91 | } | ||
104 | } | 92 | } | ||
105 | } | | |||
106 | | ||||
107 | Item { // tighten layout | | |||
108 | QtLayouts.Layout.fillHeight: true | | |||
109 | } | | |||
110 | } | | |||
111 | 93 | |