NOV
18
2008

Tip: a little polishing

I always thought that some KDE apps looked a bit cluttered. Yesterday I finally tried to do something about it. I started with Gwenview. Two things bothered me: 1. the status bar buttons were too small for their text. Easy to solve by simply not forcing the height of the statusbar. 2. the sidebar had a different color than the status bar. Now this is due to Oxygen using gradients which is cool. It turned out to be rather simple. And this is also the actual reason for this blog.

A tip: whenever using sidebars with scroll areas which are supposed to have the Window color as Base do NOT use something like setBackgroundRole( QPalette::Base ). Better let the scroll area not print any background at all. Simply do that by changing the viewport properties:


sidebar->viewport()->setAutoFillBackground( false );

And if you are using QScrollArea be aware that it changes this property also for the widget set via QScrollArea::setWidget. Thus:


sidebar->setWidget( myWidget );
myWidget->setAutoFillBackground( false );

Enough words. This is what it looks like. Notice the difference in the lower right.

And BTW: Now that apparently the blogging system changed, how do I properly include images? [image:ID] was a really nice system...

Comments

...Two "bugs" what I have never liked. Does the button with text -size actually affect all buttons, example on websites? Some sites gets button style from Qt and then it is very thin and text looks ugly etc. So this fix those too?

The other bug what you "fixed" same time was that slider to be viewed as full. No more cut off from down! These small tweaks makes me happy! :-D


By fri13 at Tue, 11/18/2008 - 19:00

Why the sudden increased interest in Gwenview? I bet you have a lot of pictures of a certain person.

Ok, enough for the teasing. The second screenshot is definitely better.


By Jos van den Oever at Wed, 11/19/2008 - 08:04

Thanks for the fixes!

You may notice I changed your statusbar button fix a bit. Your changes caused the statusbar to change height when switching between browse and view mode.
The weird margins in browse mode were caused by code which mimicked QStatusBar hardcoded margins. This was needed because view mode used to display documents through KParts, which used QStatusBar. Now that KParts are gone, there is no need for such hacks. Thanks for reminding me :)


By aurélien gâteau at Wed, 11/19/2008 - 08:53