Commit ee16e6bf authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - SPrefs: New icons from Tombigel.

parent a58ffe92
......@@ -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
......@@ -56,25 +56,29 @@
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 );
}
......
......@@ -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 );
......
......@@ -11,5 +11,11 @@
<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>
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