Flatened the design of the GroupBox widget

This commit is contained in:
Cyrille Bollu
2016-05-13 16:23:51 +02:00
parent efac64cef7
commit d6c72eda45
2 changed files with 3 additions and 11 deletions

View File

@@ -40,7 +40,7 @@ EffectRackView::EffectRackView( EffectChain* model, QWidget* parent ) :
ModelView( NULL, this )
{
QVBoxLayout* mainLayout = new QVBoxLayout( this );
mainLayout->setMargin( 0 );
mainLayout->setMargin( 5 );
m_effectsGroupBox = new GroupBox( tr( "EFFECTS CHAIN" ) );
mainLayout->addWidget( m_effectsGroupBox );

View File

@@ -107,18 +107,10 @@ void GroupBox::updatePixmap()
p.setPen( bg_color.dark( 150 ) );
p.drawRect( 0, 0, width() - 1, height() - 1 );
// brighter line at bottom/right
p.setPen( bg_color.light( 150 ) );
p.drawLine( width() - 1, 0, width() - 1, height() - 1 );
p.drawLine( 0, height() - 1, width() - 1, height() - 1 );
// draw line below titlebar
p.setPen( bg_color.dark( 400 ) );
p.drawLine( 1, m_titleBarHeight + 1, width() - 3, m_titleBarHeight + 1 );
// black inner rect
p.drawRect( 1, 1, width() - 3, height() - 3 );
p.fillRect( 1, 1, width() - 2, m_titleBarHeight + 1, bg_color.darker( 150 ) );
// draw text
p.setPen( palette().color( QPalette::Active, QPalette::Text ) );
p.setFont( pointSize<8>( font() ) );
p.drawText( 22, m_titleBarHeight, m_caption );