Commit a378f1a7 authored by Clément Stenac's avatar Clément Stenac

More cosmetics for plastique

parent 8e2036e4
...@@ -42,10 +42,6 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -42,10 +42,6 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
setWindowTitle( _("Preferences" ) ); setWindowTitle( _("Preferences" ) );
resize( 800, 450 ); 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_tree = NULL;
simple_panel = NULL; simple_panel = NULL;
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
#include <assert.h> #include <assert.h>
#include <QPushButton> #include <QPushButton>
MainInterface::MainInterface( intf_thread_t *_p_intf ) : MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
QWidget( NULL ), p_intf( _p_intf)
{ {
/* Init UI */ /* Init UI */
slider = new InputSlider( Qt::Horizontal, this ); slider = new InputSlider( Qt::Horizontal, this );
......
...@@ -24,13 +24,13 @@ ...@@ -24,13 +24,13 @@
#define _MAIN_INTERFACE_H_ #define _MAIN_INTERFACE_H_
#include <vlc/intf.h> #include <vlc/intf.h>
#include <QWidget> #include "util/qvlcframe.hpp"
class InputManager; class InputManager;
class QCloseEvent; class QCloseEvent;
class InputSlider; class InputSlider;
class MainInterface : public QWidget class MainInterface : public QVLCFrame
{ {
Q_OBJECT; Q_OBJECT;
public: public:
...@@ -42,7 +42,6 @@ protected: ...@@ -42,7 +42,6 @@ protected:
private: private:
InputManager *main_input_manager; InputManager *main_input_manager;
InputSlider *slider; InputSlider *slider;
intf_thread_t *p_intf;
/// Main input associated to the playlist /// Main input associated to the playlist
input_thread_t *p_input; input_thread_t *p_input;
private slots: private slots:
......
...@@ -24,13 +24,30 @@ ...@@ -24,13 +24,30 @@
#define _QVLCFRAME_H_ #define _QVLCFRAME_H_
#include <QWidget> #include <QWidget>
#include <QApplication>
#include <QPlastiqueStyle>
#include <vlc/vlc.h> #include <vlc/vlc.h>
class QVLCFrame : public QWidget class QVLCFrame : public QWidget
{ {
public: public:
QVLCFrame( intf_thread_t *_p_intf ) : QWidget( NULL ), p_intf( _p_intf ) 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() {}; virtual ~QVLCFrame() {};
void toggleVisible() void toggleVisible()
......
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