Commit 51da2ea3 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Change the toolbar layout to make it smaller and have the advanced buttons on...

Change the toolbar layout to make it smaller and have the advanced buttons on the same line as the other ones.

If you think it was better before, please scream NOW.

I am just bored of being insulted for the work I do/not do. All the decisions may not be optimal, and I am always open to discussion. Insults by mail is NOT OK.
parent c4523879
......@@ -674,34 +674,38 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
controlLayout->setSpacing( 0 );
controlLayout->setLayoutMargins( 7, 5, 7, 3, 6 );
controlLayout->addWidget( slider, 0, 1, 1, 16 );
controlLayout->addWidget( slider, 0, 1, 1, 18 );
controlLayout->addWidget( slowerButton, 0, 0 );
controlLayout->addWidget( fasterButton, 0, 17 );
controlLayout->addWidget( fasterButton, 0, 19 );
controlLayout->addWidget( advControls, 1, 3, 2, 4, Qt::AlignBottom );
controlLayout->addWidget( discFrame, 1, 10, 2, 3, Qt::AlignBottom );
controlLayout->addWidget( telexFrame, 1, 10, 2, 4, Qt::AlignBottom );
controlLayout->addWidget( discFrame, 1, 8, 2, 3, Qt::AlignBottom );
controlLayout->addWidget( telexFrame, 1, 8, 2, 5, Qt::AlignBottom );
controlLayout->addWidget( playButton, 2, 0, 2, 2 );
controlLayout->setColumnMinimumWidth( 2, 20 );
controlLayout->addWidget( playButton, 2, 0, 2, 2, Qt::AlignBottom );
controlLayout->setColumnMinimumWidth( 2, 10 );
controlLayout->setColumnStretch( 2, 0 );
controlLayout->addLayout( controlButLayout, 3, 3, 1, 3 );
controlLayout->setColumnMinimumWidth( 7, 20 );
controlLayout->addLayout( controlButLayout, 3, 3, 1, 3, Qt::AlignBottom );
/* Column 6 is unused */
controlLayout->setColumnStretch( 6, 0 );
controlLayout->setColumnStretch( 7, 0 );
controlLayout->setColumnStretch( 8, 0 );
controlLayout->setColumnStretch( 9, 0 );
controlLayout->setColumnMinimumWidth( 7, 10 );
controlLayout->addWidget( fullscreenButton, 3, 10, Qt::AlignBottom );
controlLayout->addWidget( playlistButton, 3, 11, Qt::AlignBottom );
controlLayout->addWidget( extSettingsButton, 3, 12, Qt::AlignBottom );
controlLayout->addWidget( fullscreenButton, 3, 8, Qt::AlignBottom );
controlLayout->addWidget( playlistButton, 3, 9, Qt::AlignBottom );
controlLayout->addWidget( extSettingsButton, 3, 10, Qt::AlignBottom );
controlLayout->setColumnStretch( 11, 0 ); /* telex alignment */
controlLayout->setColumnStretch( 13, 0 );
controlLayout->setColumnMinimumWidth( 13, 24 );
controlLayout->setColumnStretch( 14, 5 );
controlLayout->setColumnStretch( 12, 0 );
controlLayout->setColumnMinimumWidth( 12, 10 );
controlLayout->addWidget( volMuteLabel, 3, 15, Qt::AlignBottom );
controlLayout->addWidget( volumeSlider, 2, 16, 2 , 2, Qt::AlignBottom );
controlLayout->addWidget( advControls, 3, 13, 1, 3, Qt::AlignBottom );
controlLayout->setColumnStretch( 16, 10 );
controlLayout->setColumnMinimumWidth( 16, 10 );
controlLayout->addWidget( volMuteLabel, 3, 17, Qt::AlignBottom );
controlLayout->addWidget( volumeSlider, 3, 18, 1 , 2, Qt::AlignBottom );
}
updateInput();
......
......@@ -120,9 +120,6 @@ SoundSlider::SoundSlider( QWidget *_parent, int _i_step, bool b_hard,
char *psz_colors )
: QAbstractSlider( _parent )
{
paddingL = 3;
paddingR = 2;
f_step = ( _i_step * 100 ) / AOUT_VOLUME_MAX ;
setRange( SOUNDMIN, b_hard ? (2 * SOUNDMAX) : SOUNDMAX );
setMouseTracking( true );
......@@ -202,7 +199,7 @@ void SoundSlider::mouseMoveEvent( QMouseEvent *event )
if( b_sliding )
{
QRect rect( paddingL - 15, -1,
WLENGTH + 15 * 2, WHEIGHT + 5 );
WLENGTH , WHEIGHT + 5 );
if( !rect.contains( event->pos() ) )
{ /* We are outside */
if ( !b_outside )
......
......@@ -63,9 +63,10 @@ class SoundSlider : public QAbstractSlider
public:
SoundSlider( QWidget *_parent, int _i_step, bool b_softamp, char * );
virtual ~SoundSlider() {};
protected:
int paddingL;
int paddingR;
const static int paddingL = 3;
const static int paddingR = 2;
virtual void paintEvent(QPaintEvent *);
virtual void wheelEvent( QWheelEvent *event );
virtual void mousePressEvent( QMouseEvent * );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment