diff --git a/data/themes/default/mixer_send_on.png b/data/themes/default/mixer_send_on.png index 15c8fac44..5982ea3f6 100644 Binary files a/data/themes/default/mixer_send_on.png and b/data/themes/default/mixer_send_on.png differ diff --git a/data/themes/default/send_bg_arrow.png b/data/themes/default/send_bg_arrow.png index daeb9fe65..8c4bfcf93 100644 Binary files a/data/themes/default/send_bg_arrow.png and b/data/themes/default/send_bg_arrow.png differ diff --git a/include/FxLine.h b/include/FxLine.h index 2445e2aac..2f55bf3eb 100644 --- a/include/FxLine.h +++ b/include/FxLine.h @@ -61,10 +61,13 @@ public: static const int FxLineHeight; private: + static void drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, bool isActive, bool sendToThis ); + FxMixerView * m_mv; LcdWidget* m_lcd; int m_channelIndex; QBrush m_backgroundActive; + static QPixmap * s_sendBgArrow; private slots: void renameChannel(); diff --git a/src/gui/FxMixerView.cpp b/src/gui/FxMixerView.cpp index f55112e26..86c6c735d 100644 --- a/src/gui/FxMixerView.cpp +++ b/src/gui/FxMixerView.cpp @@ -121,7 +121,7 @@ FxMixerView::FxMixerView() : channelArea->setMinimumWidth( fxLineSize.width() * 6 ); channelArea->setFixedHeight( fxLineSize.height() + style()->pixelMetric( QStyle::PM_ScrollBarExtent ) ); - ml->addWidget(channelArea); + ml->addWidget( channelArea, 1, Qt::AlignTop ); // show the add new effect channel button QPushButton * newChannelBtn = new QPushButton( embed::getIconPixmap( "new_channel" ), QString::null, this ); @@ -132,7 +132,7 @@ FxMixerView::FxMixerView() : // add the stacked layout for the effect racks of fx channels - ml->addWidget( m_racksWidget, 0, Qt::AlignTop ); + ml->addWidget( m_racksWidget, 0, Qt::AlignTop | Qt::AlignRight ); setCurrentFxLine( m_fxChannelViews[0]->m_fxLine ); diff --git a/src/gui/widgets/FxLine.cpp b/src/gui/widgets/FxLine.cpp index ac051d799..ce696cc10 100644 --- a/src/gui/widgets/FxLine.cpp +++ b/src/gui/widgets/FxLine.cpp @@ -40,12 +40,18 @@ #include "caption_menu.h" const int FxLine::FxLineHeight = 287; +QPixmap * FxLine::s_sendBgArrow = NULL; FxLine::FxLine( QWidget * _parent, FxMixerView * _mv, int _channelIndex) : QWidget( _parent ), m_mv( _mv ), m_channelIndex( _channelIndex ) { + if( ! s_sendBgArrow ) + { + s_sendBgArrow = new QPixmap( embed::getIconPixmap( "send_bg_arrow", 29, 56 ) ); + } + setFixedSize( 33, FxLineHeight ); setAttribute( Qt::WA_OpaquePaintEvent, true ); setCursor( QCursor( embed::getIconPixmap( "hand" ), 0, 0 ) ); @@ -97,7 +103,7 @@ void FxLine::setChannelIndex(int index) { } -static void drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, bool isActive, bool sendToThis ) +void FxLine::drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, bool isActive, bool sendToThis ) { int width = fxLine->rect().width(); int height = fxLine->rect().height(); @@ -111,10 +117,7 @@ static void drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, p->fillRect( fxLine->rect(), isActive ? fxLine->backgroundActive() : p->background() ); - p->setPen( QColor( 0, 0, 0, 75 ) ); - p->drawRect( 0, 0, width-2, height-2 ); - - p->setPen( QColor( 255, 255, 255, 75 ) ); + p->setPen( QColor( 255, 255, 255, isActive ? 100 : 50 ) ); p->drawRect( 1, 1, width-3, height-3 ); p->setPen( isActive ? sh_color : QColor( 0, 0, 0, 50 ) ); @@ -123,8 +126,7 @@ static void drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, // draw the mixer send background if( sendToThis ) { - p->drawPixmap( 3, 0, 28, 56, - embed::getIconPixmap("send_bg_arrow", 28, 56 ) ); + p->drawPixmap( 2, 0, 29, 56, *FxLine::s_sendBgArrow ); } // draw the channel name @@ -145,11 +147,11 @@ void FxLine::paintEvent( QPaintEvent * ) { FxMixer * mix = engine::fxMixer(); bool sendToThis = mix->channelSendModel( - m_mv->currentFxLine()->m_channelIndex, m_channelIndex) != NULL; + m_mv->currentFxLine()->m_channelIndex, m_channelIndex ) != NULL; QPainter painter; painter.begin( this ); drawFxLine( &painter, this, - mix->effectChannel(m_channelIndex)->m_name, + mix->effectChannel( m_channelIndex )->m_name, m_mv->currentFxLine() == this, sendToThis ); painter.end(); }