summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/arranger/arranger.cpp1
-rw-r--r--muse2/muse/cobject.cpp24
-rw-r--r--muse2/muse/cobject.h4
-rw-r--r--muse2/muse/master/masteredit.cpp2
-rw-r--r--muse2/muse/midiedit/drumedit.cpp1
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp2
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp2
-rw-r--r--muse2/muse/waveedit/waveedit.cpp1
8 files changed, 26 insertions, 11 deletions
diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp
index 0ca0b66d..496ea50a 100644
--- a/muse2/muse/arranger/arranger.cpp
+++ b/muse2/muse/arranger/arranger.cpp
@@ -108,7 +108,6 @@ Arranger::Arranger(ArrangerView* parent, const char* name)
///program = CTRL_VAL_UNKNOWN;
///pan = -65;
///volume = -1;
- setMinimumSize(600, 50);
showTrackinfoFlag = true;
cursVal = MAXINT;
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index a3b62a80..e25cefdb 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -69,6 +69,8 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag
subwinAction->setChecked(isMdiWin());
shareAction->setChecked(_sharesToolsAndMenu);
fullscreenAction->setEnabled(!isMdiWin());
+
+ resize(_widthInit[_type], _heightInit[_type]);
}
@@ -187,10 +189,13 @@ void TopWin::setIsMdiWin(bool val)
if (!isMdiWin())
{
_savedToolbarState = saveState();
-
+ int width_temp=width();
+ int height_temp=height();
bool vis=isVisible();
+
QMdiSubWindow* subwin = createMdiWrapper();
muse->addMdiSubWindow(subwin);
+ subwin->resize(width_temp, height_temp);
subwin->setVisible(vis);
this->QMainWindow::show(); //bypass the delegation to the subwin
@@ -211,13 +216,17 @@ void TopWin::setIsMdiWin(bool val)
{
if (isMdiWin())
{
+ int width_temp=width();
+ int height_temp=height();
bool vis=isVisible();
+
QMdiSubWindow* mdisubwin_temp=mdisubwin;
mdisubwin=NULL;
setParent(NULL);
mdisubwin_temp->hide();
delete mdisubwin_temp;
+ resize(width_temp, height_temp);
setVisible(vis);
if (_sharesToolsAndMenu == _sharesWhenSubwin[_type])
@@ -464,3 +473,16 @@ void TopWin::setFullscreen(bool val)
else
showNormal();
}
+
+void TopWin::resize(int w, int h)
+{
+ QMainWindow::resize(w,h);
+
+ if (isMdiWin())
+ mdisubwin->resize(w,h);
+}
+
+void TopWin::resize(const QSize& s)
+{
+ resize(s.width(), s.height());
+}
diff --git a/muse2/muse/cobject.h b/muse2/muse/cobject.h
index aff4964a..1282b259 100644
--- a/muse2/muse/cobject.h
+++ b/muse2/muse/cobject.h
@@ -60,7 +60,9 @@ class TopWin : public QMainWindow
void addToolBar(QToolBar* toolbar);
QToolBar* addToolBar(const QString& title);
-
+
+ void resize(int w, int h);
+ void resize(const QSize&);
static bool _sharesWhenFree[TOPLEVELTYPE_LAST_ENTRY];
static bool _sharesWhenSubwin[TOPLEVELTYPE_LAST_ENTRY];
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index eb623c14..1eb2d071 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -83,8 +83,6 @@ MasterEdit::MasterEdit()
{
setWindowTitle(tr("MusE: Mastertrack"));
_raster = 0; // measure
- resize(_widthInit[_type], _heightInit[_type]);
- setMinimumSize(400, 300);
//---------Pulldown Menu----------------------------
// QPopupMenu* file = new QPopupMenu(this);
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index 629591e7..14419e0f 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -156,7 +156,6 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
: MidiEditor(TopWin::DRUM, _rasterInit, pl, parent, name)
{
setFocusPolicy(Qt::StrongFocus);
- resize(_widthInit[_type], _heightInit[_type]);
split1w1 = 0;
selPart = 0;
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index a494a728..89f84062 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -73,8 +73,6 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
_playEvents = false;
colorMode = colorModeInit;
- resize(_widthInit[_type], _heightInit[_type]);
-
QSignalMapper* mapper = new QSignalMapper(this);
QSignalMapper* colorMapper = new QSignalMapper(this);
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index 12f96476..56b85df2 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -153,8 +153,6 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
setAttribute(Qt::WA_DeleteOnClose);
setFocusPolicy(Qt::StrongFocus);
- resize(_widthInit[_type], _heightInit[_type]);
-
mainw = new QWidget(this);
mainGrid = new QGridLayout();
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp
index 942242e7..e138769d 100644
--- a/muse2/muse/waveedit/waveedit.cpp
+++ b/muse2/muse/waveedit/waveedit.cpp
@@ -61,7 +61,6 @@ WaveEdit::WaveEdit(PartList* pl)
: MidiEditor(TopWin::WAVE, 1, pl)
{
setFocusPolicy(Qt::StrongFocus);
- resize(_widthInit[_type], _heightInit[_type]);
QSignalMapper* mapper = new QSignalMapper(this);
QAction* act;