Commit 4917bfb8 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

HACK for minimalView to go around a Qt bug/feature

that doesn't update the QAction checked state when QMenu is hidden

Fix #1742
parent 95e1579e
......@@ -796,6 +796,8 @@ void MainInterface::undockPlaylist()
void MainInterface::toggleMinimalView()
{
/* HACK for minimalView, see menus.cpp */
if( !menuBar()->isVisible() ) QVLCMenu::minimalViewAction->toggle();
TOGGLEV( menuBar() );
TOGGLEV( controls );
TOGGLEV( statusBar() );
......
......@@ -72,6 +72,10 @@ enum
static QActionGroup *currentGroup;
/* HACK for minimalView to go around a Qt bug/feature
* that doesn't update the QAction checked state when QMenu is hidden */
QAction *QVLCMenu::minimalViewAction = NULL;
// Add static entries to menus
void addDPStaticEntry( QMenu *menu,
const QString text,
......@@ -376,6 +380,7 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf,
action->setCheckable( true );
if( mi->getControlsVisibilityStatus() & CONTROLS_VISIBLE )
action->setChecked( true );
minimalViewAction = action; /* HACK for minimalView */
/* FullScreen View */
action = menu->addAction( qtr( "Fullscreen Interface" ), mi,
......
......@@ -28,6 +28,7 @@
#include "qt4.hpp"
#include <QObject>
#include <QAction>
#include <vector>
/* Folder vs. Directory */
......@@ -100,6 +101,9 @@ public:
/* Actions */
static void DoAction( intf_thread_t *, QObject * );
/* HACK for minimalView */
static QAction *minimalViewAction;
private:
/* Generic automenu methods */
static QMenu * Populate( intf_thread_t *, QMenu *current,
......
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