Commit Graph

12 Commits

Author SHA1 Message Date
Petri Damstén
b5fa2a0936 Calculate available size before perItemSize
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=723274
2007-10-09 07:05:37 +00:00
Petri Damstén
c4f4f16048 - Use margin at startPos
- Delete white space from line ends

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=718076
2007-09-28 05:43:15 +00:00
Aaron J. Seigo
329d912f47 SVN_SILENT: more licensing updates ... all done with this now i think =)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712581
2007-09-14 20:17:11 +00:00
Aaron J. Seigo
e0f831373c SVN_SILENT: add "or later" clause. cleared with copyright holders, except for rich moore's ui loader which i need to ask him for permission for first.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712549
2007-09-14 19:06:18 +00:00
Robert Knight
15fbaba2ac Move duplicated animation starting code into Layout::startAnimation() which layout subclasses can call at the end of their setGeometry() implementation to start the layout animator's timer.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707803
2007-09-03 00:52:29 +00:00
Robert Knight
ecd23d6e67 Always restart timeline from 0 when setGeometry() is called. QTimeLine::start() is a no-op if already running.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707800
2007-09-03 00:41:57 +00:00
Robert Knight
a29ae57a7d This breaks the existing Plasma applet API, see the contentSize()
comments below.

* New Flow Layout.  This provides simple icon view-esque layout of items.
  Useful for icons for documents , applications or other tasks on the desktop
  for example.  Supports non-equally sized items.

  Works well when used with the LayoutAnimator class to animate insertions
  and removals.

* Re-wrote BoxLayout and removed old HBoxLayout,VBoxLayout classes which had
  a lot of code duplication.  BoxLayout class now takes a direction argument
  in the constructor, ala. QBoxLayout.  New BoxLayout class actually takes
  minimumSize() , maximumSize() of items into account.  The Qt layout code
  for box and grid layouts is surprisingly sophisticated, so the results
  from BoxLayout probably will not be as good in certain situations but
  it should do for the panel.  New BoxLayout also has support for LayoutAnimator

* Fix Plasma::HBoxLayout and Plasma::VBoxLayout to use margin() 
  rather than spacing() for the distance from the top and left
  margins respectively.

* Fix Plasma::Applet::contentSize() to return the actual content size
  rather than a size hint.  Added a new method contentSizeHint() which
  applets use to provide a hint about suitable content size.  

  Existing implementations of contentSize() in applets need to be renamed
  to contentSizeHint().  The arguments and return type are the same as before.

* Install the LayoutAnimator header so that applets can use it

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707275
2007-09-01 12:34:22 +00:00
Percy Leonhardt
615eae37ba Merged HBoxLayout and VBoxLayout into BoxLayout to avoid duplicate code.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706645
2007-08-30 23:44:08 +00:00
Aaron J. Seigo
db4a7ebe61 copyright cleanups:
* Copyright (C) -> Copyright
* add "or later" clause to files that i have the sole copyright on
* add current year (2007) to my copyrights where it was missing

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696946
2007-08-06 11:20:02 +00:00
Aaron J. Seigo
a8b7589479 someone got confused as to the difference between "the layout that manages my children" and "the layout that manages me". this fixes that and stops crashes in applets that use vbox/hbox
* don't crash when parent=0 is passed in
* don't divid by 0 when we have no children
* have the (fugly) setManagingLayout and unsetManagingLayout and managingLayout methods
* do some memory management so layouts that are thrown around don't get lost in the heap

some unit tests would be nice. hell, a design document on the layout stuff would be nice. i know we're only keeping this around for 4.0, but  ... yeah. ugh.
CCMAIL:panel-devel@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693361
2007-07-27 20:00:07 +00:00
Aaron J. Seigo
aa1dd0b63f add the layout to the parent. this sucks because it isn't done in Layout where it should be, but setLayout results in pure virtuals being called... so child class it is for now.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692625
2007-07-26 02:30:16 +00:00
Aaron J. Seigo
f82a4cfb55 separate out the stuff the hbox will need from vbox and put it into box.
sprinkle "layout" and some capital letters throughout the above if the above sounds random to you ;)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692578
2007-07-25 22:20:15 +00:00