#include <QToolButton>
#include <QButtonGroup>
#include <QVBoxLayout>
+#include <QScrollArea>
#include <QtAlgorithms>
#include <string>
#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();
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 ); \
* 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;
/******************************
* 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 );
/******************************
* AUDIO Panel Implementation *
******************************/
- START_SPREFS_CAT( Audio, qtr("General Audio Settings") );
+ START_SPREFS_CAT( Audio, qtr("Audio Settings") );
CONFIG_GENERIC( "audio", Bool, NULL, enableAudio );
optionWidgets.append( NULL );
#endif
- /* General Audio Options */
+ /* Audio Options */
CONFIG_GENERIC_NO_BOOL( "volume" , IntegerRangeSlider, NULL,
defaultVolume );
CONNECT( ui.defaultVolume, valueChanged( int ),
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);
*******************/
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( " <a href=\"http://www.videolan.org/vlc/skins.php\">VLC skins website</a>." ) );
ui.skinsLabel->setFont( italicFont );
#if defined( WIN32 )
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 );
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;
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 );
}
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" ))