kupiqu / plasma-active-application

KDE plasma applet to show the active application name. Thought to be used in a panel together with plasma's global menu.
5 stars 2 forks source link

Suggestion about the mouse behaviors #7

Open trmdi opened 5 years ago

trmdi commented 5 years ago

It should behave like Latte's panel: double click to maximize/restore, support dragging.

@psifidotos could help you in this issue.

kupiqu commented 5 years ago

Yes. I have actually talked to @psifidotos. Goods news for users is that he has a very nice roadmap for improving this applet, including this very mouse behavior, and UI and more (https://www.reddit.com/r/kde/comments/9uh5yc/window_buttons_applet_v01/e96ma92). Soon I will transfer the ownership of the applet to him to boost development. In the meantime, I will try to focus on issue #5.

kupiqu commented 5 years ago

It should behave like Latte's panel: double click to maximize/restore

Done in master (commit 8ec650b66c9d0f4211e66a2259cac3454645959f; keeping middle click to close, and no minimize option anymore). Dragging will have to wait... Leaving this issue open.

trmdi commented 5 years ago

If you want, you could make an option like "Mouse handled by this applet"

There could be a better option. What do you think about this @psifidotos ?

psifidotos commented 5 years ago

What do you think about this @psifidotos ?

ok... Let me explain you the architecture and how I think it must be implemented...

Latte in git version provides an Communicator Engine in order to communicate with applets: the files are: Communicator Engine->Latte Bridge->Actions

the Communicator is the main class and can be found at: https://phabricator.kde.org/source/latte-dock/browse/master/containment/package/contents/ui/applet/communicator/Engine.qml

the Latte Bridge is the object that is passed as it is in any applet that has set property QtObject latteBridge: null at its root item. the latte bridge is located at: https://phabricator.kde.org/source/latte-dock/browse/master/containment/package/contents/ui/applet/communicator/LatteBridge.qml

and finally Actions is just a way to send events from any applet to LatteBridge and then at Engine etc. etc....

Actions is located at: https://phabricator.kde.org/source/latte-dock/browse/master/containment/package/contents/ui/applet/communicator/Actions.qml


The plan is to add in the Actions item some functions for dragging.... An example about how latteBridge can be used for another use case is the Window Buttons applet... check out the main.qml file and search for Latte in order to see the magic behind it...

kupiqu commented 5 years ago

mmm, @psifidotos, if you don't mind, I think I'll leave this to you ;-)

psifidotos commented 5 years ago

mmm, @psifidotos, if you don't mind, I think I'll leave this to you ;-)

yeah dont worry...