Review Request: make kickoff use popupApplet

Loic Marteau loic.marteau at gmail.com
Sun Sep 7 21:04:33 CEST 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.vidsolbach.de/r/132/
-----------------------------------------------------------

(Updated 2008-09-07 12:04:33.895560)


Review request for Plasma.


Summary
-------

hello !

Here is a big patch to make kickoff use popupApplet.

I have add some code to dialog to let the user resize a dialog .
The dialog resize handle is activated by giving to the dialog which cardinal direction we want to see it, perhaps we can add support to combine different location later. 

I have add some code to popupApplet too to let the applet notified when popup is activated and where is located the popup relatively to the icon
The popup Location is an enum in Plasma. This stuff is to permit fitt's law optimisation.

The majority of the code i have added in dialog and popupapplet is inspired from the kickoff one.

There is things missings in the patch but i want to know if the direction is good.
- Default kickoff size does not work well
- Tool tip manager does not work
- the resize handle widget is a little ugly
- More work to adjust the popup Position in popupApplet is needed to deal correctly with centered icons in panels and to let applets say to popup what it is their preferred alignment.

Cheers


Hope than you spend good time at akademy !

Lo

Update :
Now the idea is to provide functions to popupApplet so we save the new size of the dialog when the user resize it and we calculate the position of the dialog relatively to the icon so the applets can use it directly.

Applied in kickoff

i have just a problem with this in kickoff, it is code than i have removed this it is directly dealed in popupapplet
    if (d->applet) {
       sizeGroup = d->applet->config();
    } else {
       sizeGroup = componentData().config()->group("Size");	
    }
	
    const int width = qMin(sizeGroup.readEntry("Width", 0), QApplication::desktop()->screen()->width()-50);
    const int height = qMin(sizeGroup.readEntry("Height", 0), QApplication::desktop()->screen()->height()-50);
    QSize wanted(width, height);

i dont know exactly in wich case we dont have d->applet, is it a problem if in such case it is up to the component who contains the launcher to deal with size itself ?

Cheers

Lo


Diffs
-----

  /trunk/KDE/kdebase/workspace/libs/plasma/dialog.cpp
  /trunk/KDE/kdebase/workspace/libs/plasma/plasma.h
  /trunk/KDE/kdebase/workspace/libs/plasma/popupapplet.h
  /trunk/KDE/kdebase/workspace/libs/plasma/popupapplet.cpp
  /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/applet/applet.cpp
  /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/launcher.h
  /trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/launcher.cpp

Diff: http://reviewboard.vidsolbach.de/r/132/diff


Testing
-------


Thanks,

Loic



More information about the Plasma-devel mailing list