summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-12-10 07:51:19 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-12-10 07:51:19 +0000
commitd225bb1f574a68a56b96fa33ebb33dcbc009383b (patch)
treeb119bf122e02d5d3dbcde8813d3da36d947ca6a7 /muse2/muse
parent39d911b43a335ceeb8f87556de0bd2ef3418f937 (diff)
Fixed ctrl canvas not lining up with pianoroll and drumedit.
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/ctrl/ctrledit.cpp3
-rw-r--r--muse2/muse/midiedit/drumedit.cpp6
2 files changed, 8 insertions, 1 deletions
diff --git a/muse2/muse/ctrl/ctrledit.cpp b/muse2/muse/ctrl/ctrledit.cpp
index f55fe8ef..fe04844d 100644
--- a/muse2/muse/ctrl/ctrledit.cpp
+++ b/muse2/muse/ctrl/ctrledit.cpp
@@ -42,6 +42,9 @@ CtrlEdit::CtrlEdit(QWidget* parent, MidiEditor* e, int xmag,
canvas = new CtrlCanvas(e, 0, xmag, "ctrlcanvas", panel);
QWidget* vscale = new VScale;
+ hbox->setContentsMargins(0, 0, 0, 0);
+ hbox->setSpacing (0);
+
canvas->setOrigin(-(config.division/4), 0);
canvas->setMinimumHeight(50);
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index b2a2702c..bd1a55eb 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -928,7 +928,11 @@ CtrlEdit* DrumEdit::addCtrl()
split2->setCollapsible(split2->indexOf(split1w1), false);
split1w1->setMinimumWidth(CTRL_PANEL_FIXED_WIDTH);
}
- ctrlEdit->setCanvasWidth(canvas->width());
+
+ int dw = vscroll->width() - 18;// 18 is the fixed width of the CtlEdit VScale widget.
+ if(dw < 1)
+ dw = 1;
+ ctrlEdit->setCanvasWidth(canvas->width() + dw);
ctrlEdit->show();
ctrlEditList.push_back(ctrlEdit);