summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/ChangeLog2
-rw-r--r--muse/TODO2
-rw-r--r--muse/awl/mslider.cpp1
-rw-r--r--muse/muse/arranger/arranger.cpp5
-rw-r--r--muse/muse/arranger/arranger.h1
-rw-r--r--muse/muse/arranger/canvas.cpp30
-rw-r--r--muse/muse/arranger/configtrack.cpp2
-rw-r--r--muse/muse/arranger/configtrack.ui14
-rw-r--r--muse/muse/arranger/tlswidget.cpp7
-rw-r--r--muse/muse/arranger/tlwidget.cpp22
-rw-r--r--muse/muse/arranger/tlwlayout.cpp14
11 files changed, 46 insertions, 54 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog
index 87392ed4..66647c54 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,4 +1,6 @@
18.04 (ws)
+ - changed track list layout: track name now always uses one
+ textline; remove configure option for track name size
- fix ctrl dialog for plugin provided controller
17.04 (ws)
- replace some heartBeat signal/slot connections with
diff --git a/muse/TODO b/muse/TODO
index b1b49d08..7398445e 100644
--- a/muse/TODO
+++ b/muse/TODO
@@ -53,3 +53,5 @@ CLEANUPS
resource file
- redirect all *xpm program references to resource file
- remove icon.cpp icon.h
+
+
diff --git a/muse/awl/mslider.cpp b/muse/awl/mslider.cpp
index c04e8475..63c3ea4e 100644
--- a/muse/awl/mslider.cpp
+++ b/muse/awl/mslider.cpp
@@ -38,6 +38,7 @@ MeterSlider::MeterSlider(QWidget* parent)
redScale = 0;
_meterWidth = _scaleWidth * 3;
setChannel(1);
+ setMinimumHeight(50);
}
//---------------------------------------------------------
diff --git a/muse/muse/arranger/arranger.cpp b/muse/muse/arranger/arranger.cpp
index f7fea707..5f081a14 100644
--- a/muse/muse/arranger/arranger.cpp
+++ b/muse/muse/arranger/arranger.cpp
@@ -38,8 +38,6 @@
#include "gconfig.h"
#include "part.h"
-int Arranger::trackNameWidth = 80;
-
//---------------------------------------------------------
// TrElement elements
// list of available track gui elements
@@ -994,9 +992,6 @@ void Arranger::readStatus(QDomNode node)
wpos.setX(i);
else if (tag == "vpos")
wpos.setY(i);
- else if (tag == "namesize") {
- Arranger::trackNameWidth = i;
- }
else if (tag == "raster") {
muse->initRaster(i);
canvas->setRaster(i);
diff --git a/muse/muse/arranger/arranger.h b/muse/muse/arranger/arranger.h
index 1644c041..1c9f6e38 100644
--- a/muse/muse/arranger/arranger.h
+++ b/muse/muse/arranger/arranger.h
@@ -165,7 +165,6 @@ class Arranger : public QWidget {
void writeStatus(Xml&);
Track* curTrack() const { return _curTrack; }
void endLoadSong();
- static int trackNameWidth;
Strip* getStrip() const { return strip; }
protected:
diff --git a/muse/muse/arranger/canvas.cpp b/muse/muse/arranger/canvas.cpp
index a5a75058..34329542 100644
--- a/muse/muse/arranger/canvas.cpp
+++ b/muse/muse/arranger/canvas.cpp
@@ -193,29 +193,29 @@ void PartCanvas::paint(QPainter& p, QRect r)
break;
QRect pr(x1, y, len, h - partBorderWidth);
- bool clone = part->isClone();
-
- QPen pen(Qt::black, partBorderWidth, clone ? Qt::DashLine : Qt::SolidLine);
- QBrush brush(Qt::SolidPattern);
- QLinearGradient lg(0, pr.y() - wpos.y()-r.y(),
- 0, pr.y()+ 2*pr.height() -wpos.y()-r.y());
- lg.setColorAt(0, part->selected()?Qt::gray
- :config.partColors[part->colorIndex()]);
- lg.setColorAt(1, Qt::white);
- QBrush brushLG(lg);
+ bool clone = part->isClone();
+
+ QPen pen(QColor(100, 100, 100), partBorderWidth, clone ? Qt::DashLine : Qt::SolidLine);
+ QBrush brush(Qt::SolidPattern);
+ QLinearGradient lg(0, pr.y() - wpos.y()-r.y(),
+ 0, pr.y()+ 2*pr.height() -wpos.y()-r.y());
+ lg.setColorAt(0, part->selected()?Qt::gray
+ :config.partColors[part->colorIndex()]);
+ lg.setColorAt(1, Qt::white);
+ QBrush brushLG(lg);
if (part->selected()) {
pen.setColor(config.partColors[part->colorIndex()]);
brush.setColor(config.selectPartBg);
- p.setBrush(brushLG);
+ p.setBrush(brushLG);
}
- else if (part->mute()) {
+ else if (part->mute()) {
pen.setColor(Qt::red);
brush.setColor(Qt::gray);
- p.setBrush(brush);
+ p.setBrush(brush);
}
else {
- //brush.setColor(config.partColors[part->colorIndex()]);
- p.setBrush(brushLG);
+ //brush.setColor(config.partColors[part->colorIndex()]);
+ p.setBrush(brushLG);
}
p.setPen(pen);
//
diff --git a/muse/muse/arranger/configtrack.cpp b/muse/muse/arranger/configtrack.cpp
index f212329e..a8fee6a3 100644
--- a/muse/muse/arranger/configtrack.cpp
+++ b/muse/muse/arranger/configtrack.cpp
@@ -63,7 +63,6 @@ void ConfigTrackList::init()
trackType->addItem(Track::_clname[tt]);
}
trackTypeChanged(curType);
- trackNameSize->setValue(Arranger::trackNameWidth);
}
//---------------------------------------------------------
@@ -78,7 +77,6 @@ void ConfigTrackList::done(int code)
saveTrackType();
for (int tt = 0; tt < Track::TRACK_TYPES; ++tt)
glist[tt] = list[tt];
- Arranger::trackNameWidth = trackNameSize->value();
emit trackConfigChanged();
}
else {
diff --git a/muse/muse/arranger/configtrack.ui b/muse/muse/arranger/configtrack.ui
index cf52a995..350b405a 100644
--- a/muse/muse/arranger/configtrack.ui
+++ b/muse/muse/arranger/configtrack.ui
@@ -185,20 +185,6 @@
<number>6</number>
</property>
<item>
- <widget class="QLabel" name="textLabel1_2" >
- <property name="text" >
- <string>Track Name Size:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="trackNameSize" >
- <property name="minimum" >
- <number>40</number>
- </property>
- </widget>
- </item>
- <item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
diff --git a/muse/muse/arranger/tlswidget.cpp b/muse/muse/arranger/tlswidget.cpp
index a85018d2..5e7ad434 100644
--- a/muse/muse/arranger/tlswidget.cpp
+++ b/muse/muse/arranger/tlswidget.cpp
@@ -115,6 +115,9 @@ void TLSLayout::setGeometry(const QRect& rect)
TLSWidget::TLSWidget(Track* t, ArrangerTrack* atrack, TimeCanvas* timeC)
{
setAttribute(Qt::WA_NoBackground);
+ setAttribute(Qt::WA_StaticContents);
+ setAutoFillBackground(true);
+
setMouseTracking(true);
_tc = timeC;
state = S_NORMAL;
@@ -224,11 +227,11 @@ bool TLSWidget::showControllerList()
bool TLSWidget::setCtrl(int ctrl)
{
if (ctrl == CTRL_NO_CTRL || ctrl == CTRL_OTHER) {
- // this controller subtrack is new, ask user for
+ // this controller subtrack is new, ask user for
// controller:
return showControllerList();
}
-
+
if (_ctrlTrack && _ctrlTrack != _track) {
disconnect(_ctrlTrack, SIGNAL(controllerChanged(int)), this, SLOT(controllerListChanged(int)));
}
diff --git a/muse/muse/arranger/tlwidget.cpp b/muse/muse/arranger/tlwidget.cpp
index 6608a2c2..01a2085b 100644
--- a/muse/muse/arranger/tlwidget.cpp
+++ b/muse/muse/arranger/tlwidget.cpp
@@ -43,9 +43,9 @@
TLWidget::TLWidget(Track* t, TrGroupList* tgl)
{
-// setAttribute(Qt::WA_OpaquePaintEvent);
-// setAttribute(Qt::WA_NoSystemBackground);
-// setAttribute(Qt::WA_StaticContents);
+ setAttribute(Qt::WA_OpaquePaintEvent);
+ setAutoFillBackground(true);
+
setMouseTracking(true);
state = S_NORMAL;
@@ -114,9 +114,9 @@ void TLWidget::labelPlusClicked()
void TLWidget::mousePressEvent(QMouseEvent* ev)
{
- enum {
- CMD_REMOVE_TRACK, CMD_COPY_TRACK, CMD_SHOW_AUDIO_GUI,
- CMD_SHOW_MIDI_GUI
+ enum {
+ CMD_REMOVE_TRACK, CMD_COPY_TRACK, CMD_SHOW_AUDIO_GUI,
+ CMD_SHOW_MIDI_GUI
};
int button = ev->button();
if (button == Qt::RightButton) {
@@ -261,7 +261,6 @@ void TLWidget::configChanged()
label = new QLabel;
l->addWidget(label);
label->setIndent(3);
- //label->setAlignment(Qt::AlignCener);
label->setFont(config.fonts[1]);
label->setText(_track->cname());
@@ -280,7 +279,6 @@ void TLWidget::configChanged()
switch(id) {
case TR_NAME:
nameEdit = new TLLineEdit(_track->name(), this);
-// nameEdit->setBackgroundRole(QPalette::Window);
nameEdit->setFixedHeight(trackRowHeight);
connect(nameEdit, SIGNAL(contentChanged(QString)), SLOT(nameChanged(QString)));
connect(nameEdit, SIGNAL(mousePress()), SLOT(select()));
@@ -322,7 +320,6 @@ void TLWidget::configChanged()
off = newOffButton();
off->setFixedSize(trackRowHeight, trackRowHeight);
off->setChecked(_track->off());
-// off->setAutoFillBackground(true);
connect(off, SIGNAL(clicked(bool)), SLOT(offToggled(bool)));
connect(_track, SIGNAL(offChanged(bool)), this, SLOT(updateOffState()));
l->addWidget(off);
@@ -383,7 +380,6 @@ void TLWidget::configChanged()
record = newRecordButton();
record->setFixedSize(trackRowHeight, trackRowHeight);
record->setChecked(_track->recordFlag());
-// record->setAutoFillBackground(true);
connect(record, SIGNAL(clicked(bool)), SLOT(recordToggled(bool)));
connect(_track, SIGNAL(recordChanged(bool)), record, SLOT(setChecked(bool)));
l->addWidget(record);
@@ -609,11 +605,11 @@ void TLWidget::paintEvent(QPaintEvent* ev)
pl.setColor(QPalette::Window, color);
pl.setColor(QPalette::Base, color);
nameEdit->setPalette(pl);
-
+
// The selected track will get a 4 pixel red bar to the left
if ( _track->selected()) {
QColor color(200,10,10);
- QRect qr(0, 0, 4, r.height()-splitWidth);
+ QRect qr(0, 0, 4, r.height()-splitWidth);
p.fillRect(qr, color);
}
}
@@ -640,6 +636,6 @@ void TLWidget::channelChanged(int channel)
void TLWidget::setChannel(int channel)
{
- ((MidiTrack*)_track)->setChannel(channel - 1);
+ ((MidiTrack*)_track)->setChannel(channel - 1);
}
diff --git a/muse/muse/arranger/tlwlayout.cpp b/muse/muse/arranger/tlwlayout.cpp
index f3ff445a..076f07cf 100644
--- a/muse/muse/arranger/tlwlayout.cpp
+++ b/muse/muse/arranger/tlwlayout.cpp
@@ -57,7 +57,6 @@ QLayoutItem *TLWidgetLayout::takeAt(int index)
void TLWidgetLayout::setGeometry(const QRect &rect)
{
-// printf("TLWidgetLayout::setGeometry\n");
int n = itemList.size();
if (n < 2)
return;
@@ -76,8 +75,19 @@ void TLWidgetLayout::setGeometry(const QRect &rect)
item = itemList.at(1);
item->setGeometry(QRect(x1 - 18, y2 - 19, 18, 18));
+ itemList.at(2)->setGeometry(QRect(x1, y, x2-x1, dh));
+ if (n <= 3)
+ return;
+
+ y += dh;
+ if ((y + itemList.at(3)->sizeHint().height()) > y2) {
+ for (int i = 3; i < n; ++i)
+ itemList.at(i)->setGeometry(QRect(-1000, -1000, 0, 0));
+ return;
+ }
int x = x1;
- for (int i = 2; i < n; ++i) {
+
+ for (int i = 3; i < n; ++i) {
QLayoutItem *item = itemList.at(i);
QSize size(item->sizeHint());