From 59242adadc72e208dab46339e4cc27adc946e70f Mon Sep 17 00:00:00 2001 From: NoiseByNorthwest Date: Wed, 1 Feb 2012 15:10:52 +0100 Subject: [PATCH] Piano-roll: bypass fixed initial width of the window Signed-off-by: Tobias Doerffel --- src/gui/piano_roll.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp index 0674e53bb..d41e5b095 100644 --- a/src/gui/piano_roll.cpp +++ b/src/gui/piano_roll.cpp @@ -76,7 +76,6 @@ extern Keys whiteKeys[]; // defined in piano_widget.cpp // some constants... -const int INITIAL_PIANOROLL_WIDTH = 840; const int INITIAL_PIANOROLL_HEIGHT = 480; const int SCROLLBAR_SIZE = 16; @@ -600,13 +599,13 @@ pianoRoll::pianoRoll() : if( engine::mainWindow()->workspace() ) { engine::mainWindow()->workspace()->addSubWindow( this ); - parentWidget()->resize( INITIAL_PIANOROLL_WIDTH, + parentWidget()->resize( tb_layout->minimumSize().width(), INITIAL_PIANOROLL_HEIGHT ); parentWidget()->hide(); } else { - resize( INITIAL_PIANOROLL_WIDTH, INITIAL_PIANOROLL_HEIGHT ); + resize( tb_layout->minimumSize().width(), INITIAL_PIANOROLL_HEIGHT ); hide(); }