From 139abeb5b440b7e71a0f11fe53c39f09eaed172b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Fri, 25 Dec 2015 22:13:57 +0100 Subject: [PATCH] Fix KF5 Breeze style in full screen --- ChangeLog | 1 + src/gui/VideoDock.cpp | 10 ++++++++-- src/gui/VideoDock.hpp | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e82f8e53b..a11490f27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ Changes in QMPlay2 build 15.12.25: + - KF5 Breeze style fixes in full screen, - Qt5 <= 5.2 compilation fixes, - OpenGL 2 bugfix, diff --git a/src/gui/VideoDock.cpp b/src/gui/VideoDock.cpp index 1b308e716..8ec1ff9a4 100644 --- a/src/gui/VideoDock.cpp +++ b/src/gui/VideoDock.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -60,6 +61,9 @@ VideoDock::VideoDock() : connect( &iDW, SIGNAL( resized( int, int ) ), this, SLOT( resizedIDW( int, int ) ) ); connect( this, SIGNAL( visibilityChanged( bool ) ), this, SLOT( visibilityChanged( bool ) ) ); connect( &QMPlay2Core, SIGNAL( dockVideo( QWidget * ) ), &iDW, SLOT( setWidget( QWidget * ) ) ); + + if ( ( isBreeze = qApp->style()->objectName() == "breeze" ) ) + setStyle( &commonStyle ); } void VideoDock::fullScreen( bool b ) @@ -72,7 +76,8 @@ void VideoDock::fullScreen( bool b ) setFeatures( DockWidget::NoDockWidgetFeatures ); setFloating( false ); - setStyle( &commonStyle ); + if ( !isBreeze ) + setStyle( &commonStyle ); } else { @@ -91,7 +96,8 @@ void VideoDock::fullScreen( bool b ) setFeatures( DockWidget::AllDockWidgetFeatures ); setFloating( is_floating ); - setStyle( NULL ); + if ( !isBreeze ) + setStyle( NULL ); } } diff --git a/src/gui/VideoDock.hpp b/src/gui/VideoDock.hpp index 805f7e7f2..051e0ecfd 100644 --- a/src/gui/VideoDock.hpp +++ b/src/gui/VideoDock.hpp @@ -47,7 +47,7 @@ class VideoDock : public DockWidget QMenu *popupMenu; QCommonStyle commonStyle; int pixels; - bool canPopup, is_floating; + bool canPopup, is_floating, isBreeze; double touchZoom; private slots: void popup( const QPoint & );