Merge pull request #24 from diizy/stable-0.4

Merge for now and let's fix things later.
This commit is contained in:
tobydox
2014-01-15 10:29:03 -08:00
13 changed files with 207 additions and 71 deletions

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 845 B

After

Width:  |  Height:  |  Size: 642 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

After

Width:  |  Height:  |  Size: 353 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 995 B

After

Width:  |  Height:  |  Size: 576 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 914 B

After

Width:  |  Height:  |  Size: 564 B

View File

@@ -18,20 +18,20 @@ QToolTip {
border-radius: 4px;
background: qlineargradient(spread:reflect, x1:0.5, y1:0.5, x2:0.5, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(50, 50, 50, 220));
opacity: 175;
border: 1.5px solid rgba(0,0,0,255);
color: #00ff00;
border: 1.0px solid rgba(0,0,0,255);
color: #4afd85;
}
QMenu {
border:1px solid black;
background-color: rgb( 192, 192, 192 );
border:1px solid #747474;
background-color: #c9c9c9;
font-size:11px;
}
QMenu::separator {
height: 1px;
background: rgb(128,128,128);
background: #c9c9c9;
margin-left: 5px;
margin-right: 5px;
}
@@ -45,16 +45,16 @@ QMenu::item {
QMenu::item:selected {
color: white;
font-weight:bold;
background-color: rgb(54,57,66);
background-color: #747474;
margin:3px;
}
QMenu::item:disabled {
color: white;
color: #747474;
background-color: #c9c9c9;
margin:0px;
background-color: rgba(0,0,0,192);
font-size:12px;
font-weight:bold;
font-weight: normal;
padding: 4px 32px 4px 20px;
}
@@ -62,7 +62,7 @@ QMenu::indicator {
width: 16;
height: 16;
opacity: 0;
background-color: rgb( 192, 192, 192 );
background-color: #c9c9c9;
}
QMenu::indicator:checked {
@@ -70,18 +70,48 @@ QMenu::indicator:checked {
}
QMenu::indicator:selected {
background-color: rgb(54,57,66);
image: url("resources:apply-selected.png");
background-color: #747474;
}
pianoRoll {
background-color: rgb(0, 0, 0);
}
/*TrackContainerView QWidget{
background-color: #5b6571;
}*/
TrackContainerView QFrame{
background-color: #49515b;
}
trackOperationsWidget > QPushButton {
max-height: 26px;
max-width: 26px;
min-height: 26px;
min-width: 26px;
background-color: #c9c9c9;
border-radius: 2px;
border: 1px solid rgba(0,0,0,64);
}
trackOperationsWidget > QPushButton:hover {
background: qlineargradient(spread:reflect, x1:0.5, y1:0.5, x2:0.5, y2:0, stop:0 rgba(224, 224, 224, 255), stop:1 rgba(201, 201, 201, 255));
border: 1px solid rgba(0,0,0,255);
color: black;
}
trackOperationsWidget > QPushButton:pressed {
background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #747474, stop:0.5 #c9c9c9, stop:1 #c0c0c0 );
border: 1px solid rgba(0,0,0,255);
color: black;
}
trackOperationsWidget > QPushButton:flat {
background-color: #c9c9c9;
border-radius: 2px;
border: none;
}
trackOperationsWidget#automationDisabled > QPushButton::menu-indicator {
@@ -92,6 +122,16 @@ trackOperationsWidget#automationEnabled > QPushButton::menu-indicator {
image: url(resources:track_op_menu.png);
}
trackOperationsWidget > QPushButton::menu-indicator {
subcontrol-origin: padding;
subcontrol-position: center;
}
trackOperationsWidget > QPushButton::menu-indicator:pressed {
position: relative;
top: 1px;
}
trackWidget {
/* border-bottom: 1px solid rgb(0, 0, 0);*/
background-color: rgb(0, 0, 0);
@@ -102,45 +142,91 @@ nameLabel, effectLabel, sf2InstrumentView > QLabel {
QWidget#mainToolbar {
background-image: url(resources:main_toolbar_bg.png);
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #98a2a7, stop:1 #5b646f);
}
QToolBar {
background: url(resources:toolbar_bg.png);
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #98a2a7, stop:1 #5b646f);
}
QToolButton, toolButton {
padding: 2px 1px 1px 2px;
border-radius: 2px;
border: 1px solid rgba(0,0,0,64);
background: rgba(172,176,188,32);
background: qradialgradient(cx:0.3, cy:0.3, radius:0.8, fx:0.3, fy:0.3, stop:0 #c9c9c9, stop:0.5 #c0c0c0, stop:1 #747474 );
font-size:10px;
color: black;
}
QToolButton:hover, toolButton:hover {
background: qradialgradient(cx:0.3, cy:0.3, radius:0.8, fx:0.3, fy:0.3, stop:0 #e0e0e0, stop:0.5 #c9c9c9, stop:1 #747474 );
border: 1px solid rgba(0,0,0,255);
color: white;
}
QToolButton:hover {
background: rgba(255,255,255,96);
QToolButton:pressed, ToolButton:pressed {
background: qradialgradient(cx:0.3, cy:0.3, radius:0.8, fx:0.3, fy:0.3, stop:0 #c9c9c9, stop:0.5 #c0c0c0, stop:1 #747474 );
padding: 3px 1px 0px 2px;
border: 1px solid rgba(0,0,0,255);
color: white;
}
QToolButton:checked, ToolButton:checked {
background: qradialgradient(cx:0.3, cy:0.3, radius:0.8, fx:0.3, fy:0.3, stop:0 #e0e0e0, stop:0.8 #c9c9c9, stop:1 #c0c0c0 );
border-radius: 3px;
padding: 3px 1px 0px 2px;
border: 1px solid rgba(0,0,0,255);
color: black;
}
QToolButton:pressed {
background: rgba(192,192,192,96);
padding: 3px 0px 0px 3px;
border-radius: 3px;
border: 1px solid rgba(255,255,255,64);
trackLabelButton {
background-color: #5b6571;
color: #c9c9c9;
font-size: 10px;
font-weight: normal;
border-radius: 1px;
border: 1px solid rgba(0,0,0,64);
}
QToolButton:checked {
background: rgba(233,239,255,96);
border-radius: 3px;
border: 1px solid black;
padding: 3px 0px 0px 3px;
trackLabelButton:hover {
background-color: #7b838d;
color: white;
border: 1px solid black;
}
trackLabelButton:pressed {
background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.5 #5b6571, stop:1 #6b7581 );
color: white;
border: 1px solid black;
font-weight: bold;
}
trackLabelButton:checked {
background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.5 #5b6571, stop:1 #6b7581 );
color: #c9c9c9;
border: 1px solid rgba(0,0,0,64);
font-weight: bold;
}
trackLabelButton:checked:hover {
background-color: #7b838d;
color: white;
border: 1px solid black;
font-weight: bold;
}
trackLabelButton:checked:pressed {
background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.5 #5b6571, stop:1 #6b7581 );
color: white;
border: 1px solid black;
font-weight: bold;
}
SideBar {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop: 0 #66728c, stop: 1.0 #38404e);
background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop: 0 #98a2a7, stop: 1.0 #5b646f);
}
SideBar QToolButton {
@@ -156,7 +242,7 @@ timeLine {
}
QTreeView {
alternate-background-color: rgb(108,108,108);
alternate-background-color: #747474;
}
/* Plugins */
@@ -215,8 +301,8 @@ organicInstrumentView knob#volKnob {
}
sf2InstrumentView knob {
color: #ff0066;
qproperty-outerColor: rgb(30, 35, 37);
color: #ff00ea;
qproperty-outerColor: rgb(20, 5, 18);
qproperty-innerRadius: 2;
qproperty-outerRadius: 9.2;
qproperty-centerPointX: 15.5;
@@ -230,9 +316,24 @@ opl2instrumentView knob {
qproperty-innerRadius: 2;
qproperty-outerRadius: 9;
qproperty-lineWidth: 2;
}
/* Notes:
}
/* palette information - each colour definition must be on a single line, and the line must begin with "palette:", with no leading whitespace
* colour codes MUST be of the form #RRGGBB */
palette:background {color: #5b6571}
palette:windowtext {color: #f0f0f0}
palette:base {color: #808080}
palette:text {color: #e0e0e0}
palette:button {color: #c9c9c9}
palette:shadow {color: #000000}
palette:buttontext {color: #000000}
palette:brighttext {color: #4afd85}
palette:highlight {color: #303030}
palette:highlightedtext {color: #ffffff}
/* Notes:
lcd-spinbox colors: (12, 250, 150), (37, 57, 42)

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 160 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 789 B

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -863,7 +863,7 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument,
m_reverbButton = new pixmapButton( this );
m_reverbButton->setCheckable( true );
m_reverbButton->move( 24, 176 );
m_reverbButton->move( 14, 180 );
m_reverbButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"reverb_on" ) );
m_reverbButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
@@ -905,7 +905,7 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument,
m_chorusButton = new pixmapButton( this );
m_chorusButton->setCheckable( true );
m_chorusButton->move( 24, 222 );
m_chorusButton->move( 14, 226 );
m_chorusButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
"chorus_on" ) );
m_chorusButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(

View File

@@ -42,6 +42,7 @@
#include "gui_templates.h"
#include "tooltip.h"
#include "pixmap_button.h"
#include "lmms_style.h"
@@ -61,19 +62,36 @@ public:
virtual void paintEvent( QPaintEvent * )
{
QPainter p( this );
p.fillRect( rect(), QColor( 72, 76, 88 ) );
p.setPen( QColor( 40, 42, 48 ) );
QColor bg_color = QApplication::palette().color( QPalette::Active,
QPalette::Background );
QColor sh_color = QApplication::palette().color( QPalette::Active,
QPalette::Shadow );
QColor te_color = QApplication::palette().color( QPalette::Active,
QPalette::Text );
QColor bt_color = QApplication::palette().color( QPalette::Active,
QPalette::BrightText );
p.fillRect( rect(),
m_mv->currentFxLine() == this ? bg_color.lighter(130) : bg_color );
p.setPen( bg_color.darker(130) );
p.drawRect( 0, 0, width()-2, height()-2 );
p.setPen( QColor( 108, 114, 132 ) );
p.setPen( bg_color.lighter(150) );
p.drawRect( 1, 1, width()-2, height()-2 );
p.setPen( QColor( 20, 24, 32 ) );
p.setPen( m_mv->currentFxLine() == this ? sh_color : bg_color.darker(130) );
p.drawRect( 0, 0, width()-1, height()-1 );
p.rotate( -90 );
p.setPen( m_mv->currentFxLine() == this ?
QColor( 0, 255, 0 ) : Qt::white );
p.setFont( pointSizeF( font(), 7.5f ) );
p.setPen( sh_color );
p.drawText( -91, 21, m_name );
p.setPen( m_mv->currentFxLine() == this ? bt_color : te_color );
p.drawText( -90, 20, m_name );
}
virtual void mousePressEvent( QMouseEvent * )
@@ -114,9 +132,11 @@ FxMixerView::FxMixerView() :
FxMixer * m = engine::fxMixer();
m->setHook( this );
QPalette pal = palette();
/* QPalette pal = palette();
pal.setColor( QPalette::Background, QColor( 72, 76, 88 ) );
setPalette( pal );
setPalette( pal );*/
setAutoFillBackground( true );
setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum );
@@ -231,7 +251,7 @@ FxMixerView::FxMixerView() :
// add ourself to workspace
QMdiSubWindow * subWin =
QMdiSubWindow * subWin =
engine::mainWindow()->workspace()->addSubWindow( this );
Qt::WindowFlags flags = subWin->windowFlags();
flags |= Qt::MSWindowsFixedSizeDialogHint;
@@ -292,7 +312,7 @@ void FxMixerView::setCurrentFxLine( int _line )
if ( _line >= 0 && _line < NumFxChannels+1 )
{
setCurrentFxLine( m_fxChannelViews[_line].m_fxLine );
m_bankButtons->button( (_line-1) / 16 )->click();
}
}

View File

@@ -3,7 +3,7 @@
* interface
*
* Copyright (c) 2007-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -33,9 +33,8 @@
#include "lmms_style.h"
lmmsStyle::lmmsStyle() :
QPlastiqueStyle()
lmmsStyle::lmmsStyle() :
QPlastiqueStyle()
{
QFile file( "resources:style.css" );
file.open( QIODevice::ReadOnly );
@@ -50,16 +49,32 @@ lmmsStyle::lmmsStyle() :
QPalette lmmsStyle::standardPalette( void ) const
{
QPalette pal = QPlastiqueStyle::standardPalette();
pal.setColor( QPalette::Background, QColor( 72, 76, 88 ) );
/* 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 ) );
pal.setColor( QPalette::Button, QColor( 172, 176, 188 ) );
pal.setColor( QPalette::Button, QColor( 201, 201, 201 ) );
pal.setColor( QPalette::Shadow, QColor( 0, 0, 0 ) );
pal.setColor( QPalette::ButtonText, QColor( 255, 255, 255 ) );
pal.setColor( QPalette::BrightText, QColor( 0, 255, 0 ) );
pal.setColor( QPalette::Highlight, QColor( 224, 224, 224 ) );
pal.setColor( QPalette::HighlightedText, QColor( 0, 0, 0 ) );
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 ) );*/
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 ) ) ); };
}
return( pal );
}
@@ -97,8 +112,8 @@ void lmmsStyle::drawComplexControl( ComplexControl control,
void lmmsStyle::drawPrimitive( PrimitiveElement element,
const QStyleOption *option, QPainter *painter,
void lmmsStyle::drawPrimitive( PrimitiveElement element,
const QStyleOption *option, QPainter *painter,
const QWidget *widget) const
{
if( element == QStyle::PE_Frame ||
@@ -152,7 +167,7 @@ void lmmsStyle::drawPrimitive( PrimitiveElement element,
lines[1] = QLine(rect.left(), rect.top() + 2,
rect.left(), rect.bottom() - 2);
painter->drawLines(lines, 2);
// outside corner dots - shadow
// 75%
shadow.setAlpha(a50);
@@ -160,7 +175,7 @@ void lmmsStyle::drawPrimitive( PrimitiveElement element,
points[0] = QPoint(rect.left() + 1, rect.top() + 1);
points[1] = QPoint(rect.right() - 1, rect.top() + 1);
painter->drawPoints(points, 2);
// outside end dots - shadow
// 50%
shadow.setAlpha(a25);
@@ -170,7 +185,7 @@ void lmmsStyle::drawPrimitive( PrimitiveElement element,
points[2] = QPoint(rect.right() - 1, rect.top());
points[3] = QPoint(rect.left(), rect.bottom() - 1);
painter->drawPoints(points, 4);
// outside lines - highlight
// 100%
@@ -181,7 +196,7 @@ void lmmsStyle::drawPrimitive( PrimitiveElement element,
lines[1] = QLine(rect.right(), rect.top() + 2,
rect.right(), rect.bottom() - 2);
painter->drawLines(lines, 2);
// outside corner dots - highlight
// 75%
highlight.setAlpha(a50);
@@ -189,7 +204,7 @@ void lmmsStyle::drawPrimitive( PrimitiveElement element,
points[0] = QPoint(rect.left() + 1, rect.bottom() - 1);
points[1] = QPoint(rect.right() - 1, rect.bottom() - 1);
painter->drawPoints(points, 2);
// outside end dots - highlight
// 50%
highlight.setAlpha(a25);
@@ -200,7 +215,7 @@ void lmmsStyle::drawPrimitive( PrimitiveElement element,
points[3] = QPoint(rect.right(), rect.top() + 1);
painter->drawPoints(points, 4);
}
else
else
{
QPlastiqueStyle::drawPrimitive( element, option, painter,
widget );

View File

@@ -70,7 +70,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
m_autoQuit->setLabel( tr( "DECAY" ) );
m_autoQuit->move( 60, 5 );
m_autoQuit->setHintText( tr( "Time:" ) + " ", "ms" );
m_autoQuit->setWhatsThis( tr(
m_autoQuit->setWhatsThis( tr(
"The Decay knob controls how many buffers of silence must pass before the "
"plugin stops processing. Smaller values will reduce the CPU overhead but "
"run the risk of clipping the tail on delay and reverb effects." ) );
@@ -80,7 +80,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
m_gate->setLabel( tr( "GATE" ) );
m_gate->move( 93, 5 );
m_gate->setHintText( tr( "Gate:" ) + " ", "" );
m_gate->setWhatsThis( tr(
m_gate->setWhatsThis( tr(
"The Gate knob controls the signal level that is considered to be 'silence' "
"while deciding when to stop processing signals." ) );
@@ -94,7 +94,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
QFont f = ctls_btn->font();
ctls_btn->setFont( pointSize<7>( f ) );
ctls_btn->setGeometry( 140, 14, 50, 20 );
connect( ctls_btn, SIGNAL( clicked() ),
connect( ctls_btn, SIGNAL( clicked() ),
this, SLOT( editControls() ) );
m_controlView = effect()->controls()->createView();
@@ -115,7 +115,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) :
}
setWhatsThis( tr(
setWhatsThis( tr(
"Effect plugins function as a chained series of effects where the signal will "
"be processed from top to bottom.\n\n"
@@ -264,7 +264,7 @@ void EffectView::paintEvent( QPaintEvent * )
f.setBold( true );
p.setFont( f );
p.setPen( QColor( 64, 64, 64 ) );
p.setPen( palette().shadow().color() );
p.drawText( 6, 55, model()->displayName() );
p.setPen( palette().text().color() );
p.drawText( 5, 54, model()->displayName() );

View File

@@ -46,7 +46,7 @@ groupBox::groupBox( const QString & _caption, QWidget * _parent ) :
m_led = new pixmapButton( this, _caption );
m_led->setCheckable( true );
m_led->move( 3, 3 );
m_led->move( 3, 0 );
m_led->setActiveGraphic( embed::getIconPixmap( "led_green" ) );
m_led->setInactiveGraphic( embed::getIconPixmap( "led_off" ) );
@@ -127,7 +127,7 @@ void groupBox::updatePixmap()
//p.setPen( QColor( 255, 255, 255 ) );
p.setPen( palette().color( QPalette::Active, QPalette::ButtonText ) );
p.setPen( palette().color( QPalette::Active, QPalette::Text ) );
p.setFont( pointSize<7>( font() ) );
p.drawText( 22, 10, m_caption );