Merge pull request #104 from diizy/stable-0.4

Lots of UI stuff again
This commit is contained in:
Tobias Doerffel
2014-01-22 13:09:20 -08:00
70 changed files with 152 additions and 54 deletions

BIN
data/backgrounds/newbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 443 B

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 769 B

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 B

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 519 B

View File

@@ -89,9 +89,126 @@ pianoRoll {
background-color: rgb(0, 0, 0);
}
/*TrackContainerView QWidget{
background-color: #5b6571;
}*/
/* scrollbar: trough */
QScrollBar:horizontal {
border: 1px solid #131313;
background: rgb( 50,50,50 );
height: 14px;
margin: 0px 13px;
}
QScrollBar:vertical {
border: 1px solid #131313;
background: rgb( 50,50,50 );
width: 14px;
margin: 13px 0px;
}
/* scrollbar: trough clicky things */
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal,
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}
QScrollBar::add-page:horizontal:pressed, QScrollBar::sub-page:horizontal:pressed,
QScrollBar::add-page:vertical:pressed, QScrollBar::sub-page:vertical:pressed {
background: rgba(0,0,0,50);
}
/* scrollbar: handles (sliders) */
QScrollBar::handle:horizontal {
background: qlineargradient(spread:reflect,
x1:0.5, y1:0, x2:0.5, y2:1,
stop:0 #747474, stop:0.5 #c9c9c9, stop:1 #808080);
border: 1px outset #888;
border-radius: 2px;
min-width: 24px;
}
QScrollBar::handle:horizontal:hover {
background: qlineargradient(spread:reflect,
x1:0.5, y1:0, x2:0.5, y2:1,
stop:0 #747474, stop:0.5 #f0f0f0, stop:1 #808080);
}
QScrollBar::handle:horizontal:pressed {
background: qlineargradient(spread:reflect,
x1:0.5, y1:0, x2:0.5, y2:1,
stop:0 #747474, stop:1 #c9c9c9);
}
QScrollBar::handle:vertical {
background: qlineargradient(spread:reflect,
x1:0, y1:0.5, x2:1, y2:0.5,
stop:0 #747474, stop:0.5 #c9c9c9, stop:1 #808080);
border: 1px outset #888;
border-radius: 2px;
min-height: 24px;
}
QScrollBar::handle:vertical:hover {
background: qlineargradient(spread:reflect,
x1:0, y1:0.5, x2:1, y2:0.5,
stop:0 #747474, stop:0.5 #f0f0f0, stop:1 #808080);
}
QScrollBar::handle:vertical:pressed {
background: qlineargradient(spread:reflect,
x1:0, y1:0.5, x2:1, y2:0.5,
stop:0 #747474, stop:1 #c9c9c9);
}
QScrollBar::handle:horizontal:disabled, QScrollBar::handle:vertical:disabled {
background: #747474;
border-radius: 1px;
border: 1px solid rgba(0,0,0,32);
}
/* arrow buttons */
QScrollBar::add-line, QScrollBar::sub-line {
background: qradialgradient(cx:0.3, cy:0.3, radius:0.8, fx:0.3, fy:0.3, stop:0 #c9c9c9, stop:1 #969696 );
border-radius: 1px;
border: 1px solid #131313;
subcontrol-origin: margin;
}
QScrollBar::add-line:horizontal { subcontrol-position: right; width: 12px;}
QScrollBar::sub-line:horizontal { subcontrol-position: left; width: 12px;}
QScrollBar::add-line:vertical { subcontrol-position: bottom; height: 12px;}
QScrollBar::sub-line:vertical { subcontrol-position: top; height: 12px;}
QScrollBar::add-line:hover, QScrollBar::sub-line: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 #969696 );
}
QScrollBar::add-line:pressed, QScrollBar::sub-line:pressed {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #969696, stop:0.5 #c9c9c9, stop:1 #969696 );
}
QScrollBar::add-line:disabled, QScrollBar::sub-line:disabled {
background: #747474;
}
QScrollBar::left-arrow:horizontal, QScrollBar::right-arrow:horizontal,
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
border: none;
background-color: none;
width: 5px;
height: 5px;
}
QScrollBar::left-arrow:horizontal { background-image: url(resources:sbarrow_left.png);}
QScrollBar::right-arrow:horizontal { background-image: url(resources:sbarrow_right.png);}
QScrollBar::up-arrow:vertical { background-image: url(resources:sbarrow_up.png);}
QScrollBar::down-arrow:vertical { background-image: url(resources:sbarrow_down.png);}
QScrollBar::left-arrow:horizontal:disabled { background-image: url(resources:sbarrow_left_d.png);}
QScrollBar::right-arrow:horizontal:disabled { background-image: url(resources:sbarrow_right_d.png);}
QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up_d.png);}
QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down_d.png);}
TrackContainerView QFrame{
background-color: #49515b;
@@ -105,25 +222,6 @@ trackOperationsWidget > QPushButton {
background: none;
border:none;
}
/*
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 > QPushButton::menu-indicator {
image: url(resources:trackop.png);
@@ -300,12 +398,12 @@ QTreeView {
/* Plugins */
TripleOscillatorView knob {
color: rgb(1, 114, 216);
color: rgb(1, 32, 64);
qproperty-outerColor: rgb(0, 0, 0);
qproperty-innerRadius: 1;
qproperty-outerRadius: 6.5;
qproperty-centerPointX: 13.5;
qproperty-centerPointY: 13.5;
qproperty-innerRadius: 2;
qproperty-outerRadius: 7;
qproperty-centerPointX: 13.0;
qproperty-centerPointY: 14.0;
qproperty-lineWidth: 2;
}

View File

@@ -68,7 +68,7 @@ public:
virtual QPalette standardPalette( void ) const;
virtual void drawControl( ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget ) const;
// virtual void drawControl( ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget ) const;
virtual void drawComplexControl(
ComplexControl control,
@@ -84,8 +84,8 @@ public:
const QStyleOption * option = 0,
const QWidget * widget = 0 ) const;
QSize sizeFromContents( ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget ) const;
QRect subControlRect( ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget ) const;
// QSize sizeFromContents( ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget ) const;
// QRect subControlRect( ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget ) const;
private:
QImage colorizeXpm( const char * const * xpm, const QBrush& fill ) const;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 880 B

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 849 B

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 908 B

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 B

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 881 B

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 B

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 972 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 312 B

View File

@@ -280,7 +280,7 @@ void AutomationPatternView::paintEvent( QPaintEvent * )
}
else
{
p.setPen( QColor( 0, 64, 255 ) );
p.setPen( QColor( 0, 180, 60 ) );
}
p.drawText( 2, p.fontMetrics().height() - 1, m_pat->name() );

View File

@@ -232,7 +232,7 @@ QPalette LmmsStyle::standardPalette( void ) const
{
QPalette pal = QPlastiqueStyle::standardPalette();
/* sane defaults in case fetching from stylesheet fails*/
pal.setColor( QPalette::Background, QColor( 91, 101, 113 ) );
@@ -245,17 +245,17 @@ QPalette LmmsStyle::standardPalette( void ) const
pal.setColor( QPalette::BrightText, QColor( 74, 253, 133 ) );
pal.setColor( QPalette::Highlight, QColor( 100, 100, 100 ) );
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 ) ) ); }
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(":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 ) ) ); }
@@ -268,7 +268,7 @@ QPalette LmmsStyle::standardPalette( void ) const
/*
void LmmsStyle::drawControl( ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget ) const
{
@@ -294,7 +294,7 @@ void LmmsStyle::drawControl( ControlElement element, const QStyleOption* option,
cache.fill( QColor( 48, 48, 48 ) );
QColor sliderColor;
QColor blurColor;
hoverColors(sunken, hover,
hoverColors(sunken, hover,
scrollBar->activeSubControls & SC_ScrollBarAddLine && isEnabled,
sliderColor, blurColor);
@@ -455,7 +455,7 @@ void LmmsStyle::drawControl( ControlElement element, const QStyleOption* option,
}
}
*/
void LmmsStyle::drawComplexControl( ComplexControl control,
const QStyleOptionComplex * option,
@@ -482,12 +482,12 @@ void LmmsStyle::drawComplexControl( ComplexControl control,
return;
}
}
else if( control == CC_ScrollBar )
/* else if( control == CC_ScrollBar )
{
QColor background = QColor( 48, 48, 48 );
painter->fillRect( option->rect, background );
painter->fillRect( option->rect, QApplication::palette().color( QPalette::Active,
QPalette::Background ) );
}
}*/
QPlastiqueStyle::drawComplexControl( control, option, painter, widget );
}
@@ -633,7 +633,7 @@ int LmmsStyle::pixelMetric( PixelMetric _metric, const QStyleOption * _option,
}
// QStyle::SH_TitleBar_NoBorder
/*
QSize LmmsStyle::sizeFromContents( ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget ) const
{
if( type == CT_ScrollBar )
@@ -655,8 +655,8 @@ QSize LmmsStyle::sizeFromContents( ContentsType type, const QStyleOption* option
return QPlastiqueStyle::sizeFromContents( type, option, size, widget );
}
*/
/*
QRect LmmsStyle::subControlRect( ComplexControl control, const QStyleOptionComplex* option, SubControl subControl, const QWidget* widget ) const
{
QRect rect = QPlastiqueStyle::subControlRect( control, option, subControl, widget );
@@ -797,7 +797,7 @@ QRect LmmsStyle::subControlRect( ComplexControl control, const QStyleOptionCompl
return rect;
}
*/

View File

@@ -844,7 +844,7 @@ inline void pianoRoll::drawNoteRect( QPainter & _p, int _x, int _y,
( (float)( PanningRight - _n->getPanning() ) ) /
( (float)( PanningRight - PanningLeft ) ) * 2.0f );
const QColor defaultNoteColor( 0x4A, 0xFD, 0x85 );
const QColor defaultNoteColor( 0x77, 0xC7, 0xD8 );
QColor col = defaultNoteColor;
if( _n->length() < 0 )
@@ -2680,7 +2680,7 @@ static void printNoteHeights(QPainter& p, int bottom, int width, int startKey)
};
p.setFont( pointSize<KEY_LINE_HEIGHT-4>( p.font() ) );
p.setPen( QColor( 255, 255, 0 ) );
p.setPen( QColor( 255, 255, 255 ) );
for( int y = bottom, key = startKey; y > PR_TOP_MARGIN;
y -= KEY_LINE_HEIGHT, key++)
{
@@ -2924,7 +2924,7 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
QFont f = p.font();
f.setBold( false );
p.setFont( pointSize<10>( f ) );
p.setPen( QColor( 255, 255, 0 ) );
p.setPen( QColor( 255, 255, 255) );
p.drawText( QRect( 0, keyAreaBottom(),
WHITE_KEY_WIDTH, noteEditBottom() - keyAreaBottom() ),
Qt::AlignCenter | Qt::TextWordWrap,
@@ -3072,7 +3072,7 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
int editHandleTop = 0;
if( m_noteEditMode == NoteEditVolume )
{
QColor color = QColor::fromHsv( 120, 221,
QColor color = QColor::fromHsv( 140, 221,
qMin(255, 60 + ( *it )->getVolume() ) );
if( ( *it )->selected() )
{
@@ -3091,7 +3091,7 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
}
else if( m_noteEditMode == NoteEditPanning )
{
QColor color( 0xFF, 0xB0, 0x00 );
QColor color( 0x99, 0xAF, 0xFF );
if( ( *it )->selected() )
{
color.setRgb( 0x00, 0x40, 0xC0 );
@@ -3119,7 +3119,7 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
}
}
p.setPen( QPen( QColor( 0xEA, 0xA1, 0x00 ),
p.setPen( QPen( QColor( 0x99, 0xAF, 0xFF ),
NE_LINE_WIDTH+2 ) );
p.drawPoints( editHandles );

View File

@@ -1271,7 +1271,7 @@ void patternView::paintEvent( QPaintEvent * )
}
else
{
p.setPen( QColor( 32, 240, 32 ) );
p.setPen( QColor( 32, 240, 101 ) );
}
if( m_pat->name() != m_pat->instrumentTrack()->name() )