diff --git a/data/themes/default/style.css b/data/themes/default/style.css index a66f77995..8a81f1c7f 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -126,6 +126,10 @@ PianoRoll { qproperty-textShadow: rgb( 240, 240, 240 ); } +TabWidget { + background-color: #5b6571; +} + /* main toolbar oscilloscope - can have transparent bg now */ VisualizationWidget { diff --git a/src/gui/widgets/TabWidget.cpp b/src/gui/widgets/TabWidget.cpp index 0dce73144..331a2cc81 100644 --- a/src/gui/widgets/TabWidget.cpp +++ b/src/gui/widgets/TabWidget.cpp @@ -48,24 +48,21 @@ TabWidget::TabWidget( const QString & caption, QWidget * parent, bool usePixmap setFont( pointSize<8>( font() ) ); setAutoFillBackground( true ); - QColor bg_color = QApplication::palette().color( QPalette::Active, - QPalette::Background ). - darker( 132 ); - QPalette pal = palette(); - pal.setColor( QPalette::Background, bg_color ); - setPalette( pal ); + QColor bg_color = QApplication::palette().color( QPalette::Active, + QPalette::Background ). + darker( 132 ); + QPalette pal = palette(); + pal.setColor( QPalette::Background, bg_color ); + setPalette( pal ); + } - - TabWidget::~TabWidget() { } - - void TabWidget::addTab( QWidget * w, const QString & name, const QString & tooltip, const char *activePixmap, const char *inactivePixmap, int idx ) { setFont( pointSize<8>( font() ) ); @@ -209,16 +206,17 @@ void TabWidget::paintEvent( QPaintEvent * pe ) setFont( pointSize<8>( font() ) ); QPainter p( this ); - QColor bg_color = QApplication::palette().color( QPalette::Active, QPalette::Background ); +// QColor bg_color = QApplication::palette().color( QPalette::Active, QPalette::Background ); + QBrush bg_color = p.background(); p.fillRect( 0, 0, width() - 1, height() - 1, bg_color ); bool big_tab_captions = ( m_caption == "" ); - p.setPen( bg_color.darker( 150 ) ); + p.setPen( bg_color.color().darker( 150 ) ); p.drawRect( 0, 0, width() - 1, height() - 1 ); - p.setPen( bg_color.light( 150 ) ); + p.setPen( bg_color.color().light( 150 ) ); p.drawLine( width() - 1, 0, width() - 1, height() - 1 ); p.drawLine( 0, height() - 1, width() - 1, height() - 1 );