KCapacitybar on places item view

Kevin Ottens ervin at kde.org
Tue Jul 29 09:03:43 BST 2008

Le Tuesday 29 July 2008, Rafael Fernández López a écrit :
> I would like to know what do you think about committing the attached patch
> to trunk.

I'm still against this "feature" as we already discussed on IRC. As a summary 
for the list audience: I honestly think it only provides visual cluttering, 
this information belongs in a properties dialog, not constantly right under 
your nose.

> Patch:
> http://media.ereslibre.es/2008/07/kdelibs-capacitybar.diff
> What do you think ?

About the patch itself:
 * It doesn't build for me:
/d/kde/src/trunk/kdelibs/kfile/kfileplacesview.cpp:172: error: passing ‘const 
KCapacityBar’ as ‘this’ argument of ‘void KCapacityBar::setValue(int)’ 
discards qualifiers
To fix it, better make the capacity bar a local variable of the method, no 
need to make it a member of the class.

 * Please avoid using magic numbers, there's several instances of 8 and 16 for 
margins I think. Declare and use constants with meaningful names. There's 
already a few magic numbers in there IIRC, let's not introduce more of them. 

 * How is the capacity bar updated? I can clearly see bug reports coming from 
users "bleh, the bars in Dolphin are randomly updated when I copy something". 
Indeed as far as I can see, they're updated on paint, so if nothing trigger 
the repaint of the item it'll stay as is for a while...

 * At least provide a flag to disable the painting of this bar (and it should 
be disabled by default), or automatically disable the painting depending on 
the space available in the view (I still don't like it, but it's even worse in 
the KFileDialog, and for smaller sizes in the view). Obviously I prefer this 
second solution, more in line with the design of this widget which adapts to 
the space it has.

Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080729/d709f00c/attachment.sig>

More information about the kde-core-devel mailing list