]> git.sesse.net Git - vlc/commitdiff
Qt4 - SPrefs: New icons from Tombigel.
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 13 Mar 2007 00:28:14 +0000 (00:28 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 13 Mar 2007 00:28:14 +0000 (00:28 +0000)
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/dialogs/prefs_dialog.cpp
modules/gui/qt4/pixmaps/spref_cone_Audio_64.png [new file with mode: 0644]
modules/gui/qt4/pixmaps/spref_cone_Hotkeys_64.png [new file with mode: 0644]
modules/gui/qt4/pixmaps/spref_cone_Input_64.png [new file with mode: 0644]
modules/gui/qt4/pixmaps/spref_cone_Interface_64.png [new file with mode: 0644]
modules/gui/qt4/pixmaps/spref_cone_Subtitles_64.png [new file with mode: 0644]
modules/gui/qt4/pixmaps/spref_cone_Video_64.png [new file with mode: 0644]
modules/gui/qt4/res.qrc

index dce0a13c5f335f14a687d12fb1b9a9094d588e2b..ae2dde3fbfa1d1ab25c27c47d4b2eeed00b58cf6 100644 (file)
@@ -48,7 +48,7 @@
 #include "ui/sprefs_hotkeys.h"
 #include "ui/sprefs_interface.h"
 
-#define ITEM_HEIGHT 50
+#define ITEM_HEIGHT 64
 
 /*********************************************************************
  * The List of categories
 SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
                                   QListWidget( _parent ), p_intf( _p_intf )
 {
-    setIconSize( QSize( ITEM_HEIGHT,ITEM_HEIGHT ) );
-    setAlternatingRowColors( true );
+    setIconSize( QSize( ITEM_HEIGHT * 2 ,ITEM_HEIGHT  ) );
     setViewMode(QListView::IconMode);
+    setMovement(QListView::Static);
     setMaximumWidth(200);
-
-#define ADD_CATEGORY( id, label, icon )                                 \
-    addItem( label );                                                   \
-    item( id )->setIcon( QIcon( QPixmap( icon ) ) );                    \
-    item( id )->setData( Qt::UserRole, qVariantFromValue( (int)id ) );  \
-    item( id )->setTextAlignment(Qt::AlignHCenter);                     \
-    item( id )->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
-
-    ADD_CATEGORY( SPrefsVideo, qtr("Video"), video_50x50_xpm );
-    ADD_CATEGORY( SPrefsAudio, qtr("Audio"), audio_50x50_xpm );
+    setSpacing(0);
+//    setAlternatingRowColors( true );
+
+#define ADD_CATEGORY( id, label, icon )                                  \
+    addItem( label );                                                    \
+    item( id )->setIcon( QIcon( ":/pixmaps/" #icon ) )  ;   \
+    item( id )->setTextAlignment( Qt::AlignHCenter );                    \
+    item( id )->setData( Qt::UserRole, qVariantFromValue( (int)id ) );   \
+    item( id )->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
+
+    ADD_CATEGORY( SPrefsVideo, qtr("Video"), spref_cone_Video_64.png );
+    ADD_CATEGORY( SPrefsAudio, qtr("Audio"), spref_cone_Audio_64.png );
     ADD_CATEGORY( SPrefsInputAndCodecs, qtr("Input and Codecs"),
-                  input_and_codecs_50x50_xpm );
-    ADD_CATEGORY( SPrefsInterface, qtr("Interface"), interface_50x50_xpm );
-    ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles"), subtitles_50x50_xpm );
-    ADD_CATEGORY( SPrefsHotkeys, qtr("Hotkeys"), hotkeys_50x50_xpm );
+                  spref_cone_Input_64.png );
+    ADD_CATEGORY( SPrefsInterface, qtr("Interface"),
+                  spref_cone_Interface_64.png );
+    ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles"),
+                  spref_cone_Subtitles_64.png );
+    ADD_CATEGORY( SPrefsHotkeys, qtr("Hotkeys"), spref_cone_Hotkeys_64.png );
 
     setCurrentRow( SPrefsInterface );
 }
index 6e4ccfcdbdf6e02a0e1e55ca105a507204633c12..f0a663f2d3c67456089a96063fb61ceb65e1f72d 100644 (file)
@@ -5,7 +5,8 @@
  * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
- *
+ *          Jean-Baptiste Kempf <jb@videolan.org>
+ *  
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -40,25 +41,27 @@ PrefsDialog *PrefsDialog::instance = NULL;
 
 PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
 {
-     QGridLayout *main_layout = new QGridLayout(this);
+     QGridLayout *main_layout = new QGridLayout( this );
      setWindowTitle( qtr( "Preferences" ) );
-     resize( 800, 600 );
-     setMaximumHeight (600);
+     resize( 800, 650 );
+     setMaximumHeight( 650 );
+     setMaximumWidth( 800 );
 
-     tree_panel = new QWidget(0);
+     tree_panel = new QWidget( 0 );
      tree_panel_l = new QHBoxLayout;
      tree_panel->setLayout( tree_panel_l );
-     main_panel = new QWidget(0);
+     main_panel = new QWidget( 0 );
      main_panel_l = new QHBoxLayout;
      main_panel->setLayout( main_panel_l );
 
      // Choice for types
      types = new QGroupBox( "Show settings" );
+     types->setAlignment( Qt::AlignHCenter );
      QHBoxLayout *types_l = new QHBoxLayout(0);
      types_l->setSpacing( 3 ); types_l->setMargin( 3 );
      small = new QRadioButton( "Basic", types ); types_l->addWidget( small );
      all = new QRadioButton( "All", types ); types_l->addWidget( all );
-     types->setLayout(types_l);
+     types->setLayout( types_l );
      small->setChecked( true );
 
      advanced_tree = NULL;
@@ -71,7 +74,7 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
 
      main_layout->addWidget( main_panel, 0, 1, 4, 1 );
 
-     main_layout->setColumnMinimumWidth( 0, 200 );
+     main_layout->setColumnMinimumWidth( 0, 150 );
      main_layout->setColumnStretch( 0, 1 );
      main_layout->setColumnStretch( 1,3 );
 
@@ -169,7 +172,7 @@ void PrefsDialog::changeSimplePanel( QListWidgetItem *item )
     }
     main_panel_l->addWidget( simple_panel );
     simple_panel->show();
-//    panel_label->setText(qtr("Test"));
+//    panel_label->setText(qtr("Test")); //FIXME
 }
 
 void PrefsDialog::changePanel( QTreeWidgetItem *item )
@@ -209,7 +212,7 @@ void PrefsDialog::showModulePrefs( char *psz_module )
                                    i_module++ )
             {
                 QTreeWidgetItem *module_item = subcat_item->child( i_module );
-                PrefsItemData *mod_data = module_item->data(0, Qt::UserRole).
+                PrefsItemData *mod_data = module_item->data( 0, Qt::UserRole ).
                                                     value<PrefsItemData *>();
                 if( !strcmp( mod_data->psz_name, psz_module ) ) {
                     advanced_tree->setCurrentItem( module_item );
diff --git a/modules/gui/qt4/pixmaps/spref_cone_Audio_64.png b/modules/gui/qt4/pixmaps/spref_cone_Audio_64.png
new file mode 100644 (file)
index 0000000..260cfec
Binary files /dev/null and b/modules/gui/qt4/pixmaps/spref_cone_Audio_64.png differ
diff --git a/modules/gui/qt4/pixmaps/spref_cone_Hotkeys_64.png b/modules/gui/qt4/pixmaps/spref_cone_Hotkeys_64.png
new file mode 100644 (file)
index 0000000..acfea47
Binary files /dev/null and b/modules/gui/qt4/pixmaps/spref_cone_Hotkeys_64.png differ
diff --git a/modules/gui/qt4/pixmaps/spref_cone_Input_64.png b/modules/gui/qt4/pixmaps/spref_cone_Input_64.png
new file mode 100644 (file)
index 0000000..ca81896
Binary files /dev/null and b/modules/gui/qt4/pixmaps/spref_cone_Input_64.png differ
diff --git a/modules/gui/qt4/pixmaps/spref_cone_Interface_64.png b/modules/gui/qt4/pixmaps/spref_cone_Interface_64.png
new file mode 100644 (file)
index 0000000..3597ef5
Binary files /dev/null and b/modules/gui/qt4/pixmaps/spref_cone_Interface_64.png differ
diff --git a/modules/gui/qt4/pixmaps/spref_cone_Subtitles_64.png b/modules/gui/qt4/pixmaps/spref_cone_Subtitles_64.png
new file mode 100644 (file)
index 0000000..e59f10b
Binary files /dev/null and b/modules/gui/qt4/pixmaps/spref_cone_Subtitles_64.png differ
diff --git a/modules/gui/qt4/pixmaps/spref_cone_Video_64.png b/modules/gui/qt4/pixmaps/spref_cone_Video_64.png
new file mode 100644 (file)
index 0000000..87a2257
Binary files /dev/null and b/modules/gui/qt4/pixmaps/spref_cone_Video_64.png differ
index 0f395290406ff5b09004d3908d87ca70f9779c15..41bd5c10e8c87a24881a9497651d0dd3f06d5127 100644 (file)
   <file alias="vlc128.png">../../../share/vlc128x128.png</file>
   <file alias="noart.png">pixmaps/noart.png</file>
   <file>pixmaps/playlist_icon.png</file>
+  <file>pixmaps/spref_cone_Audio_64.png</file>
+  <file>pixmaps/spref_cone_Video_64.png</file>
+  <file>pixmaps/spref_cone_Input_64.png</file>
+  <file>pixmaps/spref_cone_Hotkeys_64.png</file>
+  <file>pixmaps/spref_cone_Subtitles_64.png</file>
+  <file>pixmaps/spref_cone_Interface_64.png</file>
  </qresource>
 </RCC>