2019-02-02 20:49:38 +00:00
|
|
|
/*
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-FileCopyrightText: 2013 Antonis Tsiapaliokas <kok3rs@gmail.com>
|
|
|
|
SPDX-FileCopyrightText: 2019 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
*/
|
2019-02-02 20:49:38 +00:00
|
|
|
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
import QtQuick 2.5
|
|
|
|
import QtQuick.Controls 2.5 as QQC2
|
|
|
|
import QtQuick.Layouts 1.1
|
2019-02-02 20:49:38 +00:00
|
|
|
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
import org.kde.kirigami 2.5 as Kirigami
|
2021-01-20 10:44:21 +00:00
|
|
|
import org.kde.kcm 1.5 as KCM
|
2019-02-02 20:49:38 +00:00
|
|
|
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
Kirigami.SwipeListItem {
|
2019-08-04 09:31:43 +00:00
|
|
|
id: listItem
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
hoverEnabled: true
|
|
|
|
onClicked: {
|
|
|
|
view.currentIndex = index;
|
|
|
|
}
|
|
|
|
contentItem: RowLayout {
|
2019-02-02 20:49:38 +00:00
|
|
|
id: row
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
QQC2.RadioButton {
|
2019-02-02 20:49:38 +00:00
|
|
|
property bool _exclusive: model.ExclusiveRole != ""
|
|
|
|
property bool _toggled: false
|
|
|
|
|
2019-02-03 17:19:16 +00:00
|
|
|
checked: model.StatusRole
|
2019-02-02 20:49:38 +00:00
|
|
|
visible: _exclusive
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
QQC2.ButtonGroup.group: _exclusive ? effectsList.findButtonGroup(model.ExclusiveRole) : null
|
2019-02-02 20:49:38 +00:00
|
|
|
|
|
|
|
onToggled: {
|
2019-02-03 17:19:16 +00:00
|
|
|
model.StatusRole = checked ? Qt.Checked : Qt.Unchecked;
|
2019-02-02 20:49:38 +00:00
|
|
|
_toggled = true;
|
|
|
|
}
|
|
|
|
onClicked: {
|
|
|
|
// Uncheck the radio button if it's clicked.
|
|
|
|
if (checked && !_toggled) {
|
2019-02-03 17:19:16 +00:00
|
|
|
model.StatusRole = Qt.Unchecked;
|
2019-02-02 20:49:38 +00:00
|
|
|
}
|
|
|
|
_toggled = false;
|
|
|
|
}
|
2021-01-20 10:44:21 +00:00
|
|
|
|
|
|
|
KCM.SettingHighlighter {
|
|
|
|
highlight: model.EnabledByDefaultFunctionRole ? parent.checkState !== Qt.PartiallyChecked : parent.checked !== model.EnabledByDefaultRole
|
|
|
|
}
|
2019-02-02 20:49:38 +00:00
|
|
|
}
|
|
|
|
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
QQC2.CheckBox {
|
2019-02-03 17:19:16 +00:00
|
|
|
checkState: model.StatusRole
|
2019-02-02 20:49:38 +00:00
|
|
|
visible: model.ExclusiveRole == ""
|
|
|
|
|
2019-02-03 17:19:16 +00:00
|
|
|
onToggled: model.StatusRole = checkState
|
2021-01-20 10:44:21 +00:00
|
|
|
|
|
|
|
KCM.SettingHighlighter {
|
|
|
|
highlight: model.EnabledByDefaultFunctionRole ? parent.checkState !== Qt.PartiallyChecked : parent.checked !== model.EnabledByDefaultRole
|
|
|
|
}
|
2019-02-02 20:49:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
2019-08-04 09:31:43 +00:00
|
|
|
Layout.topMargin: Kirigami.Units.smallSpacing
|
|
|
|
Layout.bottomMargin: Kirigami.Units.smallSpacing
|
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
Kirigami.Heading {
|
2019-02-02 20:49:38 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
[kcmkwin/kwineffects] Use new Kirigami ListSectionHeader component
Summary: {F7344129}
Test Plan: Open the {nav Desktop Effects} KCM.
Reviewers: #kwin, #plasma, #vdg, davidedmundson, ngraham
Reviewed By: #kwin, #plasma, #vdg, davidedmundson, ngraham
Subscribers: ngraham, kwin, #vdg, #plasma, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23913
2019-09-12 17:17:27 +00:00
|
|
|
level: 5
|
2019-02-02 20:49:38 +00:00
|
|
|
text: model.NameRole
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
}
|
|
|
|
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
QQC2.Label {
|
2019-02-02 20:49:38 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
text: model.DescriptionRole
|
2019-08-04 09:31:43 +00:00
|
|
|
opacity: listItem.hovered ? 0.8 : 0.6
|
2019-02-02 20:49:38 +00:00
|
|
|
wrapMode: Text.Wrap
|
|
|
|
}
|
|
|
|
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
QQC2.Label {
|
2019-02-02 20:49:38 +00:00
|
|
|
id: aboutItem
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
text: i18n("Author: %1\nLicense: %2", model.AuthorNameRole, model.LicenseRole)
|
2019-08-04 09:31:43 +00:00
|
|
|
opacity: listItem.hovered ? 0.8 : 0.6
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
visible: view.currentIndex === index
|
2019-02-02 20:49:38 +00:00
|
|
|
wrapMode: Text.Wrap
|
|
|
|
}
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
id: videoItem
|
|
|
|
|
|
|
|
active: false
|
|
|
|
source: "Video.qml"
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
function showHide() {
|
|
|
|
if (!videoItem.active) {
|
|
|
|
videoItem.active = true;
|
|
|
|
videoItem.visible = true;
|
|
|
|
} else {
|
|
|
|
videoItem.active = false;
|
|
|
|
videoItem.visible = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
}
|
|
|
|
actions: [
|
|
|
|
Kirigami.Action {
|
2019-02-02 20:49:38 +00:00
|
|
|
visible: model.VideoRole.toString() !== ""
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
icon.name: "videoclip-amarok"
|
|
|
|
tooltip: i18nc("@info:tooltip", "Show/Hide Video")
|
|
|
|
onTriggered: videoItem.showHide()
|
|
|
|
},
|
|
|
|
Kirigami.Action {
|
|
|
|
visible: model.ConfigurableRole
|
2019-02-03 17:19:16 +00:00
|
|
|
enabled: model.StatusRole != Qt.Unchecked
|
2019-02-02 20:49:38 +00:00
|
|
|
icon.name: "configure"
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
tooltip: i18nc("@info:tooltip", "Configure...")
|
|
|
|
onTriggered: kcm.configure(model.ServiceNameRole, this)
|
2019-02-02 20:49:38 +00:00
|
|
|
}
|
[kcmkwin/kwineffects] Rework the Effects KCM
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
2019-08-03 07:41:36 +00:00
|
|
|
]
|
2019-02-02 20:49:38 +00:00
|
|
|
}
|