@@ -214,6 +214,7 @@ static QString getCacheKey( const QString & _key,
|
||||
}
|
||||
|
||||
|
||||
|
||||
LmmsStyle::LmmsStyle() :
|
||||
QPlastiqueStyle()
|
||||
{
|
||||
@@ -229,8 +230,12 @@ LmmsStyle::LmmsStyle() :
|
||||
|
||||
QPalette LmmsStyle::standardPalette( void ) const
|
||||
{
|
||||
|
||||
QPalette pal = QPlastiqueStyle::standardPalette();
|
||||
/* pal.setColor( QPalette::Background, QColor( 91, 101, 113 ) );
|
||||
|
||||
/* sane defaults in case fetching from stylesheet fails*/
|
||||
|
||||
pal.setColor( QPalette::Background, QColor( 91, 101, 113 ) );
|
||||
pal.setColor( QPalette::WindowText, QColor( 240, 240, 240 ) );
|
||||
pal.setColor( QPalette::Base, QColor( 128, 128, 128 ) );
|
||||
pal.setColor( QPalette::Text, QColor( 224, 224, 224 ) );
|
||||
@@ -239,21 +244,23 @@ QPalette LmmsStyle::standardPalette( void ) const
|
||||
pal.setColor( QPalette::ButtonText, QColor( 0, 0, 0 ) );
|
||||
pal.setColor( QPalette::BrightText, QColor( 74, 253, 133 ) );
|
||||
pal.setColor( QPalette::Highlight, QColor( 100, 100, 100 ) );
|
||||
pal.setColor( QPalette::HighlightedText, QColor( 255, 255, 255 ) );*/
|
||||
pal.setColor( QPalette::HighlightedText, QColor( 255, 255, 255 ) );
|
||||
|
||||
/* fetch from stylesheet using regexp */
|
||||
|
||||
QStringList paletteData = qApp->styleSheet().split( '\n' ).filter( QRegExp( "^palette:*" ) );
|
||||
foreach( QString s, paletteData )
|
||||
{
|
||||
if (s.contains("background")) { pal.setColor( QPalette::Background, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains("windowtext")) { pal.setColor( QPalette::WindowText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains("base")) { pal.setColor( QPalette::Base, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains("buttontext")) { pal.setColor( QPalette::ButtonText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains("brighttext")) { pal.setColor( QPalette::BrightText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains("text")) { pal.setColor( QPalette::Text, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains("button")) { pal.setColor( QPalette::Button, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains("shadow")) { pal.setColor( QPalette::Shadow, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains("highlightedtext")) { pal.setColor( QPalette::HighlightedText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains("highlight")) { pal.setColor( QPalette::Highlight, QColor( s.mid( s.indexOf("#"), 7 ) ) ); };
|
||||
if (s.contains(":background")) { pal.setColor( QPalette::Background, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains(":windowtext")) { pal.setColor( QPalette::WindowText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains(":base")) { pal.setColor( QPalette::Base, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains(":buttontext")) { pal.setColor( QPalette::ButtonText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains(":brighttext")) { pal.setColor( QPalette::BrightText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains(":text")) { pal.setColor( QPalette::Text, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains(":button")) { pal.setColor( QPalette::Button, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains(":shadow")) { pal.setColor( QPalette::Shadow, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains(":highlightedtext")) { pal.setColor( QPalette::HighlightedText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
|
||||
else if (s.contains(":highlight")) { pal.setColor( QPalette::Highlight, QColor( s.mid( s.indexOf("#"), 7 ) ) ); };
|
||||
}
|
||||
|
||||
return( pal );
|
||||
|
||||
@@ -252,7 +252,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
|
||||
|
||||
|
||||
// fill own tool-bar
|
||||
m_playButton = new toolButton( embed::getIconPixmap( "play", 24, 24 ),
|
||||
m_playButton = new toolButton( embed::getIconPixmap( "play" ),
|
||||
tr( "Play song (Space)" ),
|
||||
this, SLOT( play() ), m_toolBar );
|
||||
|
||||
@@ -275,7 +275,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
|
||||
m_recordAccompanyButton->setDisabled( true );
|
||||
}
|
||||
|
||||
m_stopButton = new toolButton( embed::getIconPixmap( "stop", 24, 24 ),
|
||||
m_stopButton = new toolButton( embed::getIconPixmap( "stop" ),
|
||||
tr( "Stop song (Space)" ),
|
||||
this, SLOT( stop() ), m_toolBar );
|
||||
|
||||
|
||||
@@ -99,10 +99,10 @@ void fadeButton::paintEvent( QPaintEvent * _pe )
|
||||
|
||||
int w = rect().right();
|
||||
int h = rect().bottom();
|
||||
p.setPen( QColor( 37, 39, 46 ) );
|
||||
p.setPen( m_normalColor.darker(130) );
|
||||
p.drawLine( w, 1, w, h );
|
||||
p.drawLine( 1, h, w, h );
|
||||
p.setPen( QColor( 145, 147, 154 ) );
|
||||
p.setPen( m_normalColor.lighter(130) );
|
||||
p.drawLine( 0, 0, 0, h-1 );
|
||||
p.drawLine( 0, 0, w, 0 );
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ void fader::paintEvent( QPaintEvent * ev)
|
||||
|
||||
if( m_persistentPeak_L > 0.05 )
|
||||
{
|
||||
painter.fillRect( QRect( 2, persistentPeak_L, 4, 1 ), (m_persistentPeak_L < 1.0 )? QColor( 0, 200, 0) : QColor( 200, 0, 0));
|
||||
painter.fillRect( QRect( 2, persistentPeak_L, 4, 1 ), (m_persistentPeak_L < 1.0 )? QColor( 74, 253, 133) : QColor( 255, 100, 100));
|
||||
}
|
||||
|
||||
int peak_R = calculateDisplayPeak( m_fPeakValue_R - m_fMinPeak );
|
||||
@@ -299,11 +299,11 @@ void fader::paintEvent( QPaintEvent * ev)
|
||||
|
||||
if( m_persistentPeak_R > 0.05 )
|
||||
{
|
||||
painter.fillRect( QRect( 16, persistentPeak_R, 4, 1 ), (m_persistentPeak_R < 1.0 )? QColor( 0, 200, 0) : QColor( 200, 0, 0));
|
||||
painter.fillRect( QRect( 16, persistentPeak_R, 4, 1 ), (m_persistentPeak_R < 1.0 )? QColor( 74, 253, 133) : QColor( 255, 100, 100));
|
||||
}
|
||||
|
||||
// knob
|
||||
painter.drawPixmap( 4, knobPosY() - m_knob.height(), m_knob );
|
||||
painter.drawPixmap( 0, knobPosY() - m_knob.height(), m_knob );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1007,8 +1007,10 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV
|
||||
m_midiInputAction->setText( tr( "Input" ) );
|
||||
m_midiOutputAction->setText( tr( "Output" ) );
|
||||
|
||||
m_activityIndicator = new fadeButton( QColor( 56, 60, 72 ),
|
||||
QColor( 64, 255, 16 ),
|
||||
m_activityIndicator = new fadeButton( QApplication::palette().color( QPalette::Active,
|
||||
QPalette::Background),
|
||||
QApplication::palette().color( QPalette::Active,
|
||||
QPalette::BrightText ),
|
||||
getTrackSettingsWidget() );
|
||||
m_activityIndicator->setGeometry(
|
||||
widgetWidth-2*24-11, 2, 8, 28 );
|
||||
|
||||
Reference in New Issue
Block a user