diff --git a/kcmkwin/kwineffects/package/contents/ui/Effect.qml b/kcmkwin/kwineffects/package/contents/ui/Effect.qml --- a/kcmkwin/kwineffects/package/contents/ui/Effect.qml +++ b/kcmkwin/kwineffects/package/contents/ui/Effect.qml @@ -17,9 +17,10 @@ * */ -import QtQuick 2.1 -import QtQuick.Controls 2.5 as QtControls -import QtQuick.Layouts 1.0 +import QtQuick 2.5 +import QtQuick.Controls 2.5 as QQC2 +import QtQuick.Layouts 1.1 + import org.kde.kirigami 2.5 as Kirigami Kirigami.SwipeListItem { @@ -29,13 +30,13 @@ } contentItem: RowLayout { id: row - QtControls.RadioButton { + QQC2.RadioButton { property bool _exclusive: model.ExclusiveRole != "" property bool _toggled: false checked: model.StatusRole visible: _exclusive - QtControls.ButtonGroup.group: _exclusive ? effectsList.findButtonGroup(model.ExclusiveRole) : null + QQC2.ButtonGroup.group: _exclusive ? effectsList.findButtonGroup(model.ExclusiveRole) : null onToggled: { model.StatusRole = checked ? Qt.Checked : Qt.Unchecked; @@ -50,30 +51,30 @@ } } - QtControls.CheckBox { + QQC2.CheckBox { checkState: model.StatusRole visible: model.ExclusiveRole == "" onToggled: model.StatusRole = checkState } ColumnLayout { - QtControls.Label { + QQC2.Label { Layout.fillWidth: true font.weight: Font.Bold text: model.NameRole wrapMode: Text.Wrap } - QtControls.Label { + QQC2.Label { Layout.fillWidth: true text: model.DescriptionRole wrapMode: Text.Wrap } - QtControls.Label { + QQC2.Label { id: aboutItem Layout.fillWidth: true @@ -107,7 +108,7 @@ Kirigami.Action { visible: model.VideoRole.toString() !== "" icon.name: "videoclip-amarok" - tooltip: i18nc("@info:tooltip", "Show Video") + tooltip: i18nc("@info:tooltip", "Show/Hide Video") onTriggered: videoItem.showHide() }, Kirigami.Action { diff --git a/kcmkwin/kwineffects/package/contents/ui/Video.qml b/kcmkwin/kwineffects/package/contents/ui/Video.qml --- a/kcmkwin/kwineffects/package/contents/ui/Video.qml +++ b/kcmkwin/kwineffects/package/contents/ui/Video.qml @@ -18,10 +18,10 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * **************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls 2.0 as QQC2 -import QtQuick.Layouts 1.0 + +import QtQuick 2.5 +import QtQuick.Controls 2.5 as QQC2 +import QtQuick.Layouts 1.1 import QtMultimedia 5.0 as Multimedia Multimedia.Video { @@ -35,11 +35,11 @@ visible: videoItem.status == Multimedia.MediaPlayer.Loading running: true } - Button { + QQC2.Button { id: replayButton visible: false anchors.centerIn: parent - iconName: "media-playback-start" + icon.name: "media-playback-start" onClicked: { replayButton.visible = false; videoItem.play(); diff --git a/kcmkwin/kwineffects/package/contents/ui/main.qml b/kcmkwin/kwineffects/package/contents/ui/main.qml --- a/kcmkwin/kwineffects/package/contents/ui/main.qml +++ b/kcmkwin/kwineffects/package/contents/ui/main.qml @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -import QtQuick 2.1 -import QtQuick.Controls 2.5 as QtControls +import QtQuick 2.5 +import QtQuick.Controls 2.5 as QQC2 import QtQuick.Layouts 1.1 + import org.kde.kcm 1.2 import org.kde.kconfig 1.0 import org.kde.kirigami 2.8 as Kirigami @@ -28,7 +29,7 @@ ConfigModule.quickHelp: i18n("This module lets you configure desktop effects.") header: ColumnLayout { - QtControls.Label { + QQC2.Label { Layout.fillWidth: true elide: Text.ElideRight @@ -42,37 +43,37 @@ Layout.fillWidth: true } - QtControls.Button { - id: configureButton + QQC2.ToolButton { + id: filterButton - checkable: true - icon.name: "configure" + icon.name: "view-filter" - onClicked: menu.opened ? menu.close() : menu.open() + checkable: true + checked: menu.opened + onClicked: menu.popup(parent.width - menu.width, filterButton.height) - QtControls.ToolTip { + QQC2.ToolTip { text: i18n("Configure Filter") } } - QtControls.Menu { + QQC2.Menu { id: menu - x: parent.width - width - y: configureButton.height + modal: true - QtControls.MenuItem { + QQC2.MenuItem { checkable: true checked: searchModel.excludeUnsupported - text: i18n("Exclude Desktop Effects not supported by the Compositor") + text: i18n("Exclude unsupported effects") onToggled: searchModel.excludeUnsupported = checked } - QtControls.MenuItem { + QQC2.MenuItem { checkable: true checked: searchModel.excludeInternal - text: i18n("Exclude internal Desktop Effects") + text: i18n("Exclude unsupported effects") onToggled: searchModel.excludeInternal = checked } @@ -107,7 +108,8 @@ hoverEnabled: false supportsMouseEvents: false - QtControls.Label { + Kirigami.Heading { + level: 3 text: section } } @@ -120,7 +122,7 @@ } let group = Qt.createQmlObject( - 'import QtQuick 2.1;' + + 'import QtQuick 2.5;' + 'import QtQuick.Controls 2.5;' + 'ButtonGroup {}', effectsList, @@ -137,7 +139,7 @@ RowLayout { Layout.alignment: Qt.AlignRight - QtControls.Button { + QQC2.Button { icon.name: "get-hot-new-stuff" text: i18n("Get New Desktop Effects...") visible: KAuthorized.authorize("ghns")