]> git.sesse.net Git - vlc/commitdiff
Change the toolbar layout to make it smaller and have the advanced buttons on the...
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 12 Aug 2008 16:55:19 +0000 (09:55 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 12 Aug 2008 16:57:25 +0000 (09:57 -0700)
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.

modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.hpp

index 6dd508a56db616a7dcc159a09502c944eddb2007..0c711bc1be77cb2f51254f365d1dc468e5a70631 100644 (file)
@@ -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();
index a6ea5098f72e96f1c9f312d3c6224eef2dc0777e..2cf61020ee3f18c35b506695b7ff481e0ff96a90 100644 (file)
@@ -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 )
index d2824991b82341882137bfc5f9a95897987e104d..39b5066e0c97606a34d97cf656bbd727d0b563d3 100644 (file)
@@ -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 * );