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 )
setWindowTitle( _("Preferences" ) );
resize( 800, 450 );
QPalette plt( palette() );
plt.setColor( QPalette::Active, QPalette::Highlight, Qt::gray );
setPalette( plt );
advanced_tree = NULL;
simple_tree = NULL;
simple_panel = NULL;
......
......@@ -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 );
......
......@@ -24,13 +24,13 @@
#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:
......
......@@ -24,13 +24,30 @@
#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()
......
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