[vlc-devel] commit: Qt: Open Dialog button changes. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Fri Oct 16 11:23:11 CEST 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Oct 15 21:02:10 2009 +0200| [3f56c7bd7cd1746a53cb4f43f085272fc9f6a62e] | committer: Jean-Baptiste Kempf
Qt: Open Dialog button changes.
Use a ToolButton+Menu since Qt4.6 on Windows seems to have fixed this issue.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3f56c7bd7cd1746a53cb4f43f085272fc9f6a62e
---
modules/gui/qt4/dialogs/open.cpp | 4 +--
modules/gui/qt4/dialogs/open.hpp | 2 +-
modules/gui/qt4/ui/open.ui | 53 ++++++++-----------------------------
3 files changed, 14 insertions(+), 45 deletions(-)
diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp
index ceb356f..b2a782e 100644
--- a/modules/gui/qt4/dialogs/open.cpp
+++ b/modules/gui/qt4/dialogs/open.cpp
@@ -123,8 +123,7 @@ OpenDialog::OpenDialog( QWidget *parent,
openButtonMenu->addAction( qtr( "&Convert" ), this, SLOT( transcode() ) ,
QKeySequence( "Alt+C" ) );
- ui.menuButton->setMenu( openButtonMenu );
- ui.menuButton->setIcon( QIcon( ":/down_arrow" ) );
+ playButton->setMenu( openButtonMenu );
/* Add the three Buttons */
ui.buttonsBox->addButton( selectButton, QDialogButtonBox::AcceptRole );
@@ -223,7 +222,6 @@ void OpenDialog::setMenuAction()
}
playButton->show();
selectButton->hide();
- playButton->setDefault( true );
}
}
diff --git a/modules/gui/qt4/dialogs/open.hpp b/modules/gui/qt4/dialogs/open.hpp
index d7f60bd..694b465 100644
--- a/modules/gui/qt4/dialogs/open.hpp
+++ b/modules/gui/qt4/dialogs/open.hpp
@@ -102,7 +102,7 @@ private:
QStringList SeparateEntries( const QString& );
QPushButton *cancelButton, *selectButton;
- QPushButton *playButton;
+ QToolButton *playButton;
void finish( bool );
diff --git a/modules/gui/qt4/ui/open.ui b/modules/gui/qt4/ui/open.ui
index a374868..e78ddce 100644
--- a/modules/gui/qt4/ui/open.ui
+++ b/modules/gui/qt4/ui/open.ui
@@ -30,10 +30,10 @@
<string>Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0" colspan="4">
+ <item row="0" column="0" colspan="3">
<widget class="QTabWidget" name="Tab"/>
</item>
- <item row="1" column="0" colspan="4">
+ <item row="1" column="0" colspan="3">
<widget class="QCheckBox" name="advancedCheckBox">
<property name="toolTip">
<string>Show extended options</string>
@@ -43,7 +43,7 @@
</property>
</widget>
</item>
- <item row="2" column="0" colspan="4">
+ <item row="2" column="0" colspan="3">
<widget class="QGroupBox" name="advancedFrame">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
@@ -207,36 +207,21 @@
</property>
</spacer>
</item>
- <item row="3" column="1">
- <widget class="QToolButton" name="menuButton">
+ <item row="3" column="2">
+ <widget class="QDialogButtonBox" name="buttonsBox">
<property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
- <size>
- <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 name="standardButtons">
+ <set>QDialogButtonBox::NoButton</set>
</property>
</widget>
</item>
- <item row="3" column="2">
- <widget class="QPushButton" name="playButton">
+ <item row="3" column="1">
+ <widget class="QToolButton" name="playButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
@@ -252,21 +237,8 @@
<property name="text">
<string>Play</string>
</property>
- <property name="default">
- <bool>true</bool>
- </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 name="popupMode">
+ <enum>QToolButton::MenuButtonPopup</enum>
</property>
</widget>
</item>
@@ -281,7 +253,6 @@
<tabstop>slaveText</tabstop>
<tabstop>slaveBrowseButton</tabstop>
<tabstop>playButton</tabstop>
- <tabstop>menuButton</tabstop>
<tabstop>buttonsBox</tabstop>
</tabstops>
<resources/>
More information about the vlc-devel
mailing list