From 9a801558d77879b1b7a99db0214117016b32380f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Thu, 27 Mar 2008 00:25:31 -0700 Subject: [PATCH] Fix most of the Open Dialog resizing on linux Close #1446 Patch by Lahiru Lakmal Priyadarshana with small modifications. --- modules/gui/qt4/dialogs/open.cpp | 12 +++- modules/gui/qt4/ui/open.ui | 106 ++++++++++++++++++++----------- modules/gui/qt4/ui/open_file.ui | 26 ++------ 3 files changed, 82 insertions(+), 62 deletions(-) diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp index 1ff123b975..0e0b5b2127 100644 --- a/modules/gui/qt4/dialogs/open.cpp +++ b/modules/gui/qt4/dialogs/open.cpp @@ -70,7 +70,8 @@ OpenDialog::OpenDialog( QWidget *parent, /* Basic Creation of the Window */ ui.setupUi( this ); setWindowTitle( qtr( "Open" ) ); - resize( 410, 300 ); + /* resize( 410, 600 ); */ + setMinimumSize( 520, 460 ); /* Tab definition and creation */ fileOpenPanel = new FileOpenPanel( ui.Tab, p_intf ); @@ -212,13 +213,18 @@ void OpenDialog::toggleAdvancedPanel() if( ui.advancedFrame->isVisible() ) { ui.advancedFrame->hide(); - //FIXME: Clear Bug here. Qt ? + //setMinimumSize( 520, 460 ); if( size().isValid() ) - resize( size().width(), size().height() - ui.advancedFrame->height() ); + resize( size().width(), size().height() + - ui.advancedFrame->height() ); } else { ui.advancedFrame->show(); + //setMinimumSize( 520, 460 + ui.advancedFrame->height() ); + if( size().isValid() ) + resize( size().width(), size().height() + + ui.advancedFrame->height() ); } } diff --git a/modules/gui/qt4/ui/open.ui b/modules/gui/qt4/ui/open.ui index d59b40ee9c..93c22e46c8 100644 --- a/modules/gui/qt4/ui/open.ui +++ b/modules/gui/qt4/ui/open.ui @@ -9,31 +9,43 @@ 0 0 - 606 - 300 + 520 + 543 - + 0 0 + + + 400 + 0 + + Dialog - - + + - + 0 - 0 + 1 + + + 500 + 400 + + - + _("Show extended options") @@ -43,7 +55,7 @@ - + QFrame::StyledPanel @@ -171,27 +183,24 @@ - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 151 - 20 - - - - - + 0 + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -218,10 +227,16 @@ - 1 + 0 0 + + + 0 + 0 + + Play @@ -230,20 +245,36 @@ + + + + + 0 + 0 + + + + QDialogButtonBox::NoButton + + + - - - - - 0 - 0 - + + + + Qt::Vertical - - QDialogButtonBox::NoButton + + QSizePolicy::Preferred - + + + 20 + 5 + + + @@ -258,7 +289,6 @@ slaveBrowseButton buttonsBox - diff --git a/modules/gui/qt4/ui/open_file.ui b/modules/gui/qt4/ui/open_file.ui index ae39502fca..74cadd1b6e 100644 --- a/modules/gui/qt4/ui/open_file.ui +++ b/modules/gui/qt4/ui/open_file.ui @@ -20,14 +20,14 @@ _("Open File") - + _("Choose one or more media file to open") - + Qt::Vertical @@ -38,12 +38,12 @@ 273 - 14 + 16 - + _("Add a subtitle file") @@ -53,7 +53,7 @@ - + @@ -185,22 +185,6 @@ - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 200 - 2 - - - - -- 2.39.5