Mocups of focus hints for panes

Jarosław Staniek js at iidea.pl
Sun Nov 26 20:05:17 GMT 2006


Gary Cramblitt wrote:

> I am not an expert, but I believe the real question is: Do the existing
> style
> capabilities support clearly showing focus as you propose?  If not, what
> would it take to enable that support?

Yes, I am interested in looking for the solution while porting application(s) 
that benefit from the improvement. The first question to answer is: whether 
the QTabWidget can be styled appropriately. The best possible solution could 
be to have the change at Qt level, probably forcing any Qt or KDE style to 
display the focused tab widget somewhat highlighted. 

PS: talking about tab's "highlight" color we have at least two possibilities:
1. to take the highlight color: QPalette::Highlight
2. to take the "active" color from the window decoration

The second option is a problem when:
-someone uses semitransparend decorations, or
-the color is the same as QPalette::Window (at least Linspire uses/used white 
here) what can make the focus information not visible again

So, the 1st solution is not only consistent with the current QStyle, but also 
tab's caption text can be displayed with QPalette::HighlightedText.
 
If we had to implement the functionality by using a hack, there is 
QTabBar::setTabTextColor() available for us, but not QTabBar::setTabColor().

I am looking forward to get an advice for a simple and clean solution.

-- 
regards / pozdrawiam, Jaroslaw Staniek
 Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
 Kexi & KOffice: http://www.kexi-project.org, http://www.koffice.org
 KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org




More information about the kde-core-devel mailing list