This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Left click on plasmoid in system tray

Tags: None
(comma "," separated)
Kotelnik
Registered Member
Posts
5
Karma
0
Hi! Do somebody please know if there is any way to code QML Plasma 5 plasmoid (for system tray) to receive a left click mouse event and react according plasmoid programmer plans?

In main.qml I tried:
Plasmoid.preferredRepresentation: Plasmoid.compactRepresentation
Plasmoid.compactRepresentation: CompactRepresentation { }

...where CompactRepresentation is a MouseArea with onClicked: { print('left clicked!') }
but left click is always eaten by system tray and shows default (or defined) FullRepresentation.

I tried some other possibilities like onPressed and played around with main.qml itself, full and compact representations but couldn't come up with anything working...
User avatar
notmart
KDE Developer
Posts
220
Karma
1
OS
Kotelnik wrote:...where CompactRepresentation is a MouseArea with onClicked: { print('left clicked!') }
but left click is always eaten by system tray and shows default (or defined) FullRepresentation.

Right now in the systray plasmoids there is a mousearea that coverswhatever the plasmoid has defined that makes it open.

I'll look if is possible to make the mouseareas internal to the plasmoid work, but the systray area has a very defined behavior (that can even change in the future, so plasmoids shouldn't make any assumptions on how the systray would look or work), and plasmoids should really think twice before allowing themselves to go in the systray.
I'll look into making this work, but i'm not 100% confident is possible or if is the correct thing to do
User avatar
notmart
KDE Developer
Posts
220
Karma
1
OS
also, should probqably be reported to bugzilla as well anyways


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]