SystemTray: pop-up window position

Aaron J. Seigo aseigo at kde.org
Sat Nov 17 12:57:49 UTC 2012


On Saturday, November 17, 2012 13:25:01 Marco Martin wrote:
> On Saturday 17 November 2012, Aaron J. Seigo wrote:
> > On Friday, November 16, 2012 18:57:17 Dmitry A. Ashkadov wrote:
> > > 2. At center:
> > this has been the standard alignment for several releases for popups. it
> > looks nice, minimizes mouse movement, etc.
> > 
> > Corona::popupPosition calculates this for you, so if you use that function
> > it should all be good.
> > 
> > what may be missing in the QML bindings is a way to access that function,
> > and it is not great if one has to write C++ just to figure out where
> > something should popup.
> > 
> > my proposal is to add a plasmoid.popupPosition(popupFromItem, itemToPopup,
> > alignment) function .. thoughts?
> 
> it's in the bindings of the qml Dialog item
> 
> default as in libplasma is align at left

for historical reasons only, mostly because PopupApplet by default shows its 
popup in position relative to the Applet item, and this tends to look horrible 
for large applets. 

however, when the item the popup originates from (as in the tasks plasmoid or 
system tray arrow) is small enough, it ought to to be centered on that item.

and really, if the item the popup originates from is really bigger than the 
popup, the popup probably should be centered on the press event position. if 
triggered via a non-press event (e.g. a keyboard shortcut) then centered-on-
top-level-item may work just as well too.
 
> i was thinking about defaulting everything to centered 

+1, though with the above caveats.

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20121117/5a08499f/attachment.sig>


More information about the Plasma-devel mailing list