Commit Graph

42 Commits

Author SHA1 Message Date
Rob Scheepmaker
aea9e0e6d8 Move the QGL resize hacks from extender to extenderapplet. The only applet atm for which this hack is necesarry is actually extenderapplet, in the future we will have better layouts, and it won't be necesarry at all, and for now it avoids breaking panel layouts when removing the last extenderitem from an extenderapplet.
svn path=/trunk/KDE/kdelibs/; revision=908195
2009-01-09 13:13:57 +00:00
Marco Martin
bfc790f0f5 center the empty extender label, otherwise the "no noticications and no
jobs" label, rare but that can still be seen while dragging can be drawn
over the shadow outside the borders

svn path=/trunk/KDE/kdelibs/; revision=901648
2008-12-26 12:27:09 +00:00
Rob Scheepmaker
72eaf8c5f7 No longer use a QGraphicsGridLayout to manage offscreen widgets in corona. Instead position them manually and give each one a spot where they can grow up to QWIDGETSIZEMAX. This has the advantage of not requiring hacks to work around QGL problems, and it avoids having to move all views when one item resizes. It feels snappier and the code looks cleaner.
svn path=/trunk/KDE/kdelibs/; revision=895118
2008-12-10 00:57:42 +00:00
Aaron J. Seigo
011832d5fb --compiler_warnings;
svn path=/trunk/KDE/kdelibs/; revision=894470
2008-12-08 18:05:17 +00:00
Aaron J. Seigo
dffbf7817c prevent possible crash
svn path=/trunk/KDE/kdelibs/; revision=894455
2008-12-08 17:32:57 +00:00
Rob Scheepmaker
ab56a3a388 Couple of fixes:
* Close empty extender when clicking in it.
BUG:176545
* Saner size policy for Plasma::Meter. (the height should never be able to be smaller then svg's height because labels could otherwise overlap, actually, the whole current approach doesn't consider font size, I think we should think of a better approach for 4.3)
* Use the same spacer as used in the panel for extenders. I think we would want some svg themable shared spacer widget for 4.3, but at least this adds some consistency.


svn path=/trunk/KDE/kdelibs/; revision=891328
2008-12-01 18:30:42 +00:00
Rob Scheepmaker
bd1a648215 Removed some unnecesarry calls to adjustSizeHints()
svn path=/trunk/KDE/kdelibs/; revision=890899
2008-11-30 16:16:25 +00:00
Rob Scheepmaker
2d4971eb46 Extender Polishing time! The following problems have been adressed:
* Far more correct spacer implementation. This avoids the spacer jumping around while dragging an item. Also adjustSizeHints is now only called once/spacer move.
* Avoid spacer related memleak.
* Only load extenderItems that are actually detached. This way, attached items won't linger around in case of a plasma crash.
* Use utilities-desktop-extra as icon for items with no saved icon (e.g. items where the icon is set using setIcon(QIcon) instead of setIcon(QString)). Sure beats the questionmark.
* Update mask when offscreen extender items are resized when being dragged to avoid screwed up masks (white borders).
* Start the drag only aften being moved a minimum of QApplication::startDragDistance().
* Correct transformation for calls to showDropZone.
* Use the mouse position for positioning items in extenders or panels, the topleft corner for positioning in a desktop containment. This feels the most natural.
* Move items back to the extender they came from when they're dropped into nowhere.
* Some small code style fixes.



svn path=/trunk/KDE/kdelibs/; revision=890249
2008-11-28 17:06:00 +00:00
Rob Scheepmaker
47dcbf47b9 By default, use an empty string as empty extender label, and don't display that label if that string is empty. The idea is that having that label there is weird when the extender is used in a dialog. The case in which the label is useful, is when the extender is embedded in an applet on the desktop, and the applet should only set the label, if this is the case.
svn path=/trunk/KDE/kdelibs/; revision=886937
2008-11-20 16:37:30 +00:00
Rob Scheepmaker
cfb43a7632 Correct sizehints for extender containing applets on the desktop. Also renamed the private adjustSize() function to adjustSizeHints() to avoid confusion.
svn path=/trunk/KDE/kdelibs/; revision=882356
2008-11-10 15:49:31 +00:00
Rob Scheepmaker
731ccc9f41 Work around a bug in QGL. This will make extenders contained in applets on the desktop appear correctly, and, as opposed to an earlier attempt, doesn't interfere with applets like analog clock.
svn path=/trunk/KDE/kdelibs/; revision=881297
2008-11-07 18:16:35 +00:00
Aaron J. Seigo
1b523b9054 ok, this time JUST the plasma dir ;)
svn path=/trunk/KDE/kdelibs/; revision=879759
2008-11-03 23:08:39 +00:00
Aaron J. Seigo
fa5a2d87d9 bum-de-dum! plasma to kdelibs.
svn path=/trunk/KDE/kdelibs/; revision=879757
2008-11-03 23:03:26 +00:00
Rob Scheepmaker
babf165d5d A last couple of api changes before the move to kdelibs:
* in class Extender rename setExtenderAppearance to setAppearance.
* in class ExtenderItem rename moveBackToSource to returnToSource.
* in class ExtenderItem addition of showCloseAction() and hideCloseAction().
... and some minor tweaks in the implementation.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=879670
2008-11-03 19:49:14 +00:00
Kevin Ottens
f66b4d819b API changes as announced:
* ConfigXml becomes ConfigLoader
  * Containment::(add|remove)ToolBoxTool(QAction *action) becomes
    Containment::(add|remove)ToolBoxAction(QAction *action)
  * Flash becomes FlashingLabel
  * Icon becomes IconWidget
  * PanelSvg becomes FrameSvg

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=877504
2008-10-29 17:46:33 +00:00
Rob Scheepmaker
d09ca6858f Also automatically hide dialogs from popupapplets if the last extender item is destroyed.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875760
2008-10-25 14:17:17 +00:00
Rob Scheepmaker
704fad3d81 Small extender api improvements:
* extender() -> protected
* initExtenderItem() no longer a slot
* autoExpireDelay return uint instead of bool


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875751
2008-10-25 13:41:00 +00:00
Rob Scheepmaker
415a1c213d Also update extender item borders correctly when items are removed from the layout.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875444
2008-10-24 13:20:49 +00:00
Rob Scheepmaker
241d38ad65 A bit more sourceApplet correctness:
* Removed sourceApplet() function, it has no place in public api. That was also discussed in the api review, but I forgot to actually remove it.
* Update sourceApplet's pointer and remove the "return to source" button when the source applet is removed.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875290
2008-10-23 22:42:58 +00:00
Rob Scheepmaker
ef3ec40f5d Avoid possible memory leak if an applet tries to create more then one extender.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875161
2008-10-23 14:08:24 +00:00
Aaron J. Seigo
d9e5d8babd this work around doesn't work
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874990
2008-10-23 00:09:25 +00:00
Rob Scheepmaker
e5c19dde50 Fixed two potential problems found by fredrikh.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874016
2008-10-20 16:03:30 +00:00
Rob Scheepmaker
a26b73b6bb Give extenders the 'stacked' look from Pinheiro's mockup. It still needs some minor tweaks, but it allready looks quite sexy.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=873867
2008-10-20 10:58:37 +00:00
Allen Winter
81d09742bb fix spelling
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870322
2008-10-12 11:12:24 +00:00
Rob Scheepmaker
51e03dc5e3 Add return to source icon the the plasma theme, and use this in extender items.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870089
2008-10-11 17:56:07 +00:00
Rob Scheepmaker
3824adb381 Allow theming the background of ExtenderItems, and react to theme changes. Capabilities still
have to be improved to make it look like the lovely pinheiro mockup.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=868933
2008-10-07 16:15:33 +00:00
Aaron J. Seigo
a062bbc901 * prevent some possibe crash interactions between extenders and applets
* proper save of geometry, transform and position post startup

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=866823
2008-10-01 23:52:50 +00:00
Aaron J. Seigo
0ae78795da don't use Applet::extender(); we're friends, after all
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862087
2008-09-18 02:44:08 +00:00
André Wöbbeking
80e89dff6f compile
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=861634
2008-09-16 17:16:26 +00:00
Rob Scheepmaker
c4733af68b Removed some debug spam, some obsolete stuff, and avoid creating 2 calendars in clocks.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=861613
2008-09-16 16:26:57 +00:00
Rob Scheepmaker
982c940f55 Don't insert emptyExtenderLabel if there's allready a spacer in the extender.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=860906
2008-09-14 15:38:30 +00:00
Alex Merry
33f7e1e3d6 Actually relicense the files this time. Last time, I managed to change the text from GPL to... GPL.
Again, plasma-devel@kde.org mail archives have the permissions.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=858780
2008-09-08 17:32:25 +00:00
Alex Merry
90f5feb1a6 Relicense files. See plasma-devel@kde.org mailing list archives for permissions.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=858364
2008-09-07 21:33:02 +00:00
Rob Scheepmaker
dfbf606c6c Set the same minimumsize on the spacer and and emptyExtenderTextLabel when removing the
last ExtenderItem, so it looks a bit nicer.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=857468
2008-09-05 13:28:03 +00:00
Rob Scheepmaker
dcaf4a4b8a And finally we can drag even the last ExtenderItem from PopupApplet without stuff
breaking all around, and some random crashes are avoided too, all by making the
Dialog in PopupApplet no longer of the type Qt::Popup and installing an event filter
to still hide the dialog when you click somewhere else on your screen.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=857095
2008-09-04 17:09:34 +00:00
Rob Scheepmaker
8a0f530641 Size the extender correctly directly after creation.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=854553
2008-08-29 19:09:27 +00:00
Rob Scheepmaker
c066ea7027 PopupApplet monitors the size of the applet now. And fixed scenePosFromScreenPos so you can now
reorder extenderitems within a Dialog. Stuff still breaks when detaching the last item, I'm still 
working on that.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=854547
2008-08-29 19:00:10 +00:00
Rob Scheepmaker
1bae884531 Improved Extender support in popupApplet. Dialog resizes correctly, and even the last
item is removable. Implementation is still not perfect, but it's now a lot better then it 
was.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=853962
2008-08-28 14:32:48 +00:00
Alex Merry
053ba4f683 Use parenting.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=851464
2008-08-23 17:47:50 +00:00
Aaron J. Seigo
7f35d2e3e6 emit geometry on size/pos changes correctly; we now hae calendars with multiple clocks again
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=842639
2008-08-05 17:28:58 +00:00
Rob Scheepmaker
3bfb1bf662 Fixed a type, making destroy() function again. Move the destruction of temporary extender
items to applet, since in extender's dtor, applet's config isn't accessible anymore. Only 
fire itemDetached when an item is really moved, not only when being dragged away.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=841509
2008-08-03 12:16:41 +00:00
Aaron J. Seigo
577a64f563 extender is not a Plasma Widget (it doesn't follow the API pattern, isn't a button/menu/etc, isn't meant to be used as a general widget in a random layout...)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=841164
2008-08-02 17:46:32 +00:00