Skip to content

Tip: a little polishing

Tuesday, 18 November 2008  |  trueg

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...