Commit 3f56c7bd authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: Open Dialog button changes.

Use a ToolButton+Menu since Qt4.6 on Windows seems to have fixed this issue.
parent d1d7a626
...@@ -123,8 +123,7 @@ OpenDialog::OpenDialog( QWidget *parent, ...@@ -123,8 +123,7 @@ OpenDialog::OpenDialog( QWidget *parent,
openButtonMenu->addAction( qtr( "&Convert" ), this, SLOT( transcode() ) , openButtonMenu->addAction( qtr( "&Convert" ), this, SLOT( transcode() ) ,
QKeySequence( "Alt+C" ) ); QKeySequence( "Alt+C" ) );
ui.menuButton->setMenu( openButtonMenu ); playButton->setMenu( openButtonMenu );
ui.menuButton->setIcon( QIcon( ":/down_arrow" ) );
/* Add the three Buttons */ /* Add the three Buttons */
ui.buttonsBox->addButton( selectButton, QDialogButtonBox::AcceptRole ); ui.buttonsBox->addButton( selectButton, QDialogButtonBox::AcceptRole );
...@@ -223,7 +222,6 @@ void OpenDialog::setMenuAction() ...@@ -223,7 +222,6 @@ void OpenDialog::setMenuAction()
} }
playButton->show(); playButton->show();
selectButton->hide(); selectButton->hide();
playButton->setDefault( true );
} }
} }
......
...@@ -102,7 +102,7 @@ private: ...@@ -102,7 +102,7 @@ private:
QStringList SeparateEntries( const QString& ); QStringList SeparateEntries( const QString& );
QPushButton *cancelButton, *selectButton; QPushButton *cancelButton, *selectButton;
QPushButton *playButton; QToolButton *playButton;
void finish( bool ); void finish( bool );
......
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
<string>Dialog</string> <string>Dialog</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="4"> <item row="0" column="0" colspan="3">
<widget class="QTabWidget" name="Tab"/> <widget class="QTabWidget" name="Tab"/>
</item> </item>
<item row="1" column="0" colspan="4"> <item row="1" column="0" colspan="3">
<widget class="QCheckBox" name="advancedCheckBox"> <widget class="QCheckBox" name="advancedCheckBox">
<property name="toolTip"> <property name="toolTip">
<string>Show extended options</string> <string>Show extended options</string>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="4"> <item row="2" column="0" colspan="3">
<widget class="QGroupBox" name="advancedFrame"> <widget class="QGroupBox" name="advancedFrame">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0"> <item row="0" column="0">
...@@ -207,36 +207,21 @@ ...@@ -207,36 +207,21 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="3" column="1"> <item row="3" column="2">
<widget class="QToolButton" name="menuButton"> <widget class="QDialogButtonBox" name="buttonsBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize"> <property name="standardButtons">
<size> <set>QDialogButtonBox::NoButton</set>
<width>16</width>
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="toolTip">
<string>Select play mode</string>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="2"> <item row="3" column="1">
<widget class="QPushButton" name="playButton"> <widget class="QToolButton" name="playButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
...@@ -252,21 +237,8 @@ ...@@ -252,21 +237,8 @@
<property name="text"> <property name="text">
<string>Play</string> <string>Play</string>
</property> </property>
<property name="default"> <property name="popupMode">
<bool>true</bool> <enum>QToolButton::MenuButtonPopup</enum>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QDialogButtonBox" name="buttonsBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::NoButton</set>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -281,7 +253,6 @@ ...@@ -281,7 +253,6 @@
<tabstop>slaveText</tabstop> <tabstop>slaveText</tabstop>
<tabstop>slaveBrowseButton</tabstop> <tabstop>slaveBrowseButton</tabstop>
<tabstop>playButton</tabstop> <tabstop>playButton</tabstop>
<tabstop>menuButton</tabstop>
<tabstop>buttonsBox</tabstop> <tabstop>buttonsBox</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
......
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