[Panel-devel] [PATCH] Layout Code Update

Aaron J. Seigo aseigo at kde.org
Sun Jul 22 04:48:29 CEST 2007


On Saturday 21 July 2007, Matias Valdenegro T. wrote:
> Hi :
>
> Latest code for Layouts, interface is probably finished and just need to
> port Widgets to use Plasma::Widget API, so they can be managed by the
> layout managers, and implement HBoxLayout and GridLayout.

looks somewhat simpler now, and that it works better is a bonus of course ;) 
++kudos for apidox. in fact, i have to say that that is probably my favourite 
part of this patch =))

some comments:

in Widget:invalidate:

-    if (parent()) {
+    if (parent())
         parent()->updateGeometry();
-    }

single line if's also get {}s. ditto in Widget::setLayout

in PushButton::PushButton(Widget *parent):

could you add a //FIXME comment above this line noting that we need to get rid 
of the hard coded colour: 

+    d->labelTextColor = QColor(201, 201, 255);

in PushButton::sizeHint():

+ QFontMetricsF m(QFont("Arial", 12)); 

grab the font from the application:

+ QFontMetricsF m = qApp->fontMetrics();

i guess that this in Label::Label :

+    setText("Plasma Rocks! Plasma Rocks! Plasma Rocks!");

is just for testing and won't actually make it into the commit...

otherwise, looks good... if you can touch up those little things, please 
commit. layouts! woo!

with an hbox layout i can start doing panels in a serious fashion..

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070721/d4ea6909/attachment.pgp 


More information about the Panel-devel mailing list