Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
38805dc0
Commit
38805dc0
authored
Oct 21, 2020
by
Konrad Materka
Browse files
[SystemTray] Explain in comments why we need wrapping applet
Add brief explanation why we need thin wrapping applet.
parent
4915766b
Changes
2
Hide whitespace changes
Inline
Side-by-side
applets/systemtray/container/package/contents/ui/main.qml
View file @
38805dc0
...
...
@@ -22,6 +22,7 @@ import QtQuick.Layouts 1.1
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
plasmoid
2.0
//SystemTray is a Containment. To have it presented as a widget in Plasma we need thin wrapping applet
Item
{
id
:
root
...
...
@@ -32,6 +33,8 @@ Item {
Plasmoid.preferredRepresentation
:
Plasmoid
.
fullRepresentation
Plasmoid.status
:
internalSystray
?
internalSystray
.
status
:
PlasmaCore
.
Types
.
UnknownStatus
//synchronize state between SystemTray and wrapping Applet
//the "expanded" property is not really used now, but let's keep it in sync for consistency
Plasmoid.onExpandedChanged
:
{
if
(
internalSystray
&&
!
plasmoid
.
expanded
)
{
internalSystray
.
expanded
=
false
;
...
...
applets/systemtray/container/systemtraycontainer.h
View file @
38805dc0
...
...
@@ -26,6 +26,11 @@
class
QQuickItem
;
/**
* @brief Thin wrapping 'Plasma::Applet' for SystemTray.
*
* SystemTray is of 'Plasma::Containment' type. To have it presented as a widget in Plasma we need a wrapping applet.
*/
class
SystemTrayContainer
:
public
Plasma
::
Applet
{
Q_OBJECT
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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