diff --git a/data/themes/default/style.css b/data/themes/default/style.css index 23ea03af9..29e709744 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -481,6 +481,23 @@ SideBar QToolButton { font-size: 12px; } +/* Instrument plugin list */ + +PluginDescList { + background-color: #5b6571; +} + +PluginDescWidget { + background-color: #e0e0e0; + color: #404040; + border: 1px solid rgb(64, 64, 64); + margin: 0px; +} + +PluginDescWidget:hover { + background-color: #e0e0e0; +} + /* font sizes for text buttons */ FxMixerView QPushButton, EffectRackView QPushButton, ControllerRackView QPushButton { diff --git a/src/gui/PluginBrowser.cpp b/src/gui/PluginBrowser.cpp index 14f99273e..57e823dc7 100644 --- a/src/gui/PluginBrowser.cpp +++ b/src/gui/PluginBrowser.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include "embed.h" #include "debug.h" @@ -135,21 +136,22 @@ PluginDescWidget::~PluginDescWidget() -void PluginDescWidget::paintEvent( QPaintEvent * ) +void PluginDescWidget::paintEvent( QPaintEvent * e ) { - const QColor fill_color = m_mouseOver ? QColor( 224, 224, 224 ) : - QColor( 192, 192, 192 ); QPainter p( this ); - p.fillRect( rect(), fill_color ); + // Paint everything according to the style sheet + QStyleOption o; + o.initFrom( this ); + style()->drawPrimitive( QStyle::PE_Widget, &o, &p, this ); + + // Draw the rest const int s = 16 + ( 32 * ( tLimit( height(), 24, 60 ) - 24 ) ) / ( 60 - 24 ); const QSize logo_size( s, s ); QPixmap logo = m_logo.scaled( logo_size, Qt::KeepAspectRatio, Qt::SmoothTransformation ); - p.setPen( QColor( 64, 64, 64 ) ); - p.drawRect( 0, 0, rect().right(), rect().bottom() ); p.drawPixmap( 4, 4, logo ); QFont f = p.font();