Commit 9d390b3a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: reinstore the resizeGrip in all cases

And fix a statusBar bug
parent d0206dc4
...@@ -604,7 +604,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -604,7 +604,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
setAttribute( Qt::WA_MacBrushedMetal); setAttribute( Qt::WA_MacBrushedMetal);
QVBoxLayout *controlLayout = new QVBoxLayout( this ); QVBoxLayout *controlLayout = new QVBoxLayout( this );
controlLayout->setContentsMargins( 4, 1, 4, 0 ); controlLayout->setContentsMargins( 4, 1, 0, 0 );
controlLayout->setSpacing( 0 ); controlLayout->setSpacing( 0 );
QHBoxLayout *controlLayout1 = new QHBoxLayout; QHBoxLayout *controlLayout1 = new QHBoxLayout;
controlLayout1->setSpacing( 0 ); controlLayout1->setMargin( 0 ); controlLayout1->setSpacing( 0 ); controlLayout1->setMargin( 0 );
...@@ -619,6 +619,9 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -619,6 +619,9 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
.toString(); .toString();
parseAndCreate( line2, controlLayout2 ); parseAndCreate( line2, controlLayout2 );
grip = new QSizeGrip( this );
controlLayout2->addWidget( grip, 0, Qt::AlignBottom|Qt::AlignRight );
if( !b_advancedVisible && advControls ) advControls->hide(); if( !b_advancedVisible && advControls ) advControls->hide();
controlLayout->addLayout( controlLayout1 ); controlLayout->addLayout( controlLayout1 );
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <QFrame> #include <QFrame>
#include <QString> #include <QString>
#include <QSizeGrip>
#define MAIN_TB1_DEFAULT "64;39;64;38;65" #define MAIN_TB1_DEFAULT "64;39;64;38;65"
#define MAIN_TB2_DEFAULT "0-2;64;3;1;4;64;7;9;64;10;20;19;64-4;37;65;35-4" #define MAIN_TB2_DEFAULT "0-2;64;3;1;4;64;7;9;64;10;20;19;64-4;37;65;35-4"
...@@ -204,11 +205,17 @@ public: ...@@ -204,11 +205,17 @@ public:
ControlsWidget( intf_thread_t *_p_i, bool b_advControls, ControlsWidget( intf_thread_t *_p_i, bool b_advControls,
QWidget *_parent = 0 ); QWidget *_parent = 0 );
void setGripVisible( bool b_visible )
{ grip->setVisible( b_visible ); }
protected: protected:
friend class MainInterface; friend class MainInterface;
bool b_advancedVisible; bool b_advancedVisible;
private:
QSizeGrip *grip;
protected slots: protected slots:
void toggleAdvanced(); void toggleAdvanced();
......
...@@ -132,13 +132,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -132,13 +132,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
settings->endGroup( ); settings->endGroup( );
/**************
* Status Bar *
**************/
createStatusBar();
b_statusbarVisible = getSettings()->value( "status-bar-visible", false ).toBool();
statusBar()->setVisible( b_statusbarVisible );
/************************** /**************************
* UI and Widgets design * UI and Widgets design
**************************/ **************************/
...@@ -152,6 +145,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -152,6 +145,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
this, destroyPopupMenu() ); this, destroyPopupMenu() );
createMainWidget( settings ); createMainWidget( settings );
/**************
* Status Bar *
**************/
createStatusBar();
setStatusBarVisibility( getSettings()->value( "MainWindow/status-bar-visible", false ).toBool() );
/********************************* /*********************************
* Create the Systray Management * * Create the Systray Management *
*********************************/ *********************************/
...@@ -874,6 +874,7 @@ void MainInterface::setStatusBarVisibility( bool b_visible ) ...@@ -874,6 +874,7 @@ void MainInterface::setStatusBarVisibility( bool b_visible )
{ {
statusBar()->setVisible( b_visible ); statusBar()->setVisible( b_visible );
b_statusbarVisible = b_visible; b_statusbarVisible = b_visible;
if( controls ) controls->setGripVisible( !b_statusbarVisible );
} }
#if 0 #if 0
......
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