Commit a99f23a0 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 : buttons size and various fixes. Remove dead code and avoid duplication.

parent 28a742bd
...@@ -225,11 +225,6 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i ) : ...@@ -225,11 +225,6 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i ) :
BUTTON_SET_ACT( snapshotButton, "S", qtr( "Take a snapshot" ), snapshot() ); BUTTON_SET_ACT( snapshotButton, "S", qtr( "Take a snapshot" ), snapshot() );
layout->addWidget( snapshotButton ); layout->addWidget( snapshotButton );
snapshotButton->setMaximumWidth( 35 ); snapshotButton->setMaximumWidth( 35 );
fullscreenButton = new QPushButton( "F" );
BUTTON_SET_ACT( fullscreenButton, "F", qtr( "Fullscreen" ), fullscreen() );
layout->addWidget( fullscreenButton );
fullscreenButton->setMaximumWidth( 35 );
} }
AdvControlsWidget::~AdvControlsWidget() AdvControlsWidget::~AdvControlsWidget()
...@@ -245,7 +240,7 @@ void AdvControlsWidget::enableInput( bool enable ) ...@@ -245,7 +240,7 @@ void AdvControlsWidget::enableInput( bool enable )
void AdvControlsWidget::enableVideo( bool enable ) void AdvControlsWidget::enableVideo( bool enable )
{ {
snapshotButton->setEnabled( enable ); snapshotButton->setEnabled( enable );
fullscreenButton->setEnabled( enable ); //fullscreenButton->setEnabled( enable );
} }
void AdvControlsWidget::normal() void AdvControlsWidget::normal()
...@@ -282,12 +277,12 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i ) : ...@@ -282,12 +277,12 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i ) :
slowerButton = new QPushButton( "S" ); slowerButton = new QPushButton( "S" );
BUTTON_SET_ACT( slowerButton, "S", qtr( "Slower" ), slower() ); BUTTON_SET_ACT( slowerButton, "S", qtr( "Slower" ), slower() );
controlLayout->addWidget( slowerButton, 0, 0 ); controlLayout->addWidget( slowerButton, 0, 0 );
slowerButton->setMaximumSize( QSize( 26, 26 ) ); slowerButton->setMaximumSize( QSize( 26, 20 ) );
fasterButton = new QPushButton( "F" ); fasterButton = new QPushButton( "F" );
BUTTON_SET_ACT( fasterButton, "F", qtr( "Faster" ), faster() ); BUTTON_SET_ACT( fasterButton, "F", qtr( "Faster" ), faster() );
controlLayout->addWidget( fasterButton, 0, 16 ); controlLayout->addWidget( fasterButton, 0, 16 );
fasterButton->setMaximumSize( QSize( 26, 26 ) ); fasterButton->setMaximumSize( QSize( 26, 20 ) );
/** Disc and Menus handling */ /** Disc and Menus handling */
discFrame = new QFrame( this ); discFrame = new QFrame( this );
...@@ -330,8 +325,8 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i ) : ...@@ -330,8 +325,8 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i ) :
/* Play */ /* Play */
QPushButton *playButton = new QPushButton; QPushButton *playButton = new QPushButton;
playButton->setSizePolicy( sizePolicy ); playButton->setSizePolicy( sizePolicy );
playButton->setMaximumSize( QSize( 26, 26 ) ); playButton->setMaximumSize( QSize( 45, 45 ) );
playButton->setIconSize( QSize( 20, 20 ) ); playButton->setIconSize( QSize( 30, 30 ) );
controlLayout->addWidget( playButton, 2, 0, 2, 2 ); controlLayout->addWidget( playButton, 2, 0, 2, 2 );
...@@ -381,14 +376,14 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i ) : ...@@ -381,14 +376,14 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i ) :
fullscreenButton = new QPushButton( "F" ); fullscreenButton = new QPushButton( "F" );
BUTTON_SET_ACT( fullscreenButton, "F", qtr( "Fullscreen" ), fullscreen() ); BUTTON_SET_ACT( fullscreenButton, "F", qtr( "Fullscreen" ), fullscreen() );
fullscreenButton->setMaximumSize( QSize( 26, 26 ) ); fullscreenButton->setMaximumSize( QSize( 26, 26 ) );
controlLayout->addWidget( fullscreenButton, 3, 11 ); controlLayout->addWidget( fullscreenButton, 3, 10 );
/** Playlist Button **/ /** Playlist Button **/
playlistButton = new QPushButton; playlistButton = new QPushButton;
playlistButton->setMaximumSize( QSize( 45, 45 ) ); playlistButton->setMaximumSize( QSize( 26, 26 ) );
playlistButton->setIconSize( QSize( 30, 30 ) ); playlistButton->setIconSize( QSize( 20, 20 ) );
controlLayout->addWidget( playlistButton, 3, 10 ); controlLayout->addWidget( playlistButton, 3, 11 );
/** extended Settings **/ /** extended Settings **/
QPushButton *extSettingsButton = new QPushButton( "F" ); QPushButton *extSettingsButton = new QPushButton( "F" );
......
...@@ -111,7 +111,7 @@ public: ...@@ -111,7 +111,7 @@ public:
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
QPushButton *normalButton; QPushButton *normalButton;
QPushButton *fullscreenButton, *snapshotButton; QPushButton *snapshotButton;
private slots: private slots:
void normal(); void normal();
void snapshot(); void snapshot();
......
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