]> git.sesse.net Git - vlc/commitdiff
Adds an option to qt4 intf to set opacity for main interface, playlist, and extended...
authorRafaël Carré <funman@videolan.org>
Sun, 2 Sep 2007 21:28:56 +0000 (21:28 +0000)
committerRafaël Carré <funman@videolan.org>
Sun, 2 Sep 2007 21:28:56 +0000 (21:28 +0000)
Note that on french locale floats are 0,x and not 0.x

modules/gui/qt4/dialogs/extended.cpp
modules/gui/qt4/dialogs/playlist.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/qt4.cpp

index 0c6617e1f5335d75f9e4712328dec3728ad22a22..6284af9aec9ee7737f36755b669d2a8792d10a71 100644 (file)
@@ -36,6 +36,7 @@ ExtendedDialog *ExtendedDialog::instance = NULL;
 ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
 {
     setWindowFlags( Qt::Tool );
+    setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
 
     QHBoxLayout *l = new QHBoxLayout( this );
     QTabWidget *tab = new QTabWidget( this );
index f1ff92ee2af5293a9c15830a9368c989a7904bc0..0ad19d21f52bc874c081307a19cd018a2ee3644c 100644 (file)
@@ -44,6 +44,7 @@ PlaylistDialog::PlaylistDialog( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     QWidget *main = new QWidget( this );
     setCentralWidget( main );
     setWindowTitle( qtr( "Playlist" ) );
+    setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
 
     createPlMenuBar( menuBar(), p_intf );
 
index 014c872be4d6cf53a0691bfaaef9f69a6ba7ca4f..a74fa365e73ab896a74be2205aaf090923abb994 100644 (file)
@@ -101,6 +101,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     setFocusPolicy( Qt::StrongFocus );
     setAcceptDrops(true);
     setWindowIcon( QApplication::windowIcon() );
+    config_GetFloat( p_intf, "qt-opacity" );
+    setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
 
     /* Set The Video In emebedded Mode or not */
     videoEmbeddedFlag = false;
index c8473464087e40cfeaea0c322f0f120082302309..c554cb4c030901f647f18e052fffea4e4b52702a 100644 (file)
@@ -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" \
                                      "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_LONGTEXT N_("Enter the sum of the options that you want: \n" \
             "Title: 1; Duration: 2; Artist: 4; Genre: 8; " \
@@ -115,6 +119,8 @@ vlc_module_begin();
             change_internal();
         add_bool( "qt-notification", VLC_TRUE, NULL, NOTIFICATION_TEXT,
                   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,
                   ADVANCED_OPTIONS_LONGTEXT, VLC_TRUE );
         add_integer( "qt-pl-showflags",