diff --git a/applets/comic/package/contents/config/config.qml b/applets/comic/package/contents/config/config.qml --- a/applets/comic/package/contents/config/config.qml +++ b/applets/comic/package/contents/config/config.qml @@ -28,7 +28,7 @@ } ConfigCategory { name: i18nc("@title", "Appearance") - icon: "image" + icon: "preferences-desktop-color" source: "configAppearance.qml" } ConfigCategory { diff --git a/applets/comic/package/contents/ui/configAdvanced.qml b/applets/comic/package/contents/ui/configAdvanced.qml --- a/applets/comic/package/contents/ui/configAdvanced.qml +++ b/applets/comic/package/contents/ui/configAdvanced.qml @@ -17,14 +17,17 @@ */ import QtQuick 2.0 -import QtQuick.Controls 1.1 as Controls +import QtQuick.Controls 2.5 as Controls import QtQuick.Layouts 1.1 as Layouts import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.5 as Kirigami -Layouts.ColumnLayout { +Kirigami.FormLayout { id: root + anchors.left: parent.left + anchors.right: parent.right signal configurationChanged @@ -41,42 +44,23 @@ maxComicLimit.value = plasmoid.nativeInterface.maxComicLimit; } - Controls.GroupBox { - Layouts.Layout.fillWidth: true - flat: true + Layouts.RowLayout { + Kirigami.FormData.label: i18nc("@label:spinbox", "Comic cache:") - title: i18nc("@title:group", "Cache") - - Layouts.RowLayout { - Layouts.Layout.alignment: Qt.AlignRight - Controls.Label { - text: i18nc("@label:spinbox", "Comic cache:") - } - Controls.SpinBox { - id: maxComicLimit - Layouts.Layout.minimumWidth: units.gridUnit * 8 - suffix: i18nc("@item:valuesuffix spacing to number + unit", " strips per comic") - stepSize: 1 - onValueChanged: root.configurationChanged(); - } + Controls.SpinBox { + id: maxComicLimit + stepSize: 1 + onValueChanged: root.configurationChanged(); } - } - Controls.GroupBox { - Layouts.Layout.fillWidth: true - flat: true - - title: i18nc("@title:group", "Error Handling") - Layouts.ColumnLayout { - Controls.CheckBox { - id: showErrorPicture - text: i18nc("@option:check", "Display error when getting comic failed") - onCheckedChanged: root.configurationChanged(); - } + Controls.Label { + text: i18ncp("@item:valuesuffix spacing to number + unit", "strip per comic", "strips per comic") } } - Item { - Layouts.Layout.fillHeight: true + Controls.CheckBox { + id: showErrorPicture + text: i18nc("@option:check", "Display error when downloading comic fails") + onCheckedChanged: root.configurationChanged(); } } diff --git a/applets/comic/package/contents/ui/configAppearance.qml b/applets/comic/package/contents/ui/configAppearance.qml --- a/applets/comic/package/contents/ui/configAppearance.qml +++ b/applets/comic/package/contents/ui/configAppearance.qml @@ -17,14 +17,17 @@ */ import QtQuick 2.1 -import QtQuick.Controls 1.1 as Controls +import QtQuick.Controls 2.5 as Controls import QtQuick.Layouts 1.1 as Layouts import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.5 as Kirigami -Layouts.ColumnLayout { +Kirigami.FormLayout { id: root + anchors.left: parent.left + anchors.right: parent.right signal configurationChanged @@ -47,53 +50,46 @@ showUrl.checked = plasmoid.nativeInterface.showComicUrl; } + Controls.CheckBox { + id: showComicTitle + Kirigami.FormData.label: i18nc ("Heading for showing various elements of a comic", "Show:") + text: i18nc("@option:check", "Comic title") + onCheckedChanged: root.configurationChanged(); + } - Controls.GroupBox { - Layouts.Layout.fillWidth: true - flat: true - - title: i18nc("@title:group", "Navigation") + Controls.CheckBox { + id: showIdentifier + text: i18nc("@option:check", "Comic identifier") + onCheckedChanged: root.configurationChanged(); + } - Layouts.ColumnLayout { - Controls.CheckBox { - id: showArrowsOnOver - text: i18nc("@option:check", "Show arrows only on mouse-over") - onCheckedChanged: root.configurationChanged(); - } - } + Controls.CheckBox { + id: showAuthor + text: i18nc("@option:check", "Comic author") + onCheckedChanged: root.configurationChanged(); } - Controls.GroupBox { - Layouts.Layout.fillWidth: true - flat: true + Controls.CheckBox { + id: showUrl + text: i18nc("@option:check", "Comic URL") + onCheckedChanged: root.configurationChanged(); + } - title: i18nc("@title:group", "Information") + Item { + Kirigami.FormData.isSection: true + } - Layouts.ColumnLayout { - Controls.CheckBox { - id: showComicTitle - text: i18nc("@option:check", "Show comic title") - onCheckedChanged: root.configurationChanged(); - } - Controls.CheckBox { - id: showIdentifier - text: i18nc("@option:check", "Show comic identifier") - onCheckedChanged: root.configurationChanged(); - } - Controls.CheckBox { - id: showAuthor - text: i18nc("@option:check", "Show comic author") - onCheckedChanged: root.configurationChanged(); - } - Controls.CheckBox { - id: showUrl - text: i18nc("@option:check", "Show comic URL") - onCheckedChanged: root.configurationChanged(); - } - } + Controls.RadioButton { + id: alwaysShowArrows + Kirigami.FormData.label: i18n ("Show navigation buttons:") + text: i18nc("@option:check", "Always") + checked: !showArrowsOnOver.checked + onCheckedChanged: root.configurationChanged(); } - Item { - Layouts.Layout.fillHeight: true + Controls.RadioButton { + id: showArrowsOnOver + text: i18nc("@option:check", "Only on hover") + onCheckedChanged: root.configurationChanged(); } } diff --git a/applets/comic/package/contents/ui/configGeneral.qml b/applets/comic/package/contents/ui/configGeneral.qml --- a/applets/comic/package/contents/ui/configGeneral.qml +++ b/applets/comic/package/contents/ui/configGeneral.qml @@ -17,14 +17,16 @@ */ import QtQuick 2.0 -import QtQuick.Controls 1.1 as Controls +import QtQuick.Controls 2.5 as Controls import QtQuick.Layouts 1.1 as Layouts import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.5 as Kirigami - -Layouts.ColumnLayout { +Kirigami.FormLayout { id: root + anchors.left: parent.left + anchors.right: parent.right signal configurationChanged @@ -52,83 +54,71 @@ providerUpdateInterval.value = plasmoid.nativeInterface.providerUpdateInterval } - Controls.GroupBox { - Layouts.Layout.fillWidth: true - flat: true - - title: i18nc("@title:group", "Comic") - - Layouts.ColumnLayout { - Layouts.ColumnLayout { - id: providerColumn - Repeater { - model: plasmoid.nativeInterface.availableComicsModel - delegate: Controls.CheckBox { - id: checkbox - text: model.display - checked: model.checked - property string plugin: model.plugin - Component.onCompleted: { - checkbox.checked = plasmoid.nativeInterface.tabIdentifiers.indexOf(model.plugin) !== -1 - } - onCheckedChanged: root.configurationChanged(); - } + Item { + Kirigami.FormData.isSection: true + } + + Layouts.ColumnLayout { + id: providerColumn + Kirigami.FormData.label: i18nc("@title:group", "Comics:") + Kirigami.FormData.buddyFor: children[1] // 0 is the Repeater + + Repeater { + model: plasmoid.nativeInterface.availableComicsModel + delegate: Controls.CheckBox { + id: checkbox + text: model.display + checked: model.checked + property string plugin: model.plugin + Component.onCompleted: { + checkbox.checked = plasmoid.nativeInterface.tabIdentifiers.indexOf(model.plugin) !== -1 } - } - Item { - Layouts.Layout.fillWidth: true - Layouts.Layout.fillHeight: true - Layouts.Layout.minimumHeight: units.gridUnit * 2 - } - Controls.Button { - iconName: "get-hot-new-stuff" - text: i18nc("@action:button", "Get New Comics...") - onClicked: plasmoid.nativeInterface.getNewComics(); - } - Controls.CheckBox { - id: middleClickCheckBox - text: i18nc("@option:check", "Middle-click on the comic to show it at its original size") onCheckedChanged: root.configurationChanged(); } } } - Controls.GroupBox { - Layouts.Layout.fillWidth: true - flat: true - title: i18nc("@title:group", "Update") + Controls.Button { + icon.name: "get-hot-new-stuff" + text: i18nc("@action:button", "Get New Comics...") + onClicked: plasmoid.nativeInterface.getNewComics(); + } - Layouts.ColumnLayout { - Layouts.RowLayout { - Layouts.Layout.alignment: Qt.AlignRight - Controls.Label { - text: i18nc("@label:spinbox", "Automatically update comic plugins:") - } - Controls.SpinBox { - id: providerUpdateInterval - Layouts.Layout.minimumWidth: units.gridUnit * 8 - suffix: i18nc("@item:valuesuffix spacing to number + unit", " days") - stepSize: 1 - onValueChanged: root.configurationChanged(); - } - } - Layouts.RowLayout { - Layouts.Layout.alignment: Qt.AlignRight - Controls.Label { - text: i18nc("@label:spinbox", "Check for new comic strips:") - } - Controls.SpinBox { - id: checkNewComicStripsInterval - Layouts.Layout.minimumWidth: units.gridUnit * 8 - suffix: i18nc("@item:valuesuffix spacing to number + unit (minutes)", " min") - stepSize: 1 - onValueChanged: root.configurationChanged(); - } - } - } + Controls.CheckBox { + id: middleClickCheckBox + text: i18nc("@option:check", "Middle-click on comic to display at original size") + onCheckedChanged: root.configurationChanged(); } Item { - Layouts.Layout.fillHeight: true + Kirigami.FormData.isSection: true + } + + Layouts.RowLayout { + Kirigami.FormData.label: i18nc("@label:spinbox", "Check for new plugins every:") + + Controls.SpinBox { + id: providerUpdateInterval + stepSize: 1 + onValueChanged: root.configurationChanged(); + } + + Controls.Label { + text: i18ncp("@item:valuesuffix spacing to number + unit", "day", "days") + } + } + + Layouts.RowLayout { + Kirigami.FormData.label: i18nc("@label:spinbox", "Check for new comics every:") + + Controls.SpinBox { + id: checkNewComicStripsInterval + stepSize: 1 + onValueChanged: root.configurationChanged(); + } + + Controls.Label { + text: i18ncp("@item:valuesuffix spacing to number + unit (minutes)", "minute", "minutes") + } } }