Commit 781e66cb authored by Filip Fila's avatar Filip Fila 🌆

[dict] Modernize configuration window

Summary:
This patch bumps dictionary's settings QtQuickControls from version 1 to 2.

It also changes the configuration category's icon to match the applet's one.

NOTE: It would be good if we could get keyboard navigation to work, it doesn't seem to want to be doing it now.

Test Plan:
Before:
{F6791492}

After:
{F6816990}

Reviewers: dfaure, ngraham, #vdg, #plasma, davidedmundson, mart

Reviewed By: ngraham, #vdg, #plasma, davidedmundson, mart

Subscribers: GB_2, mart, broulik, plasma-devel

Tags: #plasma

Maniphest Tasks: T10586

Differential Revision: https://phabricator.kde.org/D20797
parent 2a2e7378
......@@ -5,7 +5,7 @@ import org.kde.plasma.configuration 2.0
ConfigModel {
ConfigCategory {
name: i18nc("@title", "Dictionaries")
icon: "image"
icon: "accessories-dictionary"
source: "ConfigDictionaries.qml"
}
}
......@@ -16,62 +16,53 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
*/
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick 2.7
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.2
import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.private.dict 1.0
ColumnLayout {
id: root
property string cfg_dictionary: ""
DictionariesModel {
id: dictionariesModel
}
SystemPalette {
id: syspal
}
Label {
Kirigami.Heading {
Layout.fillWidth: true
level: 2
text: i18nc("@label:listbox", "Available dictionaries:")
}
ScrollView {
Layout.fillWidth: true
Layout.fillHeight: true
frameVisible: true
contentWidth: listView.implicitWidth
contentHeight: listView.implicitHeight
Component.onCompleted: background.visible = true;
ListView {
width: parent.width
id: listView
model: dictionariesModel
delegate: Item {
width: parent.width
height: pathText.height
Rectangle {
delegate: Control {
background: Rectangle {
id: highlight
anchors.fill: parent
implicitWidth: root.width - units.largeSpacing
visible: model.id == root.cfg_dictionary
color: syspal.highlight
color: Kirigami.Theme.highlightColor
}
RowLayout {
id: textLayout
anchors.fill: parent
/*Text { text: model.id }*/
Text {
id: pathText
Layout.fillWidth: true
text: model.description
color: model.id == root.cfg_dictionary ? syspal.highlightedText : syspal.text
}
contentItem: Label {
id: pathText
Layout.fillWidth: true
text: model.description
color: model.id == root.cfg_dictionary ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
}
MouseArea {
anchors.fill: parent
onClicked: root.cfg_dictionary = model.id
......
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