[PATCH] Several rows in taskbar

Aaron J. Seigo aseigo at kde.org
Mon Jan 21 06:54:34 CET 2008


On Saturday 19 January 2008, Olivier Goffart wrote:
> Hi,
>
> The patch add the support for showing taskbar entry in several rows  (with
> all the animations ans stuff)
> When there is too much task shown in the taskbar, it automatically take
> more rows.

in general i like it =)

i wonder if the ratio of 2.25 is too high (low?) .. that gives me 7 buttons 
across on my screen with the 8th one wrapping. i also wonder if it shouldn't 
take into consideration the resulting height of the rows and try and decrease 
the ratio if the rowcount becomes too high; or perhaps just put an upper 
limit on rows based on the height of the item.

style comments:

all "if(" need to become "if (", ditto for "for(" ... also, all blocks, even 
single liners, need braces.. so:

+            if(!itemExp)
+                hint = qMax(hint,d->size(item->sizeHint()));

becomes:

+            if (!itemExp) {
+                hint = qMax(hint, d->size(item->sizeHint()));
+            }

spacing is godly:

height = (geometry.height()-q->spacing()*(rowCount-1))/rowCount;

becomes:

height = (geometry.height() - q->spacing() * (rowCount - 1)) / rowCount;

aah! =) generally though, the style is good .. just a few niggles here and 
there. 

> Why did i modify this layout and not creating a ne "GridLayout"?  Because
> the API stay the same, and the code is the same if row==1.

this is fine. as you (or someone) noted later in this thread, this is not a 
true grid layout. this will do us just fine between now and WoC.

-- 
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: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080120/2001c143/attachment.pgp 


More information about the Panel-devel mailing list