Skip to content

Commit

Permalink
Fix KF5 Breeze style in full screen
Browse files Browse the repository at this point in the history
  • Loading branch information
zaps166 committed Dec 25, 2015
1 parent 80d5117 commit 139abeb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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,

Expand Down
10 changes: 8 additions & 2 deletions src/gui/VideoDock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <Functions.hpp>
#include <SubsDec.hpp>

#include <QApplication>
#include <QMouseEvent>
#include <QFileInfo>
#include <QMimeData>
Expand Down Expand Up @@ -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 )
Expand All @@ -72,7 +76,8 @@ void VideoDock::fullScreen( bool b )
setFeatures( DockWidget::NoDockWidgetFeatures );
setFloating( false );

setStyle( &commonStyle );
if ( !isBreeze )
setStyle( &commonStyle );
}
else
{
Expand All @@ -91,7 +96,8 @@ void VideoDock::fullScreen( bool b )
setFeatures( DockWidget::AllDockWidgetFeatures );
setFloating( is_floating );

setStyle( NULL );
if ( !isBreeze )
setStyle( NULL );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/VideoDock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 & );
Expand Down

0 comments on commit 139abeb

Please sign in to comment.