]> git.sesse.net Git - vlc/commitdiff
More cosmetics for plastique
authorClément Stenac <zorglub@videolan.org>
Sun, 4 Jun 2006 08:13:00 +0000 (08:13 +0000)
committerClément Stenac <zorglub@videolan.org>
Sun, 4 Jun 2006 08:13:00 +0000 (08:13 +0000)
modules/gui/qt4/dialogs/prefs_dialog.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/util/qvlcframe.hpp

index 4f07d5525922bab6d820ee47b648888c6232b8dc..6c31548dd458c27d441d30ecde0730537e82a037 100644 (file)
@@ -42,11 +42,7 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
      setWindowTitle( _("Preferences" ) );
      resize( 800, 450 );
 
-     QPalette plt( palette() );
-     plt.setColor( QPalette::Active, QPalette::Highlight, Qt::gray );
-     setPalette( plt );
-
-     advanced_tree = NULL;
+          advanced_tree = NULL;
      simple_tree = NULL;
      simple_panel = NULL;
      advanced_panel = NULL;
index 8619f5fad66841008f235b506a232d0e23d0768c..afd8c838208d78cbc4c601600b2cec44a198bed8 100644 (file)
@@ -28,8 +28,7 @@
 #include <assert.h>
 #include <QPushButton>
 
-MainInterface::MainInterface( intf_thread_t *_p_intf ) :
-                            QWidget( NULL ), p_intf( _p_intf)
+MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
 {
     /* Init UI */
     slider = new InputSlider( Qt::Horizontal, this );
index 579e14ccf8e63d02403587c14284791c0dd41b8a..82c84a8fb2c599870906f1c06eefdce71e51a70b 100644 (file)
 #define _MAIN_INTERFACE_H_
 
 #include <vlc/intf.h>
-#include <QWidget>
+#include "util/qvlcframe.hpp"
 
 class InputManager;
 class QCloseEvent;
 class InputSlider;
 
-class MainInterface : public QWidget
+class MainInterface : public QVLCFrame
 {
     Q_OBJECT;
 public:
@@ -42,7 +42,6 @@ protected:
 private:
     InputManager *main_input_manager;
     InputSlider *slider;
-    intf_thread_t *p_intf;
     /// Main input associated to the playlist
     input_thread_t *p_input;
 private slots:
index 71c4d02e040104ee442d76d9cbb3eef36ee591d7..9db2ec5040c763849623d07cd970d41ee05b195a 100644 (file)
 #define _QVLCFRAME_H_
 
 #include <QWidget>
+#include <QApplication>
+#include <QPlastiqueStyle>
 #include <vlc/vlc.h>
 
 class QVLCFrame : public QWidget
 {
 public:
     QVLCFrame( intf_thread_t *_p_intf ) : QWidget( NULL ), p_intf( _p_intf )
-    {};
+    {
+        QStyle *style = qApp->style();
+        // Plastique is too dark.
+        /// theming ? getting KDE data ? ?
+        if( qobject_cast<QPlastiqueStyle *>(style) )
+        {
+            QPalette plt( palette() );
+            plt.setColor( QPalette::Active, QPalette::Highlight, Qt::gray );
+            QColor vlg = (Qt::lightGray);
+            vlg = vlg.toHsv();
+            vlg.setHsv( vlg.hue(), vlg.saturation(), 235  );
+            plt.setColor( QPalette::Active, QPalette::Window, vlg );
+            plt.setColor( QPalette::Inactive, QPalette::Window, vlg );
+            setPalette( plt );
+        }
+    };
     virtual ~QVLCFrame()   {};
 
     void toggleVisible()