2019-02-02 20:49:38 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 Antonis Tsiapaliokas <kok3rs@gmail.com>
|
2019-09-29 14:03:25 +00:00
|
|
|
* Copyright (C) 2019 Vlad Zahorodnii <vladzzag@gmail.com>
|
2019-02-02 20:49:38 +00:00
|
|
|
*
|
|
|
|
* 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, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
[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
|
2019-02-02 20:49:38 +00:00
|
|
|
import QtQuick.Layouts 1.1
|
[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
|
|
|
import org.kde.kcm 1.2
|
|
|
|
import org.kde.kconfig 1.0
|
[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
|
|
|
import org.kde.kirigami 2.10 as Kirigami
|
2019-02-02 20:49:38 +00:00
|
|
|
import org.kde.private.kcms.kwin.effects 1.0 as Private
|
|
|
|
|
|
|
|
ScrollViewKCM {
|
|
|
|
ConfigModule.quickHelp: i18n("This module lets you configure desktop effects.")
|
|
|
|
|
|
|
|
header: ColumnLayout {
|
[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
|
|
|
|
|
|
|
|
elide: Text.ElideRight
|
|
|
|
text: i18n("Hint: To find out or configure how to activate an effect, look at the effect's settings.")
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
2019-07-05 09:32:25 +00:00
|
|
|
Kirigami.SearchField {
|
2019-02-02 20:49:38 +00:00
|
|
|
id: searchField
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
|
[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.ToolButton {
|
|
|
|
id: filterButton
|
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
|
|
|
icon.name: "view-filter"
|
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
|
|
|
checkable: true
|
|
|
|
checked: menu.opened
|
|
|
|
onClicked: menu.popup(filterButton, filterButton.width - menu.width, filterButton.height)
|
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.ToolTip {
|
|
|
|
text: i18n("Configure Filter")
|
|
|
|
}
|
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.Menu {
|
2019-02-02 20:49:38 +00:00
|
|
|
id: menu
|
|
|
|
|
[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
|
|
|
modal: true
|
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.MenuItem {
|
2019-02-02 20:49:38 +00:00
|
|
|
checkable: true
|
|
|
|
checked: searchModel.excludeUnsupported
|
[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
|
|
|
text: i18n("Exclude unsupported effects")
|
2019-02-02 20:49:38 +00:00
|
|
|
|
|
|
|
onToggled: searchModel.excludeUnsupported = checked
|
|
|
|
}
|
|
|
|
|
[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.MenuItem {
|
2019-02-02 20:49:38 +00:00
|
|
|
checkable: true
|
|
|
|
checked: searchModel.excludeInternal
|
[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
|
|
|
text: i18n("Exclude internal effects")
|
2019-02-02 20:49:38 +00:00
|
|
|
|
|
|
|
onToggled: searchModel.excludeInternal = checked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
view: ListView {
|
|
|
|
id: effectsList
|
|
|
|
|
|
|
|
property var _buttonGroups: []
|
|
|
|
|
|
|
|
model: Private.EffectsFilterProxyModel {
|
|
|
|
id: searchModel
|
|
|
|
|
|
|
|
query: searchField.text
|
|
|
|
sourceModel: kcm.effectsModel
|
|
|
|
}
|
|
|
|
|
|
|
|
delegate: Effect {
|
|
|
|
width: effectsList.width
|
|
|
|
}
|
|
|
|
|
|
|
|
section.property: "CategoryRole"
|
[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
|
|
|
section.delegate: Kirigami.ListSectionHeader {
|
2019-02-02 20:49:38 +00:00
|
|
|
width: effectsList.width
|
[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
|
|
|
text: section
|
2019-02-02 20:49:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function findButtonGroup(name) {
|
|
|
|
for (let item of effectsList._buttonGroups) {
|
|
|
|
if (item.name == name) {
|
|
|
|
return item.group;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
let group = Qt.createQmlObject(
|
[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;' +
|
2019-02-02 20:49:38 +00:00
|
|
|
'import QtQuick.Controls 2.5;' +
|
|
|
|
'ButtonGroup {}',
|
|
|
|
effectsList,
|
|
|
|
"dynamicButtonGroup" + effectsList._buttonGroups.length
|
|
|
|
);
|
|
|
|
|
|
|
|
effectsList._buttonGroups.push({ name, group });
|
|
|
|
|
|
|
|
return group;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: ColumnLayout {
|
|
|
|
RowLayout {
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
|
[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.Button {
|
2019-02-02 20:49:38 +00:00
|
|
|
icon.name: "get-hot-new-stuff"
|
|
|
|
text: i18n("Get New Desktop Effects...")
|
|
|
|
visible: KAuthorized.authorize("ghns")
|
|
|
|
|
|
|
|
onClicked: kcm.openGHNS(this)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|