QTabWidget change request

Robert Knight robertknight at gmail.com
Thu Feb 15 17:34:12 GMT 2007


Hello,

Something which I would like to see in KDE 4 is a cleanup of the
excessive frames and borders which litter some applications.  Many of
these changes are small junior jobs which can be done easily.

One persistant offender is QTabWidget.  QTabWidget always has a border
which cannot be turned off.  This border is appropriate in some cases,
but leads to ugly results in others.

Here are a couple of examples:

- In Konqueror, there is a 5 pixel area at the bottom of the window
consisting of the bottom tab widget border and the extra space around
it created by the border.

- Konsole has a bug report against it with > 200 votes which I would
very much like to fix in KDE 4, where the terminal area always has a
border around it, even when there are no tabs, in addition to a border
at the bottom of the window ( as seen in Konqueror ).  This is
problematic because I have a significant number of users who would
like to have a terminal which merges into their desktop background or
which runs fullscreen on one monitor.  The border around the widget
means that this illusion is not possible.

There are various hacks which could be used, such as rewriting
QTabWidget, or using a custom style.  The workarounds I was
experimenting with ended up getting quite complex though, and I think
it would be much neater and simpler to fix this in QTabWidget itself.
I have reported the problem to the trolls, but didn't succeed in
getting it confirmed as a bug.  The support engineer suggested that I
use a custom style to achieve the effect, which is problematic because
the solution needs to work regardless of the style that is being used.
 I am posting this here to hopefully reach the people who can make
this change or provide advice on how I should implement this myself.

The basic requirements then are:

- The ability to turn the frame around the tab widget on or off.
- If the frame is off, the widget inside should take up the full page
area of the tab with no border between the widget and the edge.
- If the tab bar widget is visible, then the top border between the
tab page area and the bar should be drawn regardless of whether the
frame is on or off.
- If the tab bar widget is not visible, the top border should be drawn
if the frame is on, but not drawn if the frame is off.

Regards,
Robert Knight.




More information about the kde-core-devel mailing list