[vlc-devel] commit: Fix most of the Open Dialog resizing on linux Close #1446 ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Thu Mar 27 08:31:48 CET 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Mar 27 00:25:31 2008 -0700| [9a801558d77879b1b7a99db0214117016b32380f]
Fix most of the Open Dialog resizing on linux Close #1446
Patch by Lahiru Lakmal Priyadarshana with small modifications.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a801558d77879b1b7a99db0214117016b32380f
---
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 1ff123b..0e0b5b2 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 d59b40e..93c22e4 100644
--- a/modules/gui/qt4/ui/open.ui
+++ b/modules/gui/qt4/ui/open.ui
@@ -9,31 +9,43 @@
<rect>
<x>0</x>
<y>0</y>
- <width>606</width>
- <height>300</height>
+ <width>520</width>
+ <height>543</height>
</rect>
</property>
<property name="sizePolicy" >
- <sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="minimumSize" >
+ <size>
+ <width>400</width>
+ <height>0</height>
+ </size>
+ </property>
<property name="windowTitle" >
<string>Dialog</string>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" colspan="3" >
+ <layout class="QVBoxLayout" >
+ <item>
<widget class="QTabWidget" name="Tab" >
<property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
- <verstretch>0</verstretch>
+ <verstretch>1</verstretch>
</sizepolicy>
</property>
+ <property name="minimumSize" >
+ <size>
+ <width>500</width>
+ <height>400</height>
+ </size>
+ </property>
</widget>
</item>
- <item row="1" column="0" colspan="3" >
+ <item>
<widget class="QCheckBox" name="advancedCheckBox" >
<property name="toolTip" >
<string>_("Show extended options")</string>
@@ -43,7 +55,7 @@
</property>
</widget>
</item>
- <item row="2" column="0" colspan="3" >
+ <item>
<widget class="QFrame" name="advancedFrame" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
@@ -171,28 +183,25 @@
</layout>
</widget>
</item>
- <item row="3" column="0" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>151</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="1" >
+ <item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>0</number>
</property>
<item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<widget class="QPushButton" name="menuButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Fixed" >
@@ -218,10 +227,16 @@
<widget class="QPushButton" name="playButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
- <horstretch>1</horstretch>
+ <horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="minimumSize" >
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
<property name="text" >
<string>Play</string>
</property>
@@ -230,20 +245,36 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonsBox" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="standardButtons" >
+ <set>QDialogButtonBox::NoButton</set>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
- <item row="3" column="2" >
- <widget class="QDialogButtonBox" name="buttonsBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
</property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::NoButton</set>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Preferred</enum>
</property>
- </widget>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
</item>
</layout>
</widget>
@@ -258,7 +289,6 @@
<tabstop>slaveBrowseButton</tabstop>
<tabstop>buttonsBox</tabstop>
</tabstops>
- <includes/>
<resources/>
<connections>
<connection>
diff --git a/modules/gui/qt4/ui/open_file.ui b/modules/gui/qt4/ui/open_file.ui
index ae39502..74cadd1 100644
--- a/modules/gui/qt4/ui/open_file.ui
+++ b/modules/gui/qt4/ui/open_file.ui
@@ -20,14 +20,14 @@
<string>_("Open File")</string>
</property>
<layout class="QGridLayout" >
- <item row="0" column="0" colspan="3" >
+ <item row="0" column="0" >
<widget class="QWidget" native="1" name="tempWidget" >
<property name="toolTip" >
<string>_("Choose one or more media file to open")</string>
</property>
</widget>
</item>
- <item row="2" column="2" >
+ <item row="1" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
@@ -38,12 +38,12 @@
<property name="sizeHint" >
<size>
<width>273</width>
- <height>14</height>
+ <height>16</height>
</size>
</property>
</spacer>
</item>
- <item row="3" column="0" colspan="2" >
+ <item row="2" column="0" >
<widget class="QCheckBox" name="subCheckBox" >
<property name="toolTip" >
<string>_("Add a subtitle file")</string>
@@ -53,7 +53,7 @@
</property>
</widget>
</item>
- <item row="4" column="0" colspan="3" >
+ <item row="3" column="0" >
<widget class="QFrame" name="subFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
@@ -185,22 +185,6 @@
</layout>
</widget>
</item>
- <item row="5" column="0" colspan="3" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>200</width>
- <height>2</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
<tabstops>
More information about the vlc-devel
mailing list