Commit d197ab14 authored by Jean-Philippe Andre's avatar Jean-Philippe Andre

This is an attempt to close '#1716' (zoom has to be clicked twice)

The only thing it does is re-calculating the sizeHint for MainInterface,
using videoWidget's sizeHint() instead of size().
parent 672c3f35
...@@ -540,7 +540,7 @@ int MainInterface::privacyDialog( QList<ConfigControl *> *controls ) ...@@ -540,7 +540,7 @@ int MainInterface::privacyDialog( QList<ConfigControl *> *controls )
ask _parent->isFloating()... ask _parent->isFloating()...
If you think this would be better, please FIXME it... If you think this would be better, please FIXME it...
*/ */
#if 0
QSize MainInterface::sizeHint() const QSize MainInterface::sizeHint() const
{ {
int nwidth = controls->sizeHint().width(); int nwidth = controls->sizeHint().width();
...@@ -559,20 +559,22 @@ QSize MainInterface::sizeHint() const ...@@ -559,20 +559,22 @@ QSize MainInterface::sizeHint() const
} }
else if( videoIsActive ) else if( videoIsActive )
{ {
nheight += videoWidget->size().height(); nheight += videoWidget->sizeHint().height();
nwidth = videoWidget->size().width(); nwidth = videoWidget->sizeHint().width();
msg_Dbg( p_intf, "2 %i %i", nheight, nwidth ); msg_Dbg( p_intf, "2 %i %i", nheight, nwidth );
} }
/* if( !dockPL->isFloating() && dockPL->isVisible() && dockPL->widget() ) #if 0
if( !dockPL->isFloating() && dockPL->isVisible() && dockPL->widget() )
{ {
nheight += dockPL->size().height(); nheight += dockPL->size().height();
nwidth = __MAX( nwidth, dockPL->size().width() ); nwidth = __MAX( nwidth, dockPL->size().width() );
msg_Dbg( p_intf, "3 %i %i", nheight, nwidth ); msg_Dbg( p_intf, "3 %i %i", nheight, nwidth );
}*/ }
#endif
msg_Dbg( p_intf, "4 %i %i", nheight, nwidth ); msg_Dbg( p_intf, "4 %i %i", nheight, nwidth );
return QSize( nwidth, nheight ); return QSize( nwidth, nheight );
} }
#endif
#if 0 #if 0
/* FIXME This is dead code and need to be removed AT THE END */ /* FIXME This is dead code and need to be removed AT THE END */
void MainInterface::resizeEvent( QResizeEvent *e ) void MainInterface::resizeEvent( QResizeEvent *e )
......
...@@ -83,9 +83,8 @@ public: ...@@ -83,9 +83,8 @@ public:
QMenu *getSysTrayMenu() { return systrayMenu; }; QMenu *getSysTrayMenu() { return systrayMenu; };
int getControlsVisibilityStatus(); int getControlsVisibilityStatus();
#if 0 /* Sizehint() */ /* Sizehint() */
QSize sizeHint() const; QSize sizeHint() const;
#endif
protected: protected:
// void resizeEvent( QResizeEvent * ); // void resizeEvent( QResizeEvent * );
void dropEvent( QDropEvent *); void dropEvent( QDropEvent *);
......
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