[vlc-commits] Qt: allow smaller size on start
Jean-Baptiste Kempf
git at videolan.org
Tue Dec 31 10:25:55 CET 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Dec 31 10:21:16 2013 +0100| [b87bc7050a03285434bdbe33fefdc4a2034723f3] | committer: Jean-Baptiste Kempf
Qt: allow smaller size on start
Ref #9740
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b87bc7050a03285434bdbe33fefdc4a2034723f3
---
modules/gui/qt4/main_interface.cpp | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index cab3433..60f0a4f 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -253,11 +253,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
setVisible( !b_hideAfterCreation );
- computeMinimumSize();
-
/* Switch to minimal view if needed, must be called after the show() */
if( b_minimalView )
toggleMinimalView( true );
+
+ computeMinimumSize();
}
MainInterface::~MainInterface()
@@ -316,9 +316,9 @@ MainInterface::~MainInterface()
void MainInterface::computeMinimumSize()
{
- int minWidth = 30;
+ int minWidth = 80;
if( menuBar()->isVisible() )
- minWidth += __MAX( controls->sizeHint().width(), menuBar()->sizeHint().width() );
+ minWidth += controls->sizeHint().width();
setMinimumWidth( minWidth );
}
@@ -519,6 +519,12 @@ inline void MainInterface::createStatusBar()
void MainInterface::debug()
{
#ifdef DEBUG_INTF
+ if( controls ) {
+ msg_Dbg( p_intf, "Controls size: %i - %i", controls->size().height(), controls->size().width() );
+ msg_Dbg( p_intf, "Controls minimumsize: %i - %i", controls->minimumSize().height(), controls->minimumSize().width() );
+ msg_Dbg( p_intf, "Controls sizeHint: %i - %i", controls->sizeHint().height(), controls->sizeHint().width() );
+ }
+
msg_Dbg( p_intf, "size: %i - %i", size().height(), size().width() );
msg_Dbg( p_intf, "sizeHint: %i - %i", sizeHint().height(), sizeHint().width() );
msg_Dbg( p_intf, "minimumsize: %i - %i", minimumSize().height(), minimumSize().width() );
More information about the vlc-commits
mailing list