Commit Graph

54 Commits

Author SHA1 Message Date
Aaron J. Seigo
41ad617765 don't try and access items that aren't there
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=792328
2008-03-31 20:36:32 +00:00
Ivan Čukić
b040210c63 Relative (more natural) positions for layout items after resizing
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=790222
2008-03-26 08:35:08 +00:00
Dan Meltzer
7f624f85d9 Revert one large git mess
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=780657
2008-02-29 17:50:57 +00:00
Dan Meltzer
a081559257 Commit initial progress of work to port to qt4.4
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=780654
2008-02-29 17:43:31 +00:00
Bill Egert
74e2ce31ff Make some better decisions.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=777237
2008-02-20 03:00:26 +00:00
Aaron J. Seigo
f1b334f9a3 explicit
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=776979
2008-02-19 08:32:32 +00:00
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
f6be272915 -convert some commented out debug to kDebug()
-const up some variables

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772887
2008-02-09 17:10:40 +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
72b7c6f393 more safety, allowing anyone delete a layout or call setParent and have the Right Things(tm) happen without anyone's toes getting blown off in the process.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771851
2008-02-07 02:24:19 +00:00
Chani Armitage
ed47acc7a0 make setting a layout actually safe
(reviewed in #plasma)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771825
2008-02-07 00:18:22 +00:00
Aaron J. Seigo
7f3aea19ff move MarginEdge to the Plasma namespace to avoid coupling to the layout stuff in innapropriate places
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771704
2008-02-06 19:12:21 +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
Marco Martin
c395cc03bb added the function setExpandingBoth(bool) that makes the layout to expand in both directions, useful for instance if you put an horizontal layout into a vertical layout
oh, and fixed a typo in a comment

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=767568
2008-01-28 11:55:56 +00:00
Marco Martin
6b649e560c operator precedence issue
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=766361
2008-01-25 17:16:38 +00:00
Chani Armitage
593a6c8103 prettify code spacing
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=765102
2008-01-23 07:01:03 +00:00
Olivier Goffart
9d5697924d Make sure the height of row is always enough to have one line of text
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=763953
2008-01-20 17:11:56 +00:00
Olivier Goffart
2f14830745 Taskbar: Use severals rows if there is too much items to fit in one row
FEATURE: 155974


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=763873
2008-01-20 14:14:35 +00:00
Aaron J. Seigo
755efb64e8 when setting an animator, we need to associate our children with it.
this probably needs to be done to the other layouts too.
BUG:155596

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=760655
2008-01-13 08:22:04 +00:00
Aaron J. Seigo
d191de06d3 to be easily usable outside of libplasma, signals need full namespace usage. we really ought to do a good review of libplasma for this issue
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=760653
2008-01-13 08:18:26 +00:00
Aaron J. Seigo
ee32d3c996 remove the use of 1209 explicitly now that i have Winter's Magic Formula for default debug space. makes backporting way easier; sorry for the noise of the earlier commit. suppose i should read planetkde.org more closely ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758498
2008-01-08 01:25:09 +00:00
Aaron J. Seigo
12ef6308cb use the plasma debug area (1209); i considered wrapping this in Plasma::debug() but that seems overkill ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758415
2008-01-07 20:50:31 +00:00
Jason Stubbs
6e95d0617e If the item's state changes half way through a fade animation, the opacity
will be left != 1.0. Reset it if the state has changed to something else.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757522
2008-01-05 08:34:23 +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
f0fb9b3022 The position shouldn't change when fading out just as it doesn't when fading in
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751238
2007-12-21 13:15:36 +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
Marijn Kruisselbrink
a7dcbb5456 fixes for platforms where qreal is not a double
btw, wouldn't it be cleaner if all those qMin(0.0, qMax(1.0, foo)) calls are calls to qBound instead?

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=748283
2007-12-14 01:38:32 +00:00
Adriaan de Groot
7e8b236445 Andre W. pointed out it should probably be qreal just in case that's different from float; works on SPARC and x86.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=747411
2007-12-11 23:03:52 +00:00
Pino Toscano
bf9bd90ec8 unuseful includes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=747285
2007-12-11 16:05:09 +00:00
Ivan Čukić
12a2f50922 FlipLayout committed
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=747176
2007-12-11 09:06:21 +00:00
Adriaan de Groot
cb344f2acd INFINITY is a gcc-ism, use something more C++y (but it's possible to have *no* infinity() for floats; that would require another bit of hackery)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746992
2007-12-10 19:49:25 +00:00
Adriaan de Groot
4db2399b6e Tighten the type of the template parameter for calculateSize() so that sum() can actually be used.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746990
2007-12-10 19:46:58 +00:00
Ivan Čukić
4d3d0b8a64 Removing debugging messages
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746972
2007-12-10 19:05:23 +00:00
Ivan Čukić
f6b097db82 Aaron skipped a bit when removing geometry() and setGeometry() so the layout was broken
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746969
2007-12-10 19:04:16 +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
Aaron J. Seigo
d3c5f72bab fix possible crash
CCMAIL:slashdevdsp@gmail.com

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=744440
2007-12-03 16:11:27 +00:00
Aaron J. Seigo
dc57fc5c19 respect min/max sizes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742408
2007-11-27 23:18:00 +00:00
Dirk Mueller
0142f8653c fix license headers
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=740323
2007-11-23 00:08:03 +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
Seb Ruiz
d6001be92a warning fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=739904
2007-11-22 07:19:43 +00:00
Andre Duffeck
a93b6f8e07 startPos has to return absolute positions
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=739868
2007-11-22 06:00:02 +00:00
Aaron J. Seigo
65d405f264 more layouting love;
* widgets should let Widget handle sizing, geometry unless there are very good reasons for it
* don't relayout the parent layout if the parent layout is already relayouting, because that relayout will have called the child's relayout in the first place. get it? relayout!
* i can dance. we can dance. do the relayout dance.
* some style guide fixes

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738957
2007-11-20 01:19:59 +00:00
Aaron J. Seigo
14c8999f12 SVN_SILENT style guide fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738950
2007-11-20 00:47:20 +00:00
Aaron J. Seigo
060144d623 protect against relayout recursion here as well
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738932
2007-11-20 00:05:21 +00:00