X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fcomponents%2Fsimple_preferences.cpp;h=bc6dcab71e0253e79188f2db435e0bb1dfbdf2a2;hb=7f7fc9ead61fafdfbd9c8817dd472623b4053c80;hp=2cfaf7541e0e02066c5f6995095ce5072bc19f66;hpb=b9706127d351a49966d5a6140d2b4448924bbe8c;p=vlc diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp index 2cfaf7541e..bc6dcab71e 100644 --- a/modules/gui/qt4/components/simple_preferences.cpp +++ b/modules/gui/qt4/components/simple_preferences.cpp @@ -38,18 +38,18 @@ #include #include #include +#include #include #include #define ICON_HEIGHT 64 -#define BUTTON_HEIGHT 74 /********************************************************************* * The List of categories *********************************************************************/ -SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : +SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent, bool small ) : QWidget( _parent ), p_intf( _p_intf ) { QVBoxLayout *layout = new QVBoxLayout(); @@ -59,13 +59,15 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : CONNECT( buttonGroup, buttonClicked ( int ), this, switchPanel( int ) ); + short icon_height = small ? ICON_HEIGHT /2 : ICON_HEIGHT; + #define ADD_CATEGORY( button, label, icon, numb ) \ QToolButton * button = new QToolButton( this ); \ button->setIcon( QIcon( ":/pixmaps/prefs/" #icon ) ); \ - button->setIconSize( QSize( ICON_HEIGHT , ICON_HEIGHT ) ); \ button->setText( label ); \ button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon ); \ - button->resize( BUTTON_HEIGHT , BUTTON_HEIGHT); \ + button->setIconSize( QSize( icon_height, icon_height ) ); \ + button->resize( icon_height + 6 , icon_height + 6 ); \ button->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding) ; \ button->setAutoRaise( true ); \ button->setCheckable( true ); \ @@ -100,7 +102,7 @@ void SPrefsCatList::switchPanel( int i ) * The Panels *********************************************************************/ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, - int _number ) : QWidget( _parent ), p_intf( _p_intf ) + int _number, bool small ) : QWidget( _parent ), p_intf( _p_intf ) { module_config_t *p_config; ConfigControl *control; @@ -178,7 +180,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, /****************************** * VIDEO Panel Implementation * ******************************/ - START_SPREFS_CAT( Video , qtr("General Video Settings") ); + START_SPREFS_CAT( Video , qtr("Video Settings") ); CONFIG_GENERIC( "video", Bool, NULL, enableVideo ); CONFIG_GENERIC( "fullscreen", Bool, NULL, fullscreen ); @@ -213,7 +215,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, /****************************** * AUDIO Panel Implementation * ******************************/ - START_SPREFS_CAT( Audio, qtr("General Audio Settings") ); + START_SPREFS_CAT( Audio, qtr("Audio Settings") ); CONFIG_GENERIC( "audio", Bool, NULL, enableAudio ); @@ -277,7 +279,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, optionWidgets.append( NULL ); #endif - /* General Audio Options */ + /* Audio Options */ CONFIG_GENERIC_NO_BOOL( "volume" , IntegerRangeSlider, NULL, defaultVolume ); CONNECT( ui.defaultVolume, valueChanged( int ), @@ -293,6 +295,8 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, CONFIG_GENERIC_NO_BOOL( "norm-max-level" , Float, NULL, volNormSpin ); + CONFIG_GENERIC( "audio-replay-gain-mode", StringList, ui.replayLabel, + replayCombo ); CONFIG_GENERIC( "audio-visual" , Module , ui.visuLabel, visualisation); @@ -448,6 +452,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, *******************/ START_SPREFS_CAT( Interface, qtr("Interface Settings") ); ui.defaultLabel->setFont( italicFont ); + ui.skinsLabel->setText( + qtr( "This is VLC's skinnable interface. You can download other skins at" ) + + QString( " VLC skins website." ) ); ui.skinsLabel->setFont( italicFont ); #if defined( WIN32 ) @@ -481,6 +488,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, CONFIG_GENERIC( "qt-system-tray", Bool, NULL, systrayBox ); CONFIG_GENERIC_FILE( "skins2-last", File, ui.skinFileLabel, ui.fileSkin, ui.skinBrowse ); + CONFIG_GENERIC( "qt-video-autoresize", Bool, NULL, resizingBox ); CONFIG_GENERIC( "album-art", IntegerList, ui.artFetchLabel, artFetcher ); @@ -544,10 +552,22 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, panel->setLayout( gLayout ); int line = 0; + panel_label->setText( qtr( "Configure Hotkeys" ) ); control = new KeySelectorControl( VLC_OBJECT(p_intf), p_config , this, gLayout, line ); + controls.append( control ); - panel_label->setText( qtr( "Configure Hotkeys" ) ); + line++; + + QFrame *sepline = new QFrame; + sepline->setFrameStyle(QFrame::HLine | QFrame::Sunken); + gLayout->addWidget( sepline, line, 0, 1, -1 ); + + line++; + + p_config = config_FindConfig( VLC_OBJECT(p_intf), "hotkeys-mousewheel-mode" ); + control = new IntegerListConfigControl( VLC_OBJECT(p_intf), + p_config, false, this, gLayout, line ); controls.append( control ); break; @@ -556,8 +576,20 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, panel_layout->addWidget( panel_label ); panel_layout->addWidget( title_line ); - panel_layout->addWidget( panel ); - if( number != SPrefsHotkeys ) panel_layout->addStretch( 2 ); + + if( small ) + { + QScrollArea *scroller= new QScrollArea; + scroller->setWidget( panel ); + scroller->setWidgetResizable( true ); + scroller->setFrameStyle( QFrame::NoFrame ); + panel_layout->addWidget( scroller ); + } + else + { + panel_layout->addWidget( panel ); + if( number != SPrefsHotkeys ) panel_layout->addStretch( 2 ); + } setLayout( panel_layout ); } @@ -631,7 +663,7 @@ void SPrefsPanel::apply() CaC( "dvdnav-caching" ); CaC( "tcp-caching" ); CaC( "vcd-caching" ); CaC( "fake-caching" ); CaC( "cdda-caching" ); CaC( "file-caching" ); - CaC( "screen-caching" ); + CaC( "screen-caching" ); CaC( "bd-caching" ); CaCi( "rtsp-caching", 2 ); CaCi( "ftp-caching", 2 ); CaCi( "http-caching", 2 ); if (module_exists ("access_realrtsp" ))