1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-23 02:50:12 +03:00

expand applets when clicked in neutral areas

--try to give more interaction to the user. When an
applet is clicked at its hidden spacers or the space
reserved for its active indicator then Latte sends
a signal to expand it. Unfortunately I havent found
a way to active other applets in such case e.g. the
icon-only applets
This commit is contained in:
Michail Vourlakos 2017-12-02 18:53:11 +02:00
parent 39d63f178e
commit 43b08217a2

View File

@ -596,6 +596,14 @@ Item {
}
onPressed: {
//if the event is at the active indicator or spacers area then try to expand the applet,
//unfortunately for other applets there is no other way to activate them yet
//for example the icon-only applets
var choords = mapToItem(container.appletWrapper, mouse.x, mouse.y);
if (choords.x<0 || choords.y<0 || choords.x>=container.appletWrapper.width || choords.y>=container.appletWrapper.height) {
dock.toggleAppletExpanded(applet.id);
}
pressed = true;
mouse.accepted = false;
}