Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma
KWin
Commits
d425e78c
Commit
d425e78c
authored
Jan 20, 2021
by
Cyril Rossi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KCM KWinEffects highlight effects that are not in default state
add EnabledByDefaultFunctionRole in EffectsModel
parent
93ee2f68
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
kcmkwin/common/effectsmodel.cpp
kcmkwin/common/effectsmodel.cpp
+3
-0
kcmkwin/common/effectsmodel.h
kcmkwin/common/effectsmodel.h
+5
-1
kcmkwin/kwineffects/package/contents/ui/Effect.qml
kcmkwin/kwineffects/package/contents/ui/Effect.qml
+9
-0
No files found.
kcmkwin/common/effectsmodel.cpp
View file @
d425e78c
...
...
@@ -97,6 +97,7 @@ QHash<int, QByteArray> EffectsModel::roleNames() const
roleNames
[
ConfigurableRole
]
=
"ConfigurableRole"
;
roleNames
[
ScriptedRole
]
=
QByteArrayLiteral
(
"ScriptedRole"
);
roleNames
[
EnabledByDefaultRole
]
=
"EnabledByDefaultRole"
;
roleNames
[
EnabledByDefaultFunctionRole
]
=
"EnabledByDefaultFunctionRole"
;
roleNames
[
ConfigModuleRole
]
=
"ConfigModuleRole"
;
return
roleNames
;
}
...
...
@@ -175,6 +176,8 @@ QVariant EffectsModel::data(const QModelIndex &index, int role) const
return
effect
.
kind
==
Kind
::
Scripted
;
case
EnabledByDefaultRole
:
return
effect
.
enabledByDefault
;
case
EnabledByDefaultFunctionRole
:
return
effect
.
enabledByDefaultFunction
;
case
ConfigModuleRole
:
return
effect
.
configModule
;
default:
...
...
kcmkwin/common/effectsmodel.h
View file @
d425e78c
...
...
@@ -108,7 +108,11 @@ public:
/**
* Id of the effect's config module, empty if the effect has no config.
*/
ConfigModuleRole
ConfigModuleRole
,
/**
* Whether the effect has a function to determine if the effect is enabled by default.
*/
EnabledByDefaultFunctionRole
,
};
/**
...
...
kcmkwin/kwineffects/package/contents/ui/Effect.qml
View file @
d425e78c
...
...
@@ -11,6 +11,7 @@ import QtQuick.Controls 2.5 as QQC2
import
QtQuick
.
Layouts
1.1
import
org
.
kde
.
kirigami
2.5
as
Kirigami
import
org
.
kde
.
kcm
1.5
as
KCM
Kirigami.SwipeListItem
{
id
:
listItem
...
...
@@ -39,6 +40,10 @@ Kirigami.SwipeListItem {
}
_toggled
=
false
;
}
KCM.SettingHighlighter
{
highlight
:
model
.
EnabledByDefaultFunctionRole
?
parent
.
checkState
!==
Qt
.
PartiallyChecked
:
parent
.
checked
!==
model
.
EnabledByDefaultRole
}
}
QQC2.CheckBox
{
...
...
@@ -46,6 +51,10 @@ Kirigami.SwipeListItem {
visible
:
model
.
ExclusiveRole
==
""
onToggled
:
model
.
StatusRole
=
checkState
KCM.SettingHighlighter
{
highlight
:
model
.
EnabledByDefaultFunctionRole
?
parent
.
checkState
!==
Qt
.
PartiallyChecked
:
parent
.
checked
!==
model
.
EnabledByDefaultRole
}
}
ColumnLayout
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment