Changeset View
Changeset View
Standalone View
Standalone View
applets/fuzzy-clock/package/contents/ui/configAppearance.qml
Show All 15 Lines | |||||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | 17 | * GNU General Public License for more details. | ||
18 | * | 18 | * | ||
19 | * You should have received a copy of the GNU General Public License | 19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program. If not, see <http://www.gnu.org/licenses/> | 20 | * along with this program. If not, see <http://www.gnu.org/licenses/> | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | import QtQuick 2.0 | 23 | import QtQuick 2.0 | ||
24 | import QtQuick.Controls 1.2 as QtControls | 24 | import QtQuick.Controls 1.2 as QQC1 | ||
25 | import QtQuick.Layouts 1.0 as QtLayouts | 25 | import QtQuick.Controls 2.5 as QQC2 | ||
26 | import QtQuick.Layouts 1.0 | ||||
27 | import org.kde.kirigami 2.5 as Kirigami | ||||
26 | 28 | | |||
27 | QtLayouts.ColumnLayout { | 29 | Kirigami.FormLayout { | ||
28 | id: appearancePage | 30 | id: appearancePage | ||
29 | 31 | | |||
30 | property alias cfg_boldText: boldCheckBox.checked | 32 | property alias cfg_boldText: boldCheckBox.checked | ||
31 | property alias cfg_italicText: italicCheckBox.checked | 33 | property alias cfg_italicText: italicCheckBox.checked | ||
32 | 34 | | |||
33 | property alias cfg_fuzzyness: fuzzyness.value | 35 | property alias cfg_fuzzyness: fuzzyness.value | ||
34 | 36 | | |||
35 | QtControls.GroupBox { | 37 | QQC2.CheckBox { | ||
36 | QtLayouts.Layout.fillWidth: true | | |||
37 | flat: true | | |||
38 | | ||||
39 | title: i18nc("@title:group", "Font") | | |||
40 | | ||||
41 | QtLayouts.ColumnLayout { | | |||
42 | QtControls.CheckBox { | | |||
43 | id: boldCheckBox | 38 | id: boldCheckBox | ||
39 | Kirigami.FormData.label: i18nc("@title:group", "Font:") | ||||
44 | text: i18nc("@option:check", "Bold text") | 40 | text: i18nc("@option:check", "Bold text") | ||
45 | } | 41 | } | ||
46 | 42 | | |||
47 | QtControls.CheckBox { | 43 | QQC2.CheckBox { | ||
48 | id: italicCheckBox | 44 | id: italicCheckBox | ||
49 | text: i18nc("@option:check", "Italic text") | 45 | text: i18nc("@option:check", "Italic text") | ||
50 | } | 46 | } | ||
51 | } | | |||
52 | } | | |||
53 | 47 | | |||
54 | QtControls.GroupBox { | 48 | Item { | ||
55 | QtLayouts.Layout.fillWidth: true | 49 | Kirigami.FormData.isSection: true | ||
56 | flat: true | | |||
57 | | ||||
58 | title: i18nc("@title:group", "Fuzzyness") | | |||
59 | | ||||
60 | QtLayouts.RowLayout { | | |||
61 | anchors.fill: parent | | |||
62 | | ||||
63 | QtControls.Label { | | |||
64 | text: i18nc("@item:inrange", "Accurate") | | |||
65 | } | 50 | } | ||
66 | 51 | | |||
67 | QtControls.Slider { | 52 | QQC1.Slider { // FIXME: port to QQC2 once we've fixed: https://bugs.kde.org/show_bug.cgi?id=405471 | ||
68 | id: fuzzyness | 53 | id: fuzzyness | ||
69 | QtLayouts.Layout.fillWidth: true | 54 | Kirigami.FormData.label: i18nc("@title:group", "Fuzzyness:") | ||
70 | minimumValue: 1 | 55 | minimumValue: 1 | ||
71 | maximumValue: 5 | 56 | maximumValue: 5 | ||
72 | stepSize: 1 | 57 | stepSize: 1 | ||
73 | tickmarksEnabled: true | 58 | tickmarksEnabled: true | ||
74 | } | 59 | } | ||
75 | 60 | | |||
76 | QtControls.Label { | 61 | RowLayout { | ||
77 | text: i18nc("@item:inrange", "Fuzzy") | 62 | Layout.fillWidth: true | ||
78 | } | 63 | | ||
64 | QQC2.Label { | ||||
65 | text: i18nc("@item:inrange", "Accurate") | ||||
79 | } | 66 | } | ||
67 | | ||||
68 | Item { | ||||
69 | Layout.fillWidth: true | ||||
80 | } | 70 | } | ||
81 | 71 | | |||
82 | Item { // tighten layout | 72 | QQC2.Label { | ||
83 | QtLayouts.Layout.fillHeight: true | 73 | text: i18nc("@item:inrange", "Fuzzy") | ||
74 | } | ||||
84 | } | 75 | } | ||
85 | } | 76 | } |