Commit 1cbdebe9 authored by Rafaël Carré's avatar Rafaël Carré

Adds an option to qt4 intf to set opacity for main interface, playlist, and extended panels.

Note that on french locale floats are 0,x and not 0.x
parent 96c503f3
...@@ -36,6 +36,7 @@ ExtendedDialog *ExtendedDialog::instance = NULL; ...@@ -36,6 +36,7 @@ ExtendedDialog *ExtendedDialog::instance = NULL;
ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
{ {
setWindowFlags( Qt::Tool ); setWindowFlags( Qt::Tool );
setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
QHBoxLayout *l = new QHBoxLayout( this ); QHBoxLayout *l = new QHBoxLayout( this );
QTabWidget *tab = new QTabWidget( this ); QTabWidget *tab = new QTabWidget( this );
......
...@@ -44,6 +44,7 @@ PlaylistDialog::PlaylistDialog( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -44,6 +44,7 @@ PlaylistDialog::PlaylistDialog( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
QWidget *main = new QWidget( this ); QWidget *main = new QWidget( this );
setCentralWidget( main ); setCentralWidget( main );
setWindowTitle( qtr( "Playlist" ) ); setWindowTitle( qtr( "Playlist" ) );
setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
createPlMenuBar( menuBar(), p_intf ); createPlMenuBar( menuBar(), p_intf );
......
...@@ -101,6 +101,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -101,6 +101,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
setFocusPolicy( Qt::StrongFocus ); setFocusPolicy( Qt::StrongFocus );
setAcceptDrops(true); setAcceptDrops(true);
setWindowIcon( QApplication::windowIcon() ); setWindowIcon( QApplication::windowIcon() );
config_GetFloat( p_intf, "qt-opacity" );
setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
/* Set The Video In emebedded Mode or not */ /* Set The Video In emebedded Mode or not */
videoEmbeddedFlag = false; videoEmbeddedFlag = false;
......
...@@ -80,6 +80,10 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); ...@@ -80,6 +80,10 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define ADVANCED_OPTIONS_LONGTEXT N_("Activate by default all the" \ #define ADVANCED_OPTIONS_LONGTEXT N_("Activate by default all the" \
"advanced options for geeks") "advanced options for geeks")
#define OPACITY_TEXT N_("Windows opacity between 0.1 and 1.")
#define OPACITY_LONGTEXT N_("Sets the windows opacity between 0.1 and 1 " \
"for main interface, playlist and extended panel.")
#define SHOWFLAGS_TEXT N_("Define what columns to show in playlist window") #define SHOWFLAGS_TEXT N_("Define what columns to show in playlist window")
#define SHOWFLAGS_LONGTEXT N_("Enter the sum of the options that you want: \n" \ #define SHOWFLAGS_LONGTEXT N_("Enter the sum of the options that you want: \n" \
"Title: 1; Duration: 2; Artist: 4; Genre: 8; " \ "Title: 1; Duration: 2; Artist: 4; Genre: 8; " \
...@@ -115,6 +119,8 @@ vlc_module_begin(); ...@@ -115,6 +119,8 @@ vlc_module_begin();
change_internal(); change_internal();
add_bool( "qt-notification", VLC_TRUE, NULL, NOTIFICATION_TEXT, add_bool( "qt-notification", VLC_TRUE, NULL, NOTIFICATION_TEXT,
NOTIFICATION_LONGTEXT, VLC_FALSE ); NOTIFICATION_LONGTEXT, VLC_FALSE );
add_float_with_range( "qt-opacity", 1., 0.1, 1., NULL, OPACITY_TEXT,
OPACITY_LONGTEXT, VLC_FALSE );
add_bool( "qt-adv-options", VLC_FALSE, NULL, ADVANCED_OPTIONS_TEXT, add_bool( "qt-adv-options", VLC_FALSE, NULL, ADVANCED_OPTIONS_TEXT,
ADVANCED_OPTIONS_LONGTEXT, VLC_TRUE ); ADVANCED_OPTIONS_LONGTEXT, VLC_TRUE );
add_integer( "qt-pl-showflags", add_integer( "qt-pl-showflags",
......
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