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

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to