volumeSlider->setOrientation( Qt::Horizontal );
}
volumeSlider->setMaximumSize( QSize( 200, 40 ) );
- volumeSlider->setMinimumSize( QSize( 80, 20 ) );
+ volumeSlider->setMinimumSize( QSize( 106, 30 ) );
volumeSlider->setFocusPolicy( Qt::NoFocus );
controlLayout->addWidget( volumeSlider, 2, 16, 2 , 2, Qt::AlignBottom );
: QAbstractSlider( _parent )
{
padding = 3;
+
f_step = ( _i_step * 100 ) / AOUT_VOLUME_MAX ;
setRange( SOUNDMIN, b_hard ? (2 * SOUNDMAX) : SOUNDMAX );
const QPixmap temp( ":/pixmaps/volume-slider-inside.png" );
const QBitmap mask( temp.createHeuristicMask() );
+
+ setMinimumSize( pixOutside.size() );
pixGradient = QPixmap( mask.size() );
QPainter p( &pixGradient );
- QLinearGradient gradient( 0, padding, WLENGTH + 2 * padding, padding );
+ QLinearGradient gradient( padding, 2, WLENGTH , 2 );
gradient.setColorAt( 0.0, Qt::white );
gradient.setColorAt( 0.2, QColor( 20, 226, 20 ) );
gradient.setColorAt( 0.5, QColor( 255, 176, 15 ) );
{
QPainter painter( this );
const int offset = int( double( ( width() - 2 * padding ) * value() ) / maximum() );
- const QRectF boundsG( padding, padding, offset , pixGradient.height() );
+
+ const QRectF boundsG( 0, 0, offset , pixGradient.height() );
painter.drawPixmap( boundsG, pixGradient, boundsG );
const QRectF boundsO( 0, 0, pixOutside.width(), pixOutside.height() );