From fbc77a3005c620b5f4ce4df8af2aa8b631d6f94a Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 13 Dec 2005 14:13:39 +0000 Subject: [PATCH] Bug IPAL10673: Mark active viewer better --- src/Qtx/QtxWorkstack.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index 49880c2f7..b2b47d0cf 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -36,6 +36,12 @@ #include #include +#define ACTIVE_PIXEL_SIZE 15 +#define NOT_ACTIVE_PIXEL_SIZE 12 +#define ACTIVE_COLOR_HIGHLIGHT Qt::blue +#define ACTIVE_COLOR_HIGHLIGHT_TEXT Qt::yellow + + /*! Class: QtxWorkstack [Public] Descr: @@ -1770,6 +1776,17 @@ void QtxWorkstackTabBar::setActive( const bool on ) { QFont aFont = font(); aFont.setUnderline( on ); + if (on) { + QPalette aPal = palette(); + aFont.setPixelSize(ACTIVE_PIXEL_SIZE); + aPal.setColor(QColorGroup::Highlight, ACTIVE_COLOR_HIGHLIGHT); + aPal.setColor(QColorGroup::HighlightedText, ACTIVE_COLOR_HIGHLIGHT_TEXT); + setPalette(aPal); + } + else { + aFont.setPixelSize(NOT_ACTIVE_PIXEL_SIZE); + unsetPalette(); + } setFont( aFont ); update(); @@ -1844,6 +1861,7 @@ void QtxWorkstackTabBar::paintLabel( QPainter* p, const QRect& br, QTab* t, bool { QFont fnt = p->font(); fnt.setUnderline( false ); + fnt.setPixelSize(NOT_ACTIVE_PIXEL_SIZE); p->setFont( fnt ); } QTabBar::paintLabel( p, br, t, has_focus ); -- 2.39.2