Skip to content

Commit

Permalink
set the Player's style to Fusion for OS X; wang-bin#738
Browse files Browse the repository at this point in the history
This is a work-around for the broken slider in the default Macintosh
style.
  • Loading branch information
r-a-v-a-s committed Sep 30, 2016
1 parent bef27eb commit 5b3d8f2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/player/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
#include <QToolTip>
#include <QKeyEvent>
#include <QWheelEvent>
#include <QStyleFactory>

#include "ClickableMenu.h"
#include "Slider.h"
#include "StatisticsView.h"
Expand Down Expand Up @@ -110,6 +112,10 @@ MainWindow::MainWindow(QWidget *parent) :
, m_preview(0)
, m_shader(NULL)
{
#if defined(Q_OS_MACX) && QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QApplication::setStyle(QStyleFactory::create("Fusion"));
#endif

setWindowIcon(QIcon(QString::fromLatin1(":/QtAV.svg")));
mpOSD = new OSDFilter(this);
mpSubtitle = new SubtitleFilter(this);
Expand Down

0 comments on commit 5b3d8f2

Please sign in to comment.