[vlc-commits] Qt4: small fixes on the toolbar custom dialog

Jean-Baptiste Kempf git at videolan.org
Wed Dec 28 00:48:52 CET 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Dec 25 23:47:33 2011 +0100| [31c91f640af9511e73c11ef4d4abddae1f03fc86] | committer: Jean-Baptiste Kempf

Qt4: small fixes on the toolbar custom dialog

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31c91f640af9511e73c11ef4d4abddae1f03fc86
---

 modules/gui/qt4/components/controller.hpp |    8 ++++----
 modules/gui/qt4/dialogs/toolbar.cpp       |   10 ++++++++--
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index 42ce504..d3ba78b 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -108,12 +108,12 @@ typedef enum buttonType_e
 
 
 static const char* const nameL[BUTTON_MAX] = { N_("Play"), N_("Stop"), N_("Open"),
-    N_("Previous/Backward"), N_("Next/Forward"), N_("Slower"), N_("Faster"), N_("Fullscreen"),
+    N_("Previous / Backward"), N_("Next / Forward"), N_("Slower"), N_("Faster"), N_("Fullscreen"),
     N_("De-Fullscreen"), N_("Extended panel"), N_("Playlist"), N_("Snapshot"),
     N_("Record"), N_("A->B Loop"), N_("Frame By Frame"), N_("Trickplay Reverse"),
     N_("Step backward" ), N_("Step forward"), N_("Quit"), N_("Random"),
-    N_("Loop/Repeat mode"), N_("Information"), N_("Previous"), N_("Next"),
-    N_("Open subtitles file"), N_("Fullscreen controller width toggle")
+    N_("Loop / Repeat"), N_("Information"), N_("Previous"), N_("Next"),
+    N_("Open subtitles"), N_("Dock fullscreen controller")
 };
 static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
     N_("Stop playback"), N_("Open a medium"),
@@ -137,7 +137,7 @@ static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b"
     ":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back",
     ":/toolbar/skip_fw", ":/toolbar/clear", ":/buttons/playlist/shuffle_on",
     ":/buttons/playlist/repeat_all", ":/menu/info",
-    ":/toolbar/previous_b", ":/toolbar/next_b", "", ":/toolbar/space"
+    ":/toolbar/previous_b", ":/toolbar/next_b", ":/toolbar/eject", ":/toolbar/space"
 };
 
 enum
diff --git a/modules/gui/qt4/dialogs/toolbar.cpp b/modules/gui/qt4/dialogs/toolbar.cpp
index 93401ac..8f6bb09 100644
--- a/modules/gui/qt4/dialogs/toolbar.cpp
+++ b/modules/gui/qt4/dialogs/toolbar.cpp
@@ -286,7 +286,11 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
 
     /* Normal options */
     setViewMode( QListView::IconMode );
-    setSpacing( 20 );
+    setSpacing( 8 );
+    setGridSize( QSize(90, 50) );
+    setWrapping( true );
+    setWordWrap( true );
+    setTextElideMode( Qt::ElideNone );
     setDragEnabled( true );
 
     /* All the buttons do not need a special rendering */
@@ -294,7 +298,8 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
     {
         QListWidgetItem *widgetItem = new QListWidgetItem( this );
         widgetItem->setText( qtr( nameL[i] ) );
-        widgetItem->setIcon( QIcon( iconL[i] ) );
+        QPixmap pix( iconL[i] );
+        widgetItem->setIcon( pix.scaled( 16, 16, Qt::KeepAspectRatio, Qt::SmoothTransformation ) );
         widgetItem->setData( Qt::UserRole, QVariant( i ) );
         addItem( widgetItem );
     }
@@ -434,6 +439,7 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
                 layout->setForwardButton( next );
                 layout->setRoundButton( play );
             }
+            widgetItem->setText( qtr("Playback Buttons") );
             break;
         default:
             msg_Warn( p_intf, "This should not happen %i", i );



More information about the vlc-commits mailing list