Kickoff multiple columns

Aaron J. Seigo aseigo at kde.org
Thu Jul 31 22:21:33 CEST 2008


On Thursday 31 July 2008, Luiz Felipe Talvik wrote:
> Hi again
> This was freakin hard. That thing about fluid is complicated. :-)
>
> There is no need to look or compile the patch, the code is functional
> but unreadable(the next thing in my todo list).
> Here are the screen shots of the behavior:
> http://www.comp.ufscar.br/~talvik/kickoff/screenshot.png
> http://www.comp.ufscar.br/~talvik/kickoff/screenshot1.png
> http://www.comp.ufscar.br/~talvik/kickoff/screenshot2.png
> http://www.comp.ufscar.br/~talvik/kickoff/screenshot3.png
> http://www.comp.ufscar.br/~talvik/kickoff/screenshot4.png
> http://www.comp.ufscar.br/~talvik/kickoff/screenshot5.png

in this one, documents is on the first tab. i have to say that i much prefer 
the look in #4, even if it would mean adding a scrollbar... hm.

> http://www.comp.ufscar.br/~talvik/kickoff/screenshot6.png
> http://www.comp.ufscar.br/~talvik/kickoff/screenshot7.png
> http://www.comp.ufscar.br/~talvik/kickoff/screenshot8.png

and again here, i wonder if it would look better with Sessions and System in 
separate colums? i suppose that means an even strong bias towards headings in 
their own columns, like in shot 9:

> http://www.comp.ufscar.br/~talvik/kickoff/screenshot9.png

very nice

something that occured to me while looking at this is that the right aligned 
headers only really "work" visually if there is a single column. in multi-
column, i bet they'd look a lot nicer centered (and in single column, they 
probably look nicer right aligned)

> http://www.comp.ufscar.br/~talvik/kickoff/screenshot10.png

woah =)



> Aaron, you said I should base the minimum size of the column with
> "Fits", but the items don't have a limited size. So I propose to base
> the minimum size on a certain number of chars(independent of font size
> a least a minimum number of chars would appear). I don't know how to
> implement that(just reverse engineering until now), something about
> Qstyle right?

you should be able to just set the width on the item, and have the item itself 
(or, rather, the delegate .. most of that code is in libs/plasma/delegate.* 
these days) handle squeezing it's painting in properly.

as for determining the width, QFontMetrics can tell you the width of a 
character, so something like:

QFontMetrics fm(font());
int maxWidth = fm.width('m') * maxNumberOfCharacters;

> When the name is to long I wanted it to look like this:
> http://www.comp.ufscar.br/~talvik/kickoff/20080729_applications_browsing3.j
>pg By the way, I couldn't find lancelot't code in svn, where is it?

in kdeplasma-addons/applets/lancelot

the trick is to paint only the number of letters that will fit (Qt does that 
for you) and then paint over it a gradient ...

> What to improve? What doesn't look right? Wishes?

the above are my comments.. great work so far, i look forward to reviewing the 
cleaned up patch and getting this into svn for 4.2 =)

-- 
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: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080731/d1142a74/attachment.pgp 


More information about the Plasma-devel mailing list