diff --git a/applets/dict/package/contents/config/config.qml b/applets/dict/package/contents/config/config.qml index 38f97dc2a..fc624de2f 100644 --- a/applets/dict/package/contents/config/config.qml +++ b/applets/dict/package/contents/config/config.qml @@ -1,11 +1,11 @@ import QtQuick 2.1 import org.kde.plasma.configuration 2.0 ConfigModel { ConfigCategory { name: i18nc("@title", "Dictionaries") - icon: "image" + icon: "accessories-dictionary" source: "ConfigDictionaries.qml" } } diff --git a/applets/dict/package/contents/ui/ConfigDictionaries.qml b/applets/dict/package/contents/ui/ConfigDictionaries.qml index 30ba8b0f1..47ab74289 100644 --- a/applets/dict/package/contents/ui/ConfigDictionaries.qml +++ b/applets/dict/package/contents/ui/ConfigDictionaries.qml @@ -1,82 +1,73 @@ /* * Copyright 2017 David Faure * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * 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 } } } } }