1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-02 04:10:20 +02:00

* New SeekSlider style.

This commit is contained in:
Christian Muehlhaeuser
2014-08-13 00:51:41 +02:00
parent ba76aaecd5
commit 9d3e8c6983

View File

@@ -35,28 +35,28 @@ SeekSlider::SeekSlider( QWidget* parent )
setFixedHeight( scaledY( 20 ) ); setFixedHeight( scaledY( 20 ) );
setStyleSheet( QString( setStyleSheet( QString(
"QSlider::groove:horizontal {" "QSlider::groove:horizontal {"
"margin: %1px; border-width: %2px;" "margin: %1px; border: %2px solid rgba(200, 200, 200, 40); background: rgba(200, 200, 200, 40);"
"border-image: url(" RESPATH "images/seek-slider-bkg.png) %2 %2 %2 %2 stretch stretch;" // "border-image: url(" RESPATH "images/seek-slider-bkg.png) %2 %2 %2 %2 stretch stretch;"
"}" "}"
"QSlider::sub-page:horizontal {" "QSlider::sub-page:horizontal {"
"margin: %1px; border-width: %2px;" "margin: %1px; border: %2px solid #ffffff; background: #ffffff;"
"border-image: url(" RESPATH "images/seek-slider-level.png) %2 %2 %2 %2 stretch stretch;" // "border-image: url(" RESPATH "images/seek-slider-level.png) %2 %2 %2 %2 stretch stretch;"
"}" ) "}" )
.arg( 5 /*margin*/) .arg( 0 /*margin*/)
.arg( 3 /*border*/) + .arg( 3 /*border*/) +
QString( QString(
"QSlider::handle:horizontal {" "QSlider::handle:horizontal {"
"margin-bottom: -%1px; margin-top: -%1px;" "margin-bottom: -%1px; margin-top: -%1px;"
"margin-left: -%2px; margin-right: -%2px;" "margin-left: -%2px; margin-right: -%2px;"
"height: %3px; width: %4px;" "height: %3px; width: %4px;"
"background-image: url(" RESPATH "images/seek-and-volume-knob-rest.png);" // "background-image: url(" RESPATH "images/seek-and-volume-knob-rest.png);"
"background-repeat: no-repeat;" "background-repeat: no-repeat;"
"}" ) "}" )
.arg( /*margin top&bottom*/ 7 ) .arg( /*margin top&bottom*/ 0 )
.arg( /*margin left&right*/ 4 ) .arg( /*margin left&right*/ 0 )
.arg( /*height*/ 17 ) .arg( /*height*/ 1 )
.arg( /*width*/ 16 ) ); .arg( /*width*/ 1 ) );
} }
@@ -82,8 +82,8 @@ void
SeekSlider::setValue( int value ) SeekSlider::setValue( int value )
{ {
// int newVal = qBound( minimum(), value, maximum() ); // int newVal = qBound( minimum(), value, maximum() );
if ( !m_timeLine || sender() != m_timeLine ) if ( !m_timeLine || sender() != m_timeLine )
{ {
QSlider::setValue( value ); QSlider::setValue( value );
return; return;