diff --git a/include/DummyInstrument.h b/include/DummyInstrument.h index b69594b00..87083f262 100644 --- a/include/DummyInstrument.h +++ b/include/DummyInstrument.h @@ -68,7 +68,7 @@ public: virtual PluginView * instantiateView( QWidget * _parent ) { - return new InstrumentView( this, _parent ); + return new InstrumentViewFixedSize( this, _parent ); } } ; diff --git a/include/InstrumentView.h b/include/InstrumentView.h index 9c6081a77..838ed2d91 100644 --- a/include/InstrumentView.h +++ b/include/InstrumentView.h @@ -32,11 +32,12 @@ class InstrumentTrackWindow; +//! Instrument view with variable size class LMMS_EXPORT InstrumentView : public PluginView { public: InstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~InstrumentView(); + ~InstrumentView() override; Instrument * model() { @@ -48,11 +49,25 @@ public: return( castModel() ); } - virtual void setModel( Model * _model, bool = false ); + void setModel( Model * _model, bool = false ) override; InstrumentTrackWindow * instrumentTrackWindow(); } ; + + +//! Instrument view with fixed LMMS-default size +class LMMS_EXPORT InstrumentViewFixedSize : public InstrumentView +{ + QSize sizeHint() const override { return QSize(250, 250); } + QSize minimumSizeHint() const override { return sizeHint(); } + +public: + using InstrumentView::InstrumentView; + ~InstrumentViewFixedSize() override; +} ; + + #endif diff --git a/include/TabWidget.h b/include/TabWidget.h index 11e4da40a..88ecf9034 100644 --- a/include/TabWidget.h +++ b/include/TabWidget.h @@ -78,6 +78,7 @@ protected: virtual void resizeEvent( QResizeEvent * _re ); virtual void wheelEvent( QWheelEvent * _we ); virtual QSize minimumSizeHint() const; + virtual QSize sizeHint() const; private: struct widgetDesc diff --git a/plugins/FreeBoy/FreeBoy.cpp b/plugins/FreeBoy/FreeBoy.cpp index 8647e7f4b..2f787044f 100644 --- a/plugins/FreeBoy/FreeBoy.cpp +++ b/plugins/FreeBoy/FreeBoy.cpp @@ -457,7 +457,7 @@ public: FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { setAutoFillBackground( true ); diff --git a/plugins/FreeBoy/FreeBoy.h b/plugins/FreeBoy/FreeBoy.h index 69c478505..9ceb27966 100644 --- a/plugins/FreeBoy/FreeBoy.h +++ b/plugins/FreeBoy/FreeBoy.h @@ -111,7 +111,7 @@ private: } ; -class FreeBoyInstrumentView : public InstrumentView +class FreeBoyInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index 200439dae..b358e24e9 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -922,7 +922,7 @@ public: GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { GigInstrument * k = castModel(); diff --git a/plugins/GigPlayer/GigPlayer.h b/plugins/GigPlayer/GigPlayer.h index 0a5e023f9..b9467b91b 100644 --- a/plugins/GigPlayer/GigPlayer.h +++ b/plugins/GigPlayer/GigPlayer.h @@ -334,7 +334,7 @@ signals: -class GigInstrumentView : public InstrumentView +class GigInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/OpulenZ/OpulenZ.cpp b/plugins/OpulenZ/OpulenZ.cpp index 8e5b7f098..4dde05b0f 100644 --- a/plugins/OpulenZ/OpulenZ.cpp +++ b/plugins/OpulenZ/OpulenZ.cpp @@ -681,7 +681,7 @@ void OpulenzInstrument::loadFile( const QString& file ) { OpulenzInstrumentView::OpulenzInstrumentView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { #define KNOB_GEN(knobname, hinttext, hintunit,xpos,ypos) \ diff --git a/plugins/OpulenZ/OpulenZ.h b/plugins/OpulenZ/OpulenZ.h index e69c278ef..2273b355a 100644 --- a/plugins/OpulenZ/OpulenZ.h +++ b/plugins/OpulenZ/OpulenZ.h @@ -142,7 +142,7 @@ private: -class OpulenzInstrumentView : public InstrumentView +class OpulenzInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/Xpressive/Xpressive.cpp b/plugins/Xpressive/Xpressive.cpp index f0154f75b..018319c82 100644 --- a/plugins/Xpressive/Xpressive.cpp +++ b/plugins/Xpressive/Xpressive.cpp @@ -274,7 +274,7 @@ public: XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : - InstrumentView(_instrument, _parent) + InstrumentViewFixedSize(_instrument, _parent) { const int COL_KNOBS = 194; diff --git a/plugins/Xpressive/Xpressive.h b/plugins/Xpressive/Xpressive.h index ca80f2b78..5abee2691 100644 --- a/plugins/Xpressive/Xpressive.h +++ b/plugins/Xpressive/Xpressive.h @@ -139,7 +139,7 @@ private: } ; -class XpressiveView : public InstrumentView +class XpressiveView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index c1cd725c1..7a6eb66ac 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -449,7 +449,7 @@ QPixmap * AudioFileProcessorView::s_artwork = NULL; AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { if( s_artwork == NULL ) { diff --git a/plugins/audio_file_processor/audio_file_processor.h b/plugins/audio_file_processor/audio_file_processor.h index d17be147c..0df7eeaf1 100644 --- a/plugins/audio_file_processor/audio_file_processor.h +++ b/plugins/audio_file_processor/audio_file_processor.h @@ -111,7 +111,7 @@ private: class AudioFileProcessorWaveView; -class AudioFileProcessorView : public InstrumentView +class AudioFileProcessorView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 0d62bc2e6..f8a8423ad 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -326,7 +326,7 @@ PluginView * bitInvader::instantiateView( QWidget * _parent ) bitInvaderView::bitInvaderView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { setAutoFillBackground( true ); QPalette pal; diff --git a/plugins/bit_invader/bit_invader.h b/plugins/bit_invader/bit_invader.h index 1489ab104..793831e4a 100644 --- a/plugins/bit_invader/bit_invader.h +++ b/plugins/bit_invader/bit_invader.h @@ -108,7 +108,7 @@ private: -class bitInvaderView : public InstrumentView +class bitInvaderView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/carlabase/carla.cpp b/plugins/carlabase/carla.cpp index 578c3ac65..3df97ce40 100644 --- a/plugins/carlabase/carla.cpp +++ b/plugins/carlabase/carla.cpp @@ -460,7 +460,7 @@ void CarlaInstrument::sampleRateChanged() // ------------------------------------------------------------------- CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument* const instrument, QWidget* const parent) - : InstrumentView(instrument, parent), + : InstrumentViewFixedSize(instrument, parent), fHandle(instrument->fHandle), fDescriptor(instrument->fDescriptor), fTimerId(fHandle != NULL && fDescriptor->ui_idle != NULL ? startTimer(30) : 0) diff --git a/plugins/carlabase/carla.h b/plugins/carlabase/carla.h index a4efb67e0..393912a50 100644 --- a/plugins/carlabase/carla.h +++ b/plugins/carlabase/carla.h @@ -99,7 +99,7 @@ private: friend class CarlaInstrumentView; }; -class CarlaInstrumentView : public InstrumentView +class CarlaInstrumentView : public InstrumentViewFixedSize { Q_OBJECT diff --git a/plugins/kicker/kicker.cpp b/plugins/kicker/kicker.cpp index d204babab..5f36aae93 100644 --- a/plugins/kicker/kicker.cpp +++ b/plugins/kicker/kicker.cpp @@ -267,7 +267,7 @@ public: kickerInstrumentView::kickerInstrumentView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { const int ROW1 = 14; const int ROW2 = ROW1 + 56; diff --git a/plugins/kicker/kicker.h b/plugins/kicker/kicker.h index 295887c2f..22b2b854f 100644 --- a/plugins/kicker/kicker.h +++ b/plugins/kicker/kicker.h @@ -94,7 +94,7 @@ private: -class kickerInstrumentView : public InstrumentView +class kickerInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index 91e811276..ad3d33b0a 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -803,7 +803,7 @@ PluginView * lb302Synth::instantiateView( QWidget * _parent ) lb302SynthView::lb302SynthView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { // GUI m_vcfCutKnob = new Knob( knobBright_26, this ); diff --git a/plugins/lb302/lb302.h b/plugins/lb302/lb302.h index 3ca22c78b..557d958d4 100644 --- a/plugins/lb302/lb302.h +++ b/plugins/lb302/lb302.h @@ -256,7 +256,7 @@ private: } ; -class lb302SynthView : public InstrumentView +class lb302SynthView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/monstro/Monstro.cpp b/plugins/monstro/Monstro.cpp index 4ea679347..acfd59b29 100644 --- a/plugins/monstro/Monstro.cpp +++ b/plugins/monstro/Monstro.cpp @@ -1447,7 +1447,7 @@ void MonstroInstrument::updateSlope2() MonstroView::MonstroView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { m_operatorsView = setupOperatorsView( this ); setWidgetBackground( m_operatorsView, "artwork_op" ); diff --git a/plugins/monstro/Monstro.h b/plugins/monstro/Monstro.h index a8b186904..fc0cc13b0 100644 --- a/plugins/monstro/Monstro.h +++ b/plugins/monstro/Monstro.h @@ -569,7 +569,7 @@ private: }; -class MonstroView : public InstrumentView +class MonstroView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/nes/Nes.cpp b/plugins/nes/Nes.cpp index b973f4356..d4bcc6881 100644 --- a/plugins/nes/Nes.cpp +++ b/plugins/nes/Nes.cpp @@ -731,7 +731,7 @@ QPixmap * NesInstrumentView::s_artwork = NULL; NesInstrumentView::NesInstrumentView( Instrument * instrument, QWidget * parent ) : - InstrumentView( instrument, parent ) + InstrumentViewFixedSize( instrument, parent ) { setAutoFillBackground( true ); QPalette pal; diff --git a/plugins/nes/Nes.h b/plugins/nes/Nes.h index 20f703739..bbf326d32 100644 --- a/plugins/nes/Nes.h +++ b/plugins/nes/Nes.h @@ -294,7 +294,7 @@ private: }; -class NesInstrumentView : public InstrumentView +class NesInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/organic/organic.cpp b/plugins/organic/organic.cpp index de5f08ff7..7da4fc6f7 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -417,7 +417,7 @@ public: organicInstrumentView::organicInstrumentView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ), + InstrumentViewFixedSize( _instrument, _parent ), m_oscKnobs( NULL ) { organicInstrument * oi = castModel(); diff --git a/plugins/organic/organic.h b/plugins/organic/organic.h index 86b25ea77..c0bc29f16 100644 --- a/plugins/organic/organic.h +++ b/plugins/organic/organic.h @@ -173,7 +173,7 @@ private slots: } ; -class organicInstrumentView : public InstrumentView +class organicInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index 0ea9968da..8a0c71340 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -443,7 +443,7 @@ PluginView * patmanInstrument::instantiateView( QWidget * _parent ) PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ), + InstrumentViewFixedSize( _instrument, _parent ), m_pi( NULL ) { setAutoFillBackground( true ); diff --git a/plugins/patman/patman.h b/plugins/patman/patman.h index a3b5a39b8..8d5689b73 100644 --- a/plugins/patman/patman.h +++ b/plugins/patman/patman.h @@ -116,7 +116,7 @@ signals: -class PatmanView : public InstrumentView +class PatmanView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 138e8165d..53d639f84 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -859,7 +859,7 @@ public: sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { // QVBoxLayout * vl = new QVBoxLayout( this ); // QHBoxLayout * hl = new QHBoxLayout(); diff --git a/plugins/sf2_player/sf2_player.h b/plugins/sf2_player/sf2_player.h index eed7e24ab..1dde587ad 100644 --- a/plugins/sf2_player/sf2_player.h +++ b/plugins/sf2_player/sf2_player.h @@ -187,7 +187,7 @@ public: -class sf2InstrumentView : public InstrumentView +class sf2InstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/sfxr/sfxr.cpp b/plugins/sfxr/sfxr.cpp index cdace1a30..1aacdc12c 100644 --- a/plugins/sfxr/sfxr.cpp +++ b/plugins/sfxr/sfxr.cpp @@ -600,7 +600,7 @@ public: sfxrInstrumentView::sfxrInstrumentView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { srand(time(NULL)); setAutoFillBackground( true ); diff --git a/plugins/sfxr/sfxr.h b/plugins/sfxr/sfxr.h index 27246a1b8..20ae54c96 100644 --- a/plugins/sfxr/sfxr.h +++ b/plugins/sfxr/sfxr.h @@ -223,7 +223,7 @@ private: -class sfxrInstrumentView : public InstrumentView +class sfxrInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/sid/sid_instrument.cpp b/plugins/sid/sid_instrument.cpp index fcb0b82a7..27f874e12 100644 --- a/plugins/sid/sid_instrument.cpp +++ b/plugins/sid/sid_instrument.cpp @@ -483,7 +483,7 @@ public: sidInstrumentView::sidInstrumentView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { setAutoFillBackground( true ); diff --git a/plugins/sid/sid_instrument.h b/plugins/sid/sid_instrument.h index 6128bf91c..479d09c5d 100644 --- a/plugins/sid/sid_instrument.h +++ b/plugins/sid/sid_instrument.h @@ -132,7 +132,7 @@ private: -class sidInstrumentView : public InstrumentView +class sidInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/stk/mallets/mallets.cpp b/plugins/stk/mallets/mallets.cpp index ee1e1fbc3..f770d1f58 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -384,7 +384,7 @@ PluginView * malletsInstrument::instantiateView( QWidget * _parent ) malletsInstrumentView::malletsInstrumentView( malletsInstrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { m_modalBarWidget = setupModalBarControls( this ); setWidgetBackground( m_modalBarWidget, "artwork" ); diff --git a/plugins/stk/mallets/mallets.h b/plugins/stk/mallets/mallets.h index 3928c531c..6fd28d41c 100644 --- a/plugins/stk/mallets/mallets.h +++ b/plugins/stk/mallets/mallets.h @@ -187,7 +187,7 @@ private: } ; -class malletsInstrumentView: public InstrumentView +class malletsInstrumentView: public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/triple_oscillator/TripleOscillator.cpp b/plugins/triple_oscillator/TripleOscillator.cpp index a883f75fa..2a1eccdd7 100644 --- a/plugins/triple_oscillator/TripleOscillator.cpp +++ b/plugins/triple_oscillator/TripleOscillator.cpp @@ -419,7 +419,7 @@ public: TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { setAutoFillBackground( true ); QPalette pal; diff --git a/plugins/triple_oscillator/TripleOscillator.h b/plugins/triple_oscillator/TripleOscillator.h index fb2b48a41..815fa3505 100644 --- a/plugins/triple_oscillator/TripleOscillator.h +++ b/plugins/triple_oscillator/TripleOscillator.h @@ -136,7 +136,7 @@ private: -class TripleOscillatorView : public InstrumentView +class TripleOscillatorView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index 82d4d0407..fc61a2484 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -468,7 +468,7 @@ PluginView * vestigeInstrument::instantiateView( QWidget * _parent ) VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ), + InstrumentViewFixedSize( _instrument, _parent ), lastPosInMenu (0) { if( s_artwork == NULL ) @@ -900,7 +900,7 @@ void VestigeInstrumentView::paintEvent( QPaintEvent * ) manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrument, QWidget * _parent, vestigeInstrument * m_vi2 ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { m_vi = m_vi2; m_vi->m_scrollArea = new QScrollArea( this ); diff --git a/plugins/vestige/vestige.h b/plugins/vestige/vestige.h index e4ef11fce..7090fee1e 100644 --- a/plugins/vestige/vestige.h +++ b/plugins/vestige/vestige.h @@ -97,7 +97,7 @@ private: } ; -class manageVestigeInstrumentView : public InstrumentView +class manageVestigeInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: @@ -133,7 +133,7 @@ private: } ; -class VestigeInstrumentView : public InstrumentView +class VestigeInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index 94f640ff3..c66366082 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -349,7 +349,7 @@ PluginView * vibed::instantiateView( QWidget * _parent ) vibedView::vibedView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { setAutoFillBackground( true ); QPalette pal; diff --git a/plugins/vibed/vibed.h b/plugins/vibed/vibed.h index 9e175c4cc..b1c33f4b7 100644 --- a/plugins/vibed/vibed.h +++ b/plugins/vibed/vibed.h @@ -82,7 +82,7 @@ private: -class vibedView : public InstrumentView +class vibedView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/watsyn/Watsyn.cpp b/plugins/watsyn/Watsyn.cpp index 5c47b7a7a..a5af401cc 100644 --- a/plugins/watsyn/Watsyn.cpp +++ b/plugins/watsyn/Watsyn.cpp @@ -666,7 +666,7 @@ void WatsynInstrument::updateWaveB2() WatsynView::WatsynView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { setAutoFillBackground( true ); QPalette pal; diff --git a/plugins/watsyn/Watsyn.h b/plugins/watsyn/Watsyn.h index e52b7bb75..079e532e4 100644 --- a/plugins/watsyn/Watsyn.h +++ b/plugins/watsyn/Watsyn.h @@ -293,7 +293,7 @@ private: }; -class WatsynView : public InstrumentView +class WatsynView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp index 277c22596..429948e75 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp @@ -497,7 +497,7 @@ PluginView * ZynAddSubFxInstrument::instantiateView( QWidget * _parent ) ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent ) : - InstrumentView( _instrument, _parent ) + InstrumentViewFixedSize( _instrument, _parent ) { setAutoFillBackground( true ); QPalette pal; diff --git a/plugins/zynaddsubfx/ZynAddSubFx.h b/plugins/zynaddsubfx/ZynAddSubFx.h index e8974d149..6f5bc754d 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.h +++ b/plugins/zynaddsubfx/ZynAddSubFx.h @@ -132,7 +132,7 @@ signals: -class ZynAddSubFxView : public InstrumentView +class ZynAddSubFxView : public InstrumentViewFixedSize { Q_OBJECT public: diff --git a/src/gui/EffectControlDialog.cpp b/src/gui/EffectControlDialog.cpp index c43f451aa..dc273a6a3 100644 --- a/src/gui/EffectControlDialog.cpp +++ b/src/gui/EffectControlDialog.cpp @@ -36,6 +36,7 @@ EffectControlDialog::EffectControlDialog( EffectControls * _controls ) : m_effectControls( _controls ) { setWindowTitle( m_effectControls->effect()->displayName() ); + setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); } diff --git a/src/gui/InstrumentView.cpp b/src/gui/InstrumentView.cpp index cf19bbbe1..f6d214926 100644 --- a/src/gui/InstrumentView.cpp +++ b/src/gui/InstrumentView.cpp @@ -70,3 +70,10 @@ InstrumentTrackWindow * InstrumentView::instrumentTrackWindow( void ) parentWidget()->parentWidget() ) ); } + + + +InstrumentViewFixedSize::~InstrumentViewFixedSize() +{ +} + diff --git a/src/gui/SubWindow.cpp b/src/gui/SubWindow.cpp index c47184137..63bdee7a8 100644 --- a/src/gui/SubWindow.cpp +++ b/src/gui/SubWindow.cpp @@ -1,4 +1,4 @@ -/* +/* * SubWindow.cpp - Implementation of QMdiSubWindow that correctly tracks * the geometry that windows should be restored to. * Workaround for https://bugreports.qt.io/browse/QTBUG-256 @@ -349,10 +349,10 @@ void SubWindow::focusChanged( QMdiSubWindow *subWindow ) /** * @brief SubWindow::resizeEvent * - * On every rezise event we have to adjust our title label. - * - * At next we give the event to QMdiSubWindow::resizeEvent() which handles + * At first we give the event to QMdiSubWindow::resizeEvent() which handles * the event on its behavior. + * + * On every resize event we have to adjust our title label. * * At last we store the current size into m_trackedNormalGeom. This size * will be saved with the project because of an Qt bug wich doesn't diff --git a/src/gui/widgets/TabWidget.cpp b/src/gui/widgets/TabWidget.cpp index 9bdbec2e0..125bbbd74 100644 --- a/src/gui/widgets/TabWidget.cpp +++ b/src/gui/widgets/TabWidget.cpp @@ -333,6 +333,14 @@ QSize TabWidget::minimumSizeHint() const +QSize TabWidget::sizeHint() const +{ + return minimumSizeHint(); +} + + + + // Return the color to be used to draw a TabWidget's title text (if any) QColor TabWidget::tabTitleText() const {