Commit e32e12df authored by Filip Fila's avatar Filip Fila 🌆

[fuzzy-clock] Port configuration window to QQC2 and Kirigami.FormLayout

Summary: This patch ports fuzzy-clock's configuration window to QQC2 and Kirigami.FormLayout

Test Plan:
Before:
{F6690452}

After:
{F6690453}

Reviewers: #plasma, #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: abetts, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19747
parent 1a171706
......@@ -21,10 +21,12 @@
*/
import QtQuick 2.0
import QtQuick.Controls 1.2 as QtControls
import QtQuick.Layouts 1.0 as QtLayouts
import QtQuick.Controls 1.2 as QQC1
import QtQuick.Controls 2.5 as QQC2
import QtQuick.Layouts 1.0
import org.kde.kirigami 2.5 as Kirigami
QtLayouts.ColumnLayout {
Kirigami.FormLayout {
id: appearancePage
property alias cfg_boldText: boldCheckBox.checked
......@@ -32,54 +34,43 @@ QtLayouts.ColumnLayout {
property alias cfg_fuzzyness: fuzzyness.value
QtControls.GroupBox {
QtLayouts.Layout.fillWidth: true
flat: true
title: i18nc("@title:group", "Font")
QtLayouts.ColumnLayout {
QtControls.CheckBox {
id: boldCheckBox
text: i18nc("@option:check", "Bold text")
}
QtControls.CheckBox {
id: italicCheckBox
text: i18nc("@option:check", "Italic text")
}
}
QQC2.CheckBox {
id: boldCheckBox
Kirigami.FormData.label: i18nc("@title:group", "Font:")
text: i18nc("@option:check", "Bold text")
}
QtControls.GroupBox {
QtLayouts.Layout.fillWidth: true
flat: true
QQC2.CheckBox {
id: italicCheckBox
text: i18nc("@option:check", "Italic text")
}
title: i18nc("@title:group", "Fuzzyness")
Item {
Kirigami.FormData.isSection: true
}
QtLayouts.RowLayout {
anchors.fill: parent
QQC1.Slider { // FIXME: port to QQC2 once we've fixed: https://bugs.kde.org/show_bug.cgi?id=405471
id: fuzzyness
Kirigami.FormData.label: i18nc("@title:group", "Fuzzyness:")
minimumValue: 1
maximumValue: 5
stepSize: 1
tickmarksEnabled: true
}
QtControls.Label {
text: i18nc("@item:inrange", "Accurate")
}
RowLayout {
Layout.fillWidth: true
QtControls.Slider {
id: fuzzyness
QtLayouts.Layout.fillWidth: true
minimumValue: 1
maximumValue: 5
stepSize: 1
tickmarksEnabled: true
}
QQC2.Label {
text: i18nc("@item:inrange", "Accurate")
}
QtControls.Label {
text: i18nc("@item:inrange", "Fuzzy")
}
Item {
Layout.fillWidth: true
}
}
Item { // tighten layout
QtLayouts.Layout.fillHeight: true
QQC2.Label {
text: i18nc("@item:inrange", "Fuzzy")
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment