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 @@ -22,19 +22,13 @@ import QtQuick.Layouts 1.0 import org.kde.kirigami 2.5 as Kirigami -Rectangle { - height: row.implicitHeight - - Kirigami.Theme.inherit: false - Kirigami.Theme.colorSet: Kirigami.Theme.View - color: index % 2 ? Kirigami.Theme.backgroundColor : palette.alternateBase - - RowLayout { +Kirigami.SwipeListItem { + hoverEnabled: true + onClicked: { + view.currentIndex = index; + } + contentItem: RowLayout { id: row - - x: spacing - width: parent.width - 2 * spacing - QtControls.RadioButton { property bool _exclusive: model.ExclusiveRole != "" property bool _toggled: false @@ -86,7 +80,7 @@ font.weight: Font.Bold text: i18n("Author: %1\nLicense: %2", model.AuthorNameRole, model.LicenseRole) - visible: false + visible: view.currentIndex === index wrapMode: Text.Wrap } @@ -108,33 +102,20 @@ } } } - - QtControls.Button { - icon.name: "video" + } + actions: [ + Kirigami.Action { visible: model.VideoRole.toString() !== "" - - onClicked: videoItem.showHide() - } - - QtControls.Button { + icon.name: "videoclip-amarok" + tooltip: i18nc("@info:tooltip", "Show Video") + onTriggered: videoItem.showHide() + }, + Kirigami.Action { + visible: model.ConfigurableRole enabled: model.StatusRole != Qt.Unchecked icon.name: "configure" - visible: model.ConfigurableRole - - onClicked: kcm.configure(model.ServiceNameRole, this) - } - - QtControls.Button { - icon.name: "dialog-information" - - onClicked: aboutItem.visible = !aboutItem.visible; + tooltip: i18nc("@info:tooltip", "Configure...") + onTriggered: kcm.configure(model.ServiceNameRole, this) } - } - - // Kirigami.Theme doesn't provide alternate color. - SystemPalette { - id: palette - - colorGroup: SystemPalette.Active - } + ] } 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 @@ -45,12 +45,14 @@ QtControls.Button { id: configureButton - QtControls.ToolTip.visible: hovered - QtControls.ToolTip.text: i18n("Configure filter") - + checkable: true icon.name: "configure" onClicked: menu.opened ? menu.close() : menu.open() + + QtControls.ToolTip { + text: i18n("Configure Filter") + } } QtControls.Menu { @@ -83,8 +85,6 @@ property var _buttonGroups: [] - spacing: Kirigami.Units.smallSpacing - model: Private.EffectsFilterProxyModel { id: searchModel @@ -97,20 +97,18 @@ } section.property: "CategoryRole" - section.delegate: Item { + section.delegate:Kirigami.AbstractListItem { width: effectsList.width - height: sectionText.implicitHeight + 2 * Kirigami.Units.smallSpacing - QtControls.Label { - id: sectionText + backgroundColor: Kirigami.Theme.backgroundColor + Kirigami.Theme.inherit: false + Kirigami.Theme.colorSet: Kirigami.Theme.Window - anchors.fill: parent + hoverEnabled: false + supportsMouseEvents: false - color: Kirigami.Theme.disabledTextColor - font.weight: Font.Bold - horizontalAlignment: Text.AlignHCenter + QtControls.Label { text: section - verticalAlignment: Text.AlignVCenter } }