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

Fix most of the Open Dialog resizing on linux Close #1446

Patch by Lahiru Lakmal Priyadarshana with small modifications.
parent 8c613dbf
......@@ -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() );
}
}
......
......@@ -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,27 +183,24 @@
</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" >
......@@ -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>
......
......@@ -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>
......
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