Skip to content

Commit

Permalink
Issue #4984 Remove maximize from Meter (Metro) menu
Browse files Browse the repository at this point in the history
  • Loading branch information
malcops authored and pmaaul committed Jul 7, 2019
1 parent d766b87 commit 15fb9e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/TempoSyncKnob.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "TempoSyncKnobModel.h"

class MeterDialog;
class QMdiSubWindow;

class LMMS_EXPORT TempoSyncKnob : public Knob
{
Expand Down Expand Up @@ -73,6 +74,7 @@ protected slots:
QPixmap m_tempoSyncIcon;
QString m_tempoSyncDescription;

QMdiSubWindow * m_subWindow;
QPointer<MeterDialog> m_custom;

} ;
Expand Down
5 changes: 4 additions & 1 deletion src/gui/widgets/TempoSyncKnob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ void TempoSyncKnob::showCustom()
if( m_custom == NULL )
{
m_custom = new MeterDialog( gui->mainWindow()->workspace() );
gui->mainWindow()->addWindowedWidget( m_custom );
m_subWindow = gui->mainWindow()->addWindowedWidget( m_custom );
Qt::WindowFlags flags = m_subWindow->windowFlags();
flags &= ~Qt::WindowMaximizeButtonHint;
m_subWindow->setWindowFlags( flags );
m_custom->setWindowTitle( "Meter" );
m_custom->setModel( &model()->m_custom );
}
Expand Down

0 comments on commit 15fb9e4

Please sign in to comment.