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;
#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 );
#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:
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:
#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()