Commit Graph

15 Commits

Author SHA1 Message Date
Aaron J. Seigo
777b8083f8 * moves the idea of margins up to LayoutItem, allowing any LayoutItem to have a margin
* moves the idea of the size of the item up to LayoutItem, as both Widget and Layout implemented it separately
* provides a way in LayoutItem to adjust a rect within an item to its margins (that is what LayoutItem::topLeft() is there for)
* fix several bugs, both painting and sizing, in LineEdit
* Applet sets margins now based on the existence of setDrawBackground


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=776380
2008-02-17 23:02:46 +00:00
Aaron J. Seigo
9335a50776 Ensure that LayoutItem::setParent resets the parents layout if we are currently its layout and release managed items.
RB:89

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773471
2008-02-11 05:50:47 +00:00
Bill Egert
a7ccf41c3e - fix displaying at min height.
- fix displaying odd number items on 1 row.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773456
2008-02-11 03:22:41 +00:00
Bill Egert
77412f9c5b Fill unused space on bottom row.
Thanks Marco Martin

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773435
2008-02-11 01:32:00 +00:00
Bill Egert
783872cc77 Fixed what I think are the last of the bugs with laying items out properly within their rect.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773059
2008-02-10 01:59:56 +00:00
Bill Egert
8917da5723 -clean up some coding standards
-const up some variables

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772901
2008-02-09 17:40:07 +00:00
Bill Egert
9906e6746d Top Align...let items be as large as they can be.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772740
2008-02-09 14:56:04 +00:00
Bill Egert
cc8024c991 Re-work of the relayout() function so that it actually works.
screenshot of using flowlayout with tasks applet: http://matt.rogers.name/r/96/s/6/

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772729
2008-02-09 14:29:03 +00:00
Aaron J. Seigo
3af4b66dca tired of the "expect crashes" output all the time, i just fixed it properly by deleting the existing layout. since the layout makes itself the parent of the child layout and already deletes it in the dtor, this only makes sense. hello greater safety and goodbye scary console output ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771686
2008-02-06 18:16:11 +00:00
Jason Stubbs
cb9747382b startAnimation() needs to be called if the layout geometry() changes as well
otherwise the updated layout doesn't take effect. This means that it really
does need to be called from relayout(). So to prevent a quasi-infinite loop,
don't restart the timeline if it's already running.

This fixes the tasks geometry not updating correctly when applets are added
to the panel.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754148
2007-12-29 07:14:21 +00:00
Jason Stubbs
933932ddb4 LayoutAnimator indirectly calls relayout() so calling startAnimation() in
relayout() is almost an infinite loop. Instead, only call startAnimation()
when an item has actually been added or removed.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=748736
2007-12-15 09:08:09 +00:00
Aaron J. Seigo
946e0127b8 went through and checked methods that take or return pointers or indexes and added safety precautions against bad parameters
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=744630
2007-12-03 23:53:56 +00:00
Dirk Mueller
e67ddc6a62 fix licensing header
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=740318
2007-11-23 00:03:27 +00:00
Aaron J. Seigo
e614df56d0 * consolidate geometry() and setGeometry() from the layouts into Layout
* introduce relayout() which does only that
* place guards around relayout() calls in Layout class to prevent recursion

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738923
2007-11-19 23:45:56 +00:00
Aaron J. Seigo
92ba2c1b0b move all the layouts to their own directory; much more logical and makes it easier to not miss layouts that need changes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738898
2007-11-19 22:42:56 +00:00