1 |
commit: 421fd89da5df5796db415c3eb4a294b18fca1277 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 4 20:00:23 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 4 20:17:49 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=421fd89d |
7 |
|
8 |
kde-plasma/plasma-workspace: Backport 5.22 adaptive opacity feature |
9 |
|
10 |
This raises the minimum required KDE Frameworks version to 5.82.0 |
11 |
which is carrying the necessary backport in kde-frameworks/plasma. |
12 |
|
13 |
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=434202 |
14 |
KDe-bug: https://bugs.kde.org/show_bug.cgi?id=434285 |
15 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
16 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
17 |
|
18 |
...workspace-5.21.5-transparency-panelConfig.patch | 27 ++ |
19 |
.../plasma-workspace-5.21.5-transparency.patch | 376 +++++++++++++++++++++ |
20 |
.../plasma-workspace-5.21.5.ebuild | 6 +- |
21 |
3 files changed, 408 insertions(+), 1 deletion(-) |
22 |
|
23 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-transparency-panelConfig.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-transparency-panelConfig.patch |
24 |
new file mode 100644 |
25 |
index 0000000000..fb7993e6db |
26 |
--- /dev/null |
27 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-transparency-panelConfig.patch |
28 |
@@ -0,0 +1,27 @@ |
29 |
+From 1cf02aad96bfe650a1f4d1465ae15234205fb061 Mon Sep 17 00:00:00 2001 |
30 |
+From: Bharadwaj Raju <bharadwaj.raju777@××××××××××.com> |
31 |
+Date: Mon, 26 Apr 2021 18:47:51 +0000 |
32 |
+Subject: [PATCH] Load panelOpacity from config parent, not from config |
33 |
+ |
34 |
+BUG: 434285 |
35 |
+FIXED-IN: 5.22 |
36 |
+--- |
37 |
+ shell/panelview.cpp | 2 +- |
38 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
39 |
+ |
40 |
+diff --git a/shell/panelview.cpp b/shell/panelview.cpp |
41 |
+index 5ed743024..4533e856f 100644 |
42 |
+--- a/shell/panelview.cpp |
43 |
++++ b/shell/panelview.cpp |
44 |
+@@ -633,7 +633,7 @@ void PanelView::restore() |
45 |
+ // the place for this config key is changed in Plasma 5.9 |
46 |
+ // Do NOT use readConfigValueWithFallBack |
47 |
+ setVisibilityMode((VisibilityMode)panelConfig.parent().readEntry<int>("panelVisibility", panelConfig.readEntry<int>("panelVisibility", (int)NormalPanel))); |
48 |
+- setOpacityMode((OpacityMode)readConfigValueWithFallBack("panelOpacity", PanelView::OpacityMode::Adaptive)); |
49 |
++ setOpacityMode((OpacityMode)config().parent().readEntry<int>("panelOpacity", configDefaults().parent().readEntry<int>("panelOpacity", PanelView::OpacityMode::Adaptive))); |
50 |
+ m_initCompleted = true; |
51 |
+ resizePanel(); |
52 |
+ positionPanel(); |
53 |
+-- |
54 |
+GitLab |
55 |
+ |
56 |
|
57 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-transparency.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-transparency.patch |
58 |
new file mode 100644 |
59 |
index 0000000000..1a925a137c |
60 |
--- /dev/null |
61 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-transparency.patch |
62 |
@@ -0,0 +1,376 @@ |
63 |
+From 7db8d5ee551f30576588d31470fe287b6ad2adcd Mon Sep 17 00:00:00 2001 |
64 |
+From: =?UTF-8?q?Niccol=C3=B2=20Venerandi?= <niccolo@×××××××××.com> |
65 |
+Date: Mon, 1 Mar 2021 22:14:43 +0000 |
66 |
+Subject: [PATCH] Add support for adaptive opacity panels |
67 |
+ |
68 |
+Co-authored-by: Jan Blackquill <uhhadd@×××××.com> |
69 |
+--- |
70 |
+ libtaskmanager/taskfilterproxymodel.cpp | 26 ++++++++++++++++++ |
71 |
+ libtaskmanager/taskfilterproxymodel.h | 19 ++++++++++++++ |
72 |
+ libtaskmanager/tasksmodel.cpp | 11 ++++++++ |
73 |
+ libtaskmanager/tasksmodel.h | 19 ++++++++++++++ |
74 |
+ shell/panelconfigview.cpp | 11 ++++++++ |
75 |
+ shell/panelconfigview.h | 5 ++++ |
76 |
+ shell/panelview.cpp | 35 +++++++++++++++++++++++++ |
77 |
+ shell/panelview.h | 28 ++++++++++++++++++++ |
78 |
+ 8 files changed, 154 insertions(+) |
79 |
+ |
80 |
+diff --git a/libtaskmanager/taskfilterproxymodel.cpp b/libtaskmanager/taskfilterproxymodel.cpp |
81 |
+index 37a3076fd..6bb27537a 100644 |
82 |
+--- a/libtaskmanager/taskfilterproxymodel.cpp |
83 |
++++ b/libtaskmanager/taskfilterproxymodel.cpp |
84 |
+@@ -40,6 +40,7 @@ public: |
85 |
+ bool filterByScreen = false; |
86 |
+ bool filterByActivity = false; |
87 |
+ bool filterNotMinimized = false; |
88 |
++ bool filterNotMaximized = false; |
89 |
+ bool filterSkipTaskbar = true; |
90 |
+ bool filterSkipPager = false; |
91 |
+ |
92 |
+@@ -185,6 +186,22 @@ void TaskFilterProxyModel::setFilterNotMinimized(bool filter) |
93 |
+ } |
94 |
+ } |
95 |
+ |
96 |
++bool TaskFilterProxyModel::filterNotMaximized() const |
97 |
++{ |
98 |
++ return d->filterNotMaximized; |
99 |
++} |
100 |
++ |
101 |
++void TaskFilterProxyModel::setFilterNotMaximized(bool filter) |
102 |
++{ |
103 |
++ if (d->filterNotMaximized != filter) { |
104 |
++ d->filterNotMaximized = filter; |
105 |
++ |
106 |
++ invalidateFilter(); |
107 |
++ |
108 |
++ emit filterNotMaximizedChanged(); |
109 |
++ } |
110 |
++} |
111 |
++ |
112 |
+ bool TaskFilterProxyModel::filterSkipTaskbar() const |
113 |
+ { |
114 |
+ return d->filterSkipTaskbar; |
115 |
+@@ -301,6 +318,15 @@ bool TaskFilterProxyModel::acceptsRow(int sourceRow) const |
116 |
+ } |
117 |
+ } |
118 |
+ |
119 |
++ // Filter not maximized. |
120 |
++ if (d->filterNotMaximized) { |
121 |
++ bool isMaximized = sourceIdx.data(AbstractTasksModel::IsMaximized).toBool(); |
122 |
++ |
123 |
++ if (!isMaximized) { |
124 |
++ return false; |
125 |
++ } |
126 |
++ } |
127 |
++ |
128 |
+ return true; |
129 |
+ } |
130 |
+ |
131 |
+diff --git a/libtaskmanager/taskfilterproxymodel.h b/libtaskmanager/taskfilterproxymodel.h |
132 |
+index 7ad2cb9ce..88ba3adab 100644 |
133 |
+--- a/libtaskmanager/taskfilterproxymodel.h |
134 |
++++ b/libtaskmanager/taskfilterproxymodel.h |
135 |
+@@ -52,6 +52,7 @@ class TASKMANAGER_EXPORT TaskFilterProxyModel : public QSortFilterProxyModel, pu |
136 |
+ Q_PROPERTY(bool filterByScreen READ filterByScreen WRITE setFilterByScreen NOTIFY filterByScreenChanged) |
137 |
+ Q_PROPERTY(bool filterByActivity READ filterByActivity WRITE setFilterByActivity NOTIFY filterByActivityChanged) |
138 |
+ Q_PROPERTY(bool filterNotMinimized READ filterNotMinimized WRITE setFilterNotMinimized NOTIFY filterNotMinimizedChanged) |
139 |
++ Q_PROPERTY(bool filterNotMaximized READ filterNotMaximized WRITE setFilterNotMaximized NOTIFY filterNotMaximizedChanged) |
140 |
+ Q_PROPERTY(bool filterSkipTaskbar READ filterSkipTaskbar WRITE setFilterSkipTaskbar NOTIFY filterSkipTaskbarChanged) |
141 |
+ Q_PROPERTY(bool filterSkipPager READ filterSkipPager WRITE setFilterSkipPager NOTIFY filterSkipPagerChanged) |
142 |
+ |
143 |
+@@ -212,6 +213,23 @@ public: |
144 |
+ **/ |
145 |
+ void setFilterNotMinimized(bool filter); |
146 |
+ |
147 |
++ /** |
148 |
++ * Whether non-maximized tasks should be filtered. Defaults to |
149 |
++ * @c false. |
150 |
++ * |
151 |
++ * @see setFilterNotMaximized |
152 |
++ * @returns @c true if non-maximized tasks should be filtered. |
153 |
++ **/ |
154 |
++ bool filterNotMaximized() const; |
155 |
++ |
156 |
++ /** |
157 |
++ * Set whether non-maximized tasks should be filtered. |
158 |
++ * |
159 |
++ * @see filterNotMaximized |
160 |
++ * @param filter Whether non-maximized tasks should be filtered. |
161 |
++ **/ |
162 |
++ void setFilterNotMaximized(bool filter); |
163 |
++ |
164 |
+ /** |
165 |
+ * Whether tasks which should be omitted from 'task bars' should be |
166 |
+ * filtered. Defaults to @c true. |
167 |
+@@ -285,6 +303,7 @@ Q_SIGNALS: |
168 |
+ void filterByScreenChanged() const; |
169 |
+ void filterByActivityChanged() const; |
170 |
+ void filterNotMinimizedChanged() const; |
171 |
++ void filterNotMaximizedChanged() const; |
172 |
+ void filterSkipTaskbarChanged() const; |
173 |
+ void filterSkipPagerChanged() const; |
174 |
+ void demandingAttentionSkipsFiltersChanged() const; |
175 |
+diff --git a/libtaskmanager/tasksmodel.cpp b/libtaskmanager/tasksmodel.cpp |
176 |
+index c6e66926b..11eb53fdf 100644 |
177 |
+--- a/libtaskmanager/tasksmodel.cpp |
178 |
++++ b/libtaskmanager/tasksmodel.cpp |
179 |
+@@ -302,6 +302,7 @@ void TasksModel::Private::initModels() |
180 |
+ QObject::connect(filterProxyModel, &TaskFilterProxyModel::filterByScreenChanged, q, &TasksModel::filterByScreenChanged); |
181 |
+ QObject::connect(filterProxyModel, &TaskFilterProxyModel::filterByActivityChanged, q, &TasksModel::filterByActivityChanged); |
182 |
+ QObject::connect(filterProxyModel, &TaskFilterProxyModel::filterNotMinimizedChanged, q, &TasksModel::filterNotMinimizedChanged); |
183 |
++ QObject::connect(filterProxyModel, &TaskFilterProxyModel::filterNotMaximizedChanged, q, &TasksModel::filterNotMaximizedChanged); |
184 |
+ |
185 |
+ groupingProxyModel = new TaskGroupingProxyModel(q); |
186 |
+ groupingProxyModel->setSourceModel(filterProxyModel); |
187 |
+@@ -1152,6 +1153,16 @@ void TasksModel::setFilterNotMinimized(bool filter) |
188 |
+ d->filterProxyModel->setFilterNotMinimized(filter); |
189 |
+ } |
190 |
+ |
191 |
++bool TasksModel::filterNotMaximized() const |
192 |
++{ |
193 |
++ return d->filterProxyModel->filterNotMaximized(); |
194 |
++} |
195 |
++ |
196 |
++void TasksModel::setFilterNotMaximized(bool filter) |
197 |
++{ |
198 |
++ d->filterProxyModel->setFilterNotMaximized(filter); |
199 |
++} |
200 |
++ |
201 |
+ TasksModel::SortMode TasksModel::sortMode() const |
202 |
+ { |
203 |
+ return d->sortMode; |
204 |
+diff --git a/libtaskmanager/tasksmodel.h b/libtaskmanager/tasksmodel.h |
205 |
+index 18e3d9bb4..8c84012d0 100644 |
206 |
+--- a/libtaskmanager/tasksmodel.h |
207 |
++++ b/libtaskmanager/tasksmodel.h |
208 |
+@@ -73,6 +73,7 @@ class TASKMANAGER_EXPORT TasksModel : public QSortFilterProxyModel, public Abstr |
209 |
+ Q_PROPERTY(bool filterByScreen READ filterByScreen WRITE setFilterByScreen NOTIFY filterByScreenChanged) |
210 |
+ Q_PROPERTY(bool filterByActivity READ filterByActivity WRITE setFilterByActivity NOTIFY filterByActivityChanged) |
211 |
+ Q_PROPERTY(bool filterNotMinimized READ filterNotMinimized WRITE setFilterNotMinimized NOTIFY filterNotMinimizedChanged) |
212 |
++ Q_PROPERTY(bool filterNotMaximized READ filterNotMaximized WRITE setFilterNotMaximized NOTIFY filterNotMaximized) |
213 |
+ |
214 |
+ Q_PROPERTY(SortMode sortMode READ sortMode WRITE setSortMode NOTIFY sortModeChanged) |
215 |
+ Q_PROPERTY(bool separateLaunchers READ separateLaunchers WRITE setSeparateLaunchers NOTIFY separateLaunchersChanged) |
216 |
+@@ -295,6 +296,23 @@ public: |
217 |
+ **/ |
218 |
+ void setFilterNotMinimized(bool filter); |
219 |
+ |
220 |
++ /** |
221 |
++ * Whether non-maximized tasks should be filtered. Defaults to |
222 |
++ * @c false. |
223 |
++ * |
224 |
++ * @see setFilterNotMaximized |
225 |
++ * @returns @c true if non-maximized tasks should be filtered. |
226 |
++ **/ |
227 |
++ bool filterNotMaximized() const; |
228 |
++ |
229 |
++ /** |
230 |
++ * Set whether non-maximized tasks should be filtered. |
231 |
++ * |
232 |
++ * @see filterNotMaximized |
233 |
++ * @param filter Whether non-maximized tasks should be filtered. |
234 |
++ **/ |
235 |
++ void setFilterNotMaximized(bool filter); |
236 |
++ |
237 |
+ /** |
238 |
+ * The sort mode used in sorting tasks. Defaults to SortAlpha. |
239 |
+ * |
240 |
+@@ -848,6 +866,7 @@ Q_SIGNALS: |
241 |
+ void filterByScreenChanged() const; |
242 |
+ void filterByActivityChanged() const; |
243 |
+ void filterNotMinimizedChanged() const; |
244 |
++ void filterNotMaximizedChanged() const; |
245 |
+ void sortModeChanged() const; |
246 |
+ void separateLaunchersChanged() const; |
247 |
+ void launchInPlaceChanged() const; |
248 |
+diff --git a/shell/panelconfigview.cpp b/shell/panelconfigview.cpp |
249 |
+index a331c0bb2..5637f3233 100644 |
250 |
+--- a/shell/panelconfigview.cpp |
251 |
++++ b/shell/panelconfigview.cpp |
252 |
+@@ -289,6 +289,17 @@ PanelView::VisibilityMode PanelConfigView::visibilityMode() const |
253 |
+ return m_panelView->visibilityMode(); |
254 |
+ } |
255 |
+ |
256 |
++void PanelConfigView::setOpacityMode(PanelView::OpacityMode mode) |
257 |
++{ |
258 |
++ m_panelView->setOpacityMode(mode); |
259 |
++ emit opacityModeChanged(); |
260 |
++} |
261 |
++ |
262 |
++PanelView::OpacityMode PanelConfigView::opacityMode() const |
263 |
++{ |
264 |
++ return m_panelView->opacityMode(); |
265 |
++} |
266 |
++ |
267 |
+ Plasma::FrameSvg::EnabledBorders PanelConfigView::enabledBorders() const |
268 |
+ { |
269 |
+ return m_enabledBorders; |
270 |
+diff --git a/shell/panelconfigview.h b/shell/panelconfigview.h |
271 |
+index 8e0abd314..db2af6bf9 100644 |
272 |
+--- a/shell/panelconfigview.h |
273 |
++++ b/shell/panelconfigview.h |
274 |
+@@ -51,6 +51,7 @@ class PanelConfigView : public PlasmaQuick::ConfigView |
275 |
+ { |
276 |
+ Q_OBJECT |
277 |
+ Q_PROPERTY(PanelView::VisibilityMode visibilityMode READ visibilityMode WRITE setVisibilityMode NOTIFY visibilityModeChanged) |
278 |
++ Q_PROPERTY(PanelView::OpacityMode opacityMode READ opacityMode WRITE setOpacityMode NOTIFY opacityModeChanged) |
279 |
+ Q_PROPERTY(Plasma::FrameSvg::EnabledBorders enabledBorders READ enabledBorders NOTIFY enabledBordersChanged) |
280 |
+ |
281 |
+ public: |
282 |
+@@ -62,6 +63,9 @@ public: |
283 |
+ PanelView::VisibilityMode visibilityMode() const; |
284 |
+ void setVisibilityMode(PanelView::VisibilityMode mode); |
285 |
+ |
286 |
++ PanelView::OpacityMode opacityMode() const; |
287 |
++ void setOpacityMode(PanelView::OpacityMode mode); |
288 |
++ |
289 |
+ Plasma::FrameSvg::EnabledBorders enabledBorders() const; |
290 |
+ |
291 |
+ protected: |
292 |
+@@ -84,6 +88,7 @@ private Q_SLOTS: |
293 |
+ |
294 |
+ Q_SIGNALS: |
295 |
+ void visibilityModeChanged(); |
296 |
++ void opacityModeChanged(); |
297 |
+ void enabledBordersChanged(); |
298 |
+ |
299 |
+ private: |
300 |
+diff --git a/shell/panelview.cpp b/shell/panelview.cpp |
301 |
+index 4654a7a72..a699cc84c 100644 |
302 |
+--- a/shell/panelview.cpp |
303 |
++++ b/shell/panelview.cpp |
304 |
+@@ -64,6 +64,7 @@ PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent |
305 |
+ , m_alignment(Qt::AlignLeft) |
306 |
+ , m_corona(corona) |
307 |
+ , m_visibilityMode(NormalPanel) |
308 |
++ , m_opacityMode(Adaptive) |
309 |
+ , m_backgroundHints(Plasma::Types::StandardBackground) |
310 |
+ , m_shellSurface(nullptr) |
311 |
+ { |
312 |
+@@ -76,8 +77,10 @@ PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent |
313 |
+ setClearBeforeRendering(true); |
314 |
+ setColor(QColor(Qt::transparent)); |
315 |
+ setFlags(Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus); |
316 |
++ updateAdaptiveOpacityEnabled(); |
317 |
+ |
318 |
+ connect(&m_theme, &Plasma::Theme::themeChanged, this, &PanelView::updateMask); |
319 |
++ connect(&m_theme, &Plasma::Theme::themeChanged, this, &PanelView::updateAdaptiveOpacityEnabled); |
320 |
+ connect(this, &PanelView::backgroundHintsChanged, this, &PanelView::updateMask); |
321 |
+ connect(this, &PanelView::backgroundHintsChanged, this, &PanelView::updateEnabledBorders); |
322 |
+ // TODO: add finished/componentComplete signal to QuickViewSharedEngine, |
323 |
+@@ -405,6 +408,37 @@ PanelView::VisibilityMode PanelView::visibilityMode() const |
324 |
+ return m_visibilityMode; |
325 |
+ } |
326 |
+ |
327 |
++PanelView::OpacityMode PanelView::opacityMode() const |
328 |
++{ |
329 |
++ if (!m_theme.adaptiveTransparencyEnabled()) { |
330 |
++ return PanelView::Translucent; |
331 |
++ } |
332 |
++ return m_opacityMode; |
333 |
++} |
334 |
++ |
335 |
++bool PanelView::adaptiveOpacityEnabled() |
336 |
++{ |
337 |
++ return m_theme.adaptiveTransparencyEnabled(); |
338 |
++} |
339 |
++ |
340 |
++void PanelView::setOpacityMode(PanelView::OpacityMode mode) |
341 |
++{ |
342 |
++ if (m_opacityMode != mode) { |
343 |
++ m_opacityMode = mode; |
344 |
++ if (config().isValid() && config().parent().isValid()) { |
345 |
++ config().parent().writeEntry("panelOpacity", (int)mode); |
346 |
++ m_corona->requestApplicationConfigSync(); |
347 |
++ } |
348 |
++ emit opacityModeChanged(); |
349 |
++ } |
350 |
++} |
351 |
++ |
352 |
++void PanelView::updateAdaptiveOpacityEnabled() |
353 |
++{ |
354 |
++ emit opacityModeChanged(); |
355 |
++ emit adaptiveOpacityEnabledChanged(); |
356 |
++} |
357 |
++ |
358 |
+ void PanelView::positionPanel() |
359 |
+ { |
360 |
+ if (!containment()) { |
361 |
+@@ -599,6 +633,7 @@ void PanelView::restore() |
362 |
+ // the place for this config key is changed in Plasma 5.9 |
363 |
+ // Do NOT use readConfigValueWithFallBack |
364 |
+ setVisibilityMode((VisibilityMode)panelConfig.parent().readEntry<int>("panelVisibility", panelConfig.readEntry<int>("panelVisibility", (int)NormalPanel))); |
365 |
++ setOpacityMode((OpacityMode)readConfigValueWithFallBack("panelOpacity", PanelView::OpacityMode::Adaptive)); |
366 |
+ m_initCompleted = true; |
367 |
+ resizePanel(); |
368 |
+ positionPanel(); |
369 |
+diff --git a/shell/panelview.h b/shell/panelview.h |
370 |
+index 60e4d446e..c312d4907 100644 |
371 |
+--- a/shell/panelview.h |
372 |
++++ b/shell/panelview.h |
373 |
+@@ -100,6 +100,18 @@ class PanelView : public PlasmaQuick::ContainmentView |
374 |
+ */ |
375 |
+ Q_PROPERTY(VisibilityMode visibilityMode READ visibilityMode WRITE setVisibilityMode NOTIFY visibilityModeChanged) |
376 |
+ |
377 |
++ /** |
378 |
++ * Property that determines how a panel's opacity behaves. |
379 |
++ * |
380 |
++ * @see OpacityMode |
381 |
++ */ |
382 |
++ Q_PROPERTY(OpacityMode opacityMode READ opacityMode WRITE setOpacityMode NOTIFY opacityModeChanged) |
383 |
++ |
384 |
++ /** |
385 |
++ /* Property that determines whether adaptive opacity is used. |
386 |
++ */ |
387 |
++ Q_PROPERTY(bool adaptiveOpacityEnabled READ adaptiveOpacityEnabled NOTIFY adaptiveOpacityEnabledChanged) |
388 |
++ |
389 |
+ public: |
390 |
+ enum VisibilityMode { |
391 |
+ NormalPanel = 0, /** default, always visible panel, the windowmanager reserves a places for it */ |
392 |
+@@ -109,6 +121,14 @@ public: |
393 |
+ }; |
394 |
+ Q_ENUM(VisibilityMode) |
395 |
+ |
396 |
++ /** Enumeration of possible opacity modes. */ |
397 |
++ enum OpacityMode { |
398 |
++ Adaptive = 0, /** The panel will change opacity depending on the presence of a maximized window */ |
399 |
++ Opaque, /** The panel will always be opaque */ |
400 |
++ Translucent /** The panel will always be translucent */ |
401 |
++ }; |
402 |
++ Q_ENUM(OpacityMode) |
403 |
++ |
404 |
+ explicit PanelView(ShellCorona *corona, QScreen *targetScreen = nullptr, QWindow *parent = nullptr); |
405 |
+ ~PanelView() override; |
406 |
+ |
407 |
+@@ -147,6 +167,11 @@ public: |
408 |
+ VisibilityMode visibilityMode() const; |
409 |
+ void setVisibilityMode(PanelView::VisibilityMode mode); |
410 |
+ |
411 |
++ PanelView::OpacityMode opacityMode() const; |
412 |
++ bool adaptiveOpacityEnabled(); |
413 |
++ void setOpacityMode(PanelView::OpacityMode mode); |
414 |
++ void updateAdaptiveOpacityEnabled(); |
415 |
++ |
416 |
+ /** |
417 |
+ * @returns the geometry of the panel given a distance |
418 |
+ */ |
419 |
+@@ -185,6 +210,8 @@ Q_SIGNALS: |
420 |
+ // QWindow does not have a property for screen. Adding this property requires re-implementing the signal |
421 |
+ void screenToFollowChanged(QScreen *screen); |
422 |
+ void visibilityModeChanged(); |
423 |
++ void opacityModeChanged(); |
424 |
++ void adaptiveOpacityEnabledChanged(); |
425 |
+ |
426 |
+ protected Q_SLOTS: |
427 |
+ /** |
428 |
+@@ -235,6 +262,7 @@ private: |
429 |
+ ShellCorona *m_corona; |
430 |
+ QTimer m_strutsTimer; |
431 |
+ VisibilityMode m_visibilityMode; |
432 |
++ OpacityMode m_opacityMode; |
433 |
+ Plasma::Theme m_theme; |
434 |
+ QTimer m_positionPaneltimer; |
435 |
+ QTimer m_unhideTimer; |
436 |
+-- |
437 |
+GitLab |
438 |
+ |
439 |
|
440 |
diff --git a/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild b/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild |
441 |
index 711dd242a8..31b3b92188 100644 |
442 |
--- a/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild |
443 |
+++ b/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild |
444 |
@@ -143,7 +143,11 @@ PDEPEND=" |
445 |
>=kde-plasma/kde-cli-tools-${PVCUT}:5 |
446 |
" |
447 |
|
448 |
-PATCHES=( "${FILESDIR}/${PN}-5.14.2-split-libkworkspace.patch" ) |
449 |
+PATCHES=( |
450 |
+ "${FILESDIR}/${PN}-5.14.2-split-libkworkspace.patch" |
451 |
+ "${FILESDIR}/${P}-transparency.patch" # KDE-bug 434202 |
452 |
+ "${FILESDIR}/${P}-transparency-panelConfig.patch" # KDE-bug 434285 |
453 |
+) |
454 |
|
455 |
src_prepare() { |
456 |
ecm_src_prepare |