diff --git a/data/themes/default/style.css b/data/themes/default/style.css index 8a811f09f..19b5ca898 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -91,11 +91,10 @@ trackOperationsWidget > QPushButton { max-width: 26px; min-height: 26px; min-width: 26px; - background-color: #c9c9c9; - border-radius: 2px; - border: 1px solid rgba(0,0,0,64); + 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); @@ -113,23 +112,27 @@ trackOperationsWidget > QPushButton:flat { border-radius: 2px; border: none; } - -trackOperationsWidget#automationDisabled > QPushButton::menu-indicator { - image: url(resources:track_op_menu_disabled.png); -} - -trackOperationsWidget#automationEnabled > QPushButton::menu-indicator { - image: url(resources:track_op_menu.png); -} +*/ trackOperationsWidget > QPushButton::menu-indicator { - subcontrol-origin: padding; - subcontrol-position: center; + image: url(resources:trackop.png); + subcontrol-origin: padding; + subcontrol-position: center; + position: relative; + top: 2px; } -trackOperationsWidget > QPushButton::menu-indicator:pressed { - position: relative; - top: 1px; +trackOperationsWidget > QPushButton::menu-indicator:hover { + image: url(resources:trackop_h.png); +} + + +trackOperationsWidget > QPushButton::menu-indicator:pressed, +trackOperationsWidget > QPushButton::menu-indicator:checked + { + image: url(resources:trackop_c.png); + position: relative; + top: 3px; } trackWidget { @@ -150,81 +153,78 @@ QToolBar { } QToolButton, toolButton { - padding: 2px 1px 1px 2px; + padding: 1px 1px 1px 1px; border-radius: 2px; - border: 1px solid rgba(0,0,0,64); - 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 ); + border: 1px solid rgba(0,0,0,32); + background: qradialgradient(cx:0.3, cy:0.3, radius:0.8, fx:0.3, fy:0.3, stop:0 #c9c9c9, stop:1 #969696 ); 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); + 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 ); + border: 1px solid rgba(0,0,0,128); color: white; } 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); + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #969696, stop:0.5 #c9c9c9, stop:1 #969696 ); + padding: 2px 1px 0px 1px; + border: 1px solid rgba(0,0,0,128); 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; + padding: 2px 1px 0px 1px; border: 1px solid rgba(0,0,0,255); color: black; } trackLabelButton { - background-color: #5b6571; - color: #c9c9c9; - font-size: 10px; - font-weight: normal; - border-radius: 1px; - border: 1px solid rgba(0,0,0,64); + background-color: #5b6571; + color: #c9c9c9; + font-size: 10px; + font-weight: normal; + border-radius: 1px; + border: none; + padding: 2px 1px; } trackLabelButton:hover { - background-color: #7b838d; - color: white; - border: 1px solid black; + background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:0.5, stop:0 #5b6571, stop:0.75 #7b838d, stop:1 #7b838d ); + color: white; + border: 1px solid rgba(0,0,0,64); + padding: 1px 0px; } 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 ); + background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.3 #5b6571, stop:1 #6b7581 ); color: white; - border: 1px solid black; + border: 1px solid rgba(0,0,0,64); + padding: 2px 0px 0px; 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); + background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.3 #5b6571, stop:1 #6b7581 ); + color: white; + border: 1px solid rgba(0,0,0,128); + padding: 2px 0px 0px; font-weight: bold; } trackLabelButton:checked:hover { - background-color: #7b838d; - color: white; - border: 1px solid black; - font-weight: bold; + background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:0.5, stop:0 #5b6571, stop:0.75 #7b838d, stop:1 #7b838d ); } 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; + background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.3 #5b6571, stop:1 #6b7581 ); } - SideBar { background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop: 0 #98a2a7, stop: 1.0 #5b646f); } @@ -311,11 +311,11 @@ sf2InstrumentView knob { } opl2instrumentView knob { - color: rgb(128,128,128); - qproperty-outerColor: rgb(255,255,255); - qproperty-innerRadius: 2; - qproperty-outerRadius: 9; - qproperty-lineWidth: 2; + color: rgb(128,128,128); + qproperty-outerColor: rgb(255,255,255); + qproperty-innerRadius: 2; + qproperty-outerRadius: 9; + qproperty-lineWidth: 2; } /* palette information - each colour definition must be on a single line, and the line must begin with "palette:", with no leading whitespace diff --git a/data/themes/default/trackop.png b/data/themes/default/trackop.png new file mode 100644 index 000000000..dcb8036e2 Binary files /dev/null and b/data/themes/default/trackop.png differ diff --git a/data/themes/default/trackop_c.png b/data/themes/default/trackop_c.png new file mode 100644 index 000000000..fbd6343dd Binary files /dev/null and b/data/themes/default/trackop_c.png differ diff --git a/data/themes/default/trackop_h.png b/data/themes/default/trackop_h.png new file mode 100644 index 000000000..df1ad5642 Binary files /dev/null and b/data/themes/default/trackop_h.png differ diff --git a/src/gui/LmmsStyle.cpp b/src/gui/LmmsStyle.cpp index 16a244ea7..135b35870 100644 --- a/src/gui/LmmsStyle.cpp +++ b/src/gui/LmmsStyle.cpp @@ -229,8 +229,11 @@ LmmsStyle::LmmsStyle() : QPalette LmmsStyle::standardPalette( void ) const { + + /* set sane defaults in case loading from stylesheet fails */ + QPalette pal = QPlastiqueStyle::standardPalette(); -/* pal.setColor( QPalette::Background, QColor( 91, 101, 113 ) ); + 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 +242,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 ) ); + + /* load from stylesheet */ 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 );