diff options
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/ChangeLog | 8 | ||||
-rw-r--r-- | muse2/muse/app.cpp | 1 | ||||
-rw-r--r-- | muse2/muse/appearance.cpp | 167 | ||||
-rw-r--r-- | muse2/muse/appearance.h | 2 | ||||
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 6 | ||||
-rw-r--r-- | muse2/muse/conf.cpp | 76 | ||||
-rw-r--r-- | muse2/muse/gconfig.cpp | 44 | ||||
-rw-r--r-- | muse2/muse/gconfig.h | 20 | ||||
-rw-r--r-- | muse2/muse/mixer/strip.cpp | 27 | ||||
-rw-r--r-- | muse2/muse/widgets/appearancebase.ui | 1263 | ||||
-rw-r--r-- | muse2/muse/widgets/mtrackinfo.cpp | 28 | ||||
-rw-r--r-- | muse2/muse/widgets/musewidgetsplug.cpp | 58 |
12 files changed, 1146 insertions, 554 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 8cbef449..c10e4ed8 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,11 @@ +30.12.2010: + *Feature: Appearance part color names now can now be edited. (Tim) + TODO: Add per-song settings and add toolbar with some colour goodies. + *Feature: Mixer label colours can now be edited in the appearance settings. (Tim) + TODO: Remix track icons using use alpha channel and special routine to mix in + these settable colours. + *Fixed: Appearance settings palette was broken. (Tim) + Note: A few odd Qt styles are wacky (Motif, Windows). Your mileage may vary. 29.12.2010: - Fixed Bigtime display when using a style sheet for MusE. (Tim) Set window font using a style sheet. Bigtime used QFont::setPixelSize(). diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index c2202e7a..968c9388 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -1216,7 +1216,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow() //-------------------------------------------------- tools = addToolBar(tr("File Buttons")); - tools->addAction(fileNewAction); tools->addAction(fileOpenAction); tools->addAction(fileSaveAction); diff --git a/muse2/muse/appearance.cpp b/muse2/muse/appearance.cpp index 7cd3e9ec..997da343 100644 --- a/muse2/muse/appearance.cpp +++ b/muse2/muse/appearance.cpp @@ -99,6 +99,9 @@ Appearance::Appearance(Arranger* a, QWidget* parent) color = 0; config = new GlobalConfigValues; + lastSelectedColorItem = 0; + lastSelectedBgItem = 0; + fontName0->setToolTip(tr("Main application font, and default font for any\n controls not defined here.")); fontName1->setToolTip(tr("For small controls like mixer strips.\nAlso timescale small numbers, arranger part name overlay,\n and effects rack.")); fontName2->setToolTip(tr("Midi track info panel. Transport controls.")); @@ -159,6 +162,8 @@ Appearance::Appearance(Arranger* a, QWidget* parent) itemList->clear(); aid = new IdListViewItem(0, itemList, "Arranger"); id = new IdListViewItem(0, aid, "PartColors"); + // Names moved into global config by Tim. + /* new IdListViewItem(0x400, id, "Default"); new IdListViewItem(0x401, id, "Refrain"); new IdListViewItem(0x402, id, "Bridge"); @@ -176,6 +181,10 @@ Appearance::Appearance(Arranger* a, QWidget* parent) new IdListViewItem(0x40e, id, "Keyboard"); new IdListViewItem(0x40f, id, "Piano"); new IdListViewItem(0x410, id, "Saxophon"); + */ + for(int i = 0; i < NUM_PARTCOLORS; ++i) + new IdListViewItem(0x400 + i, id, ::config.partColorNames[i]); + new IdListViewItem(0x41c, aid, "part canvas background"); id = new IdListViewItem(0, aid, "Track List"); new IdListViewItem(0x411, id, "background"); @@ -198,7 +207,20 @@ Appearance::Appearance(Arranger* a, QWidget* parent) new IdListViewItem(0x41d, id, "controller graph"); id = new IdListViewItem(0, itemList, "Wave Editor"); new IdListViewItem(0x300, id, "background"); - + id = new IdListViewItem(0, itemList, "Mixer"); + new IdListViewItem(0x500, id, "background"); + new IdListViewItem(0x501, id, "midi label"); + new IdListViewItem(0x502, id, "drum label"); + new IdListViewItem(0x503, id, "wave label"); + new IdListViewItem(0x504, id, "audio output label"); + new IdListViewItem(0x505, id, "audio input label"); + new IdListViewItem(0x506, id, "group label"); + new IdListViewItem(0x507, id, "aux label"); + new IdListViewItem(0x508, id, "synth label"); + + colorNameLineEdit->setEnabled(false); + + connect(colorNameLineEdit, SIGNAL(editingFinished()), SLOT(colorNameEditFinished())); connect(itemList, SIGNAL(itemSelectionChanged()), SLOT(colorItemSelectionChanged())); connect(aPalette, SIGNAL(buttonClicked(int)), SLOT(paletteClicked(int))); connect(globalAlphaSlider, SIGNAL(valueChanged(int)), SLOT(asliderChanged(int))); @@ -282,6 +304,7 @@ void Appearance::resetValues() QPalette pal; + /* pal.setColor(palette0->backgroundRole(), config->palette[0]); palette0->setPalette(pal); pal.setColor(palette1->backgroundRole(), config->palette[1]); @@ -314,7 +337,95 @@ void Appearance::resetValues() palette14->setPalette(pal); pal.setColor(palette15->backgroundRole(), config->palette[15]); palette15->setPalette(pal); + */ + /* + pal.setColor(QPalette::Window, config->palette[0]); + palette0->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[1]); + palette1->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[2]); + palette2->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[3]); + palette3->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[4]); + palette4->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[5]); + palette5->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[6]); + palette6->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[7]); + palette7->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[8]); + palette8->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[9]); + palette9->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[10]); + palette10->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[11]); + palette11->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[12]); + palette12->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[13]); + palette13->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[14]); + palette14->setPalette(pal); + pal.setColor(QPalette::Window, config->palette[15]); + palette15->setPalette(pal); + */ + + /* + pal.setColor(QPalette::Button, config->palette[0]); + palette0->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[1]); + palette1->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[2]); + palette2->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[3]); + palette3->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[4]); + palette4->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[5]); + palette5->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[6]); + palette6->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[7]); + palette7->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[8]); + palette8->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[9]); + palette9->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[10]); + palette10->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[11]); + palette11->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[12]); + palette12->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[13]); + palette13->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[14]); + palette14->setPalette(pal); + pal.setColor(QPalette::Button, config->palette[15]); + palette15->setPalette(pal); + */ + + palette0->setStyleSheet(QString("background-color: ") + config->palette[0].name()); + palette1->setStyleSheet(QString("background-color: ") + config->palette[1].name()); + palette2->setStyleSheet(QString("background-color: ") + config->palette[2].name()); + palette3->setStyleSheet(QString("background-color: ") + config->palette[3].name()); + palette4->setStyleSheet(QString("background-color: ") + config->palette[4].name()); + palette5->setStyleSheet(QString("background-color: ") + config->palette[5].name()); + palette6->setStyleSheet(QString("background-color: ") + config->palette[6].name()); + palette7->setStyleSheet(QString("background-color: ") + config->palette[7].name()); + palette8->setStyleSheet(QString("background-color: ") + config->palette[8].name()); + palette9->setStyleSheet(QString("background-color: ") + config->palette[9].name()); + palette10->setStyleSheet(QString("background-color: ") + config->palette[10].name()); + palette11->setStyleSheet(QString("background-color: ") + config->palette[11].name()); + palette12->setStyleSheet(QString("background-color: ") + config->palette[12].name()); + palette13->setStyleSheet(QString("background-color: ") + config->palette[13].name()); + palette14->setStyleSheet(QString("background-color: ") + config->palette[14].name()); + palette15->setStyleSheet(QString("background-color: ") + config->palette[15].name()); + global_bg->takeChildren(); user_bg->takeChildren(); @@ -566,6 +677,29 @@ void Appearance::apply() } //--------------------------------------------------------- +// colorNameEditFinished +//--------------------------------------------------------- + +void Appearance::colorNameEditFinished() +{ + if(!lastSelectedColorItem) + return; + + IdListViewItem* item = (IdListViewItem*)lastSelectedColorItem; + int id = item->id(); + if(id == 0) + return; + + QString etxt = colorNameLineEdit->text(); + QString txt = item->text(0); + // We only support part color names, for now. + if(id >= 0x400 && id < (0x400 + NUM_PARTCOLORS)) + config->partColorNames[id & 0xff] = etxt; + if(etxt != txt) + item->setText(0, etxt); +} + +//--------------------------------------------------------- // ok //--------------------------------------------------------- @@ -643,12 +777,16 @@ void Appearance::clearBackground() void Appearance::colorItemSelectionChanged() { IdListViewItem* item = (IdListViewItem*)itemList->selectedItems()[0]; + lastSelectedColorItem = 0; QString txt = item->text(0); int id = item->id(); if (id == 0) { color = 0; + lastSelectedColorItem = 0; + colorNameLineEdit->setEnabled(false); return; } + bool enle = false; switch(id) { case 0x400: // "Default" case 0x401: // "Refrain" @@ -667,7 +805,9 @@ void Appearance::colorItemSelectionChanged() case 0x40e: // "Keyboard case 0x40f: // "Piano case 0x410: // "Saxophon + lastSelectedColorItem = item; color = &config->partColors[id & 0xff]; + enle = true; break; case 0x100: color = &config->bigTimeBackgroundColor; break; case 0x101: color = &config->bigTimeForegroundColor; break; @@ -687,10 +827,25 @@ void Appearance::colorItemSelectionChanged() case 0x41c: color = &config->partCanvasBg; break; case 0x41d: color = &config->ctrlGraphFg; break; + case 0x500: color = &config->mixerBg; break; + case 0x501: color = &config->midiTrackLabelBg; break; + case 0x502: color = &config->drumTrackLabelBg; break; + case 0x503: color = &config->waveTrackLabelBg; break; + case 0x504: color = &config->outputTrackLabelBg; break; + case 0x505: color = &config->inputTrackLabelBg; break; + case 0x506: color = &config->groupTrackLabelBg; break; + case 0x507: color = &config->auxTrackLabelBg; break; + case 0x508: color = &config->synthTrackLabelBg; break; + default: color = 0; break; } + colorNameLineEdit->setEnabled(enle); + QString s; + if(enle) + s = config->partColorNames[id & 0xff]; + colorNameLineEdit->setText(s); updateColor(); } @@ -875,9 +1030,12 @@ void Appearance::addToPaletteClicked() if (button) { int id = aPalette->id(button); config->palette[id] = *color; - QPalette pal; - pal.setColor(button->backgroundRole(), *color); - button->setPalette(pal); + //QPalette pal; + //pal.setColor(button->backgroundRole(), *color); + //pal.setColor(QPalette::Window, *color); + //pal.setColor(QPalette::Button, *color); + //button->setPalette(pal); + button->setStyleSheet(QString("background-color: ") + color->name()); button->update(); //?? } } @@ -893,6 +1051,7 @@ void Appearance::paletteClicked(int id) QAbstractButton* button = (QAbstractButton*)aPalette->button(id); // ddskrjo if (button) { QColor c = button->palette().color(QPalette::Window); + //QColor c = button->palette().color(button->backgroundRole()); int r, g, b; c.getRgb(&r, &g, &b); if (r == 0xff && g == 0xff && b == 0xff) diff --git a/muse2/muse/appearance.h b/muse2/muse/appearance.h index 851888b8..ef99adbe 100644 --- a/muse2/muse/appearance.h +++ b/muse2/muse/appearance.h @@ -22,6 +22,7 @@ class Appearance : public QDialog, public Ui::AppearanceDialogBase { QTreeWidgetItem* user_bg; QTreeWidgetItem* global_bg; QTreeWidgetItem* lastSelectedBgItem; + QTreeWidgetItem* lastSelectedColorItem; Q_OBJECT void updateFonts(); @@ -56,6 +57,7 @@ class Appearance : public QDialog, public Ui::AppearanceDialogBase { void addToPaletteClicked(); void paletteClicked(int); void bgSelectionChanged(QTreeWidgetItem*); + void colorNameEditFinished(); public: Appearance(Arranger*, QWidget* parent=0); diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 984d6eaa..ae0392d8 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -35,6 +35,8 @@ #include "filedialog.h" #include "marker/marker.h" +// Moved into global config by Tim. +/* const char* partColorNames[] = { "Default", "Refrain", @@ -54,6 +56,8 @@ const char* partColorNames[] = { "Piano", "Saxophon", }; +*/ + /* //--------------------------------------------------------- // ColorListItem @@ -749,7 +753,7 @@ QMenu* PartCanvas::genItemPopup(CItem* item) for (int i = 0; i < NUM_PARTCOLORS; ++i) { //ColorListItem* item = new ColorListItem(config.partColors[i], h, fontMetrics().height(), partColorNames[i]); //ddskrjo - QAction *act_color = colorPopup->addAction(colorRect(config.partColors[i], 80, 80), partColorNames[i]); + QAction *act_color = colorPopup->addAction(colorRect(config.partColors[i], 80, 80), config.partColorNames[i]); act_color->setData(20+i); } diff --git a/muse2/muse/conf.cpp b/muse2/muse/conf.cpp index 02565712..328224f3 100644 --- a/muse2/muse/conf.cpp +++ b/muse2/muse/conf.cpp @@ -609,6 +609,44 @@ void readConfiguration(Xml& xml, bool readOnlySequencer) config.partColors[16] = readColor(xml); else if (tag == "partColor17") config.partColors[17] = readColor(xml); + + else if (tag == "partColorName0") + config.partColorNames[0] = xml.parse1(); + else if (tag == "partColorName1") + config.partColorNames[1] = xml.parse1(); + else if (tag == "partColorName2") + config.partColorNames[2] = xml.parse1(); + else if (tag == "partColorName3") + config.partColorNames[3] = xml.parse1(); + else if (tag == "partColorName4") + config.partColorNames[4] = xml.parse1(); + else if (tag == "partColorName5") + config.partColorNames[5] = xml.parse1(); + else if (tag == "partColorName6") + config.partColorNames[6] = xml.parse1(); + else if (tag == "partColorName7") + config.partColorNames[7] = xml.parse1(); + else if (tag == "partColorName8") + config.partColorNames[8] = xml.parse1(); + else if (tag == "partColorName9") + config.partColorNames[9] = xml.parse1(); + else if (tag == "partColorName10") + config.partColorNames[10] = xml.parse1(); + else if (tag == "partColorName11") + config.partColorNames[11] = xml.parse1(); + else if (tag == "partColorName12") + config.partColorNames[12] = xml.parse1(); + else if (tag == "partColorName13") + config.partColorNames[13] = xml.parse1(); + else if (tag == "partColorName14") + config.partColorNames[14] = xml.parse1(); + else if (tag == "partColorName15") + config.partColorNames[15] = xml.parse1(); + else if (tag == "partColorName16") + config.partColorNames[16] = xml.parse1(); + else if (tag == "partColorName17") + config.partColorNames[17] = xml.parse1(); + else if (tag == "partCanvasBg") config.partCanvasBg = readColor(xml); else if (tag == "trackBg") @@ -617,6 +655,26 @@ void readConfiguration(Xml& xml, bool readOnlySequencer) config.selectTrackBg = readColor(xml); else if (tag == "selectTrackFg") config.selectTrackFg = readColor(xml); + + else if (tag == "mixerBg") + config.mixerBg = readColor(xml); + else if (tag == "midiTrackLabelBg") + config.midiTrackLabelBg = readColor(xml); + else if (tag == "drumTrackLabelBg") + config.drumTrackLabelBg = readColor(xml); + else if (tag == "waveTrackLabelBg") + config.waveTrackLabelBg = readColor(xml); + else if (tag == "outputTrackLabelBg") + config.outputTrackLabelBg = readColor(xml); + else if (tag == "inputTrackLabelBg") + config.inputTrackLabelBg = readColor(xml); + else if (tag == "groupTrackLabelBg") + config.groupTrackLabelBg = readColor(xml); + else if (tag == "auxTrackLabelBg") + config.auxTrackLabelBg = readColor(xml); + else if (tag == "synthTrackLabelBg") + config.synthTrackLabelBg = readColor(xml); + else if (tag == "midiTrackBg") config.midiTrackBg = readColor(xml); else if (tag == "ctrlGraphFg") @@ -635,6 +693,7 @@ void readConfiguration(Xml& xml, bool readOnlySequencer) config.auxTrackBg = readColor(xml); else if (tag == "synthTrackBg") config.synthTrackBg = readColor(xml); + else if (tag == "extendedMidi") config.extendedMidi = xml.parseInt(); else if (tag == "midiExportDivision") @@ -1141,10 +1200,27 @@ void MusE::writeGlobalConfiguration(int level, Xml& xml) const xml.colorTag(level, buffer, config.partColors[i]); } + for (int i = 0; i < NUM_PARTCOLORS; ++i) { + char buffer[32]; + sprintf(buffer, "partColorName%d", i); + xml.strTag(level, buffer, config.partColorNames[i]); + } + xml.colorTag(level, "partCanvasBg", config.partCanvasBg); xml.colorTag(level, "trackBg", config.trackBg); xml.colorTag(level, "selectTrackBg", config.selectTrackBg); xml.colorTag(level, "selectTrackFg", config.selectTrackFg); + + xml.colorTag(level, "mixerBg", config.mixerBg); + xml.colorTag(level, "midiTrackLabelBg", config.midiTrackLabelBg); + xml.colorTag(level, "drumTrackLabelBg", config.drumTrackLabelBg); + xml.colorTag(level, "waveTrackLabelBg", config.waveTrackLabelBg); + xml.colorTag(level, "outputTrackLabelBg", config.outputTrackLabelBg); + xml.colorTag(level, "inputTrackLabelBg", config.inputTrackLabelBg); + xml.colorTag(level, "groupTrackLabelBg", config.groupTrackLabelBg); + xml.colorTag(level, "auxTrackLabelBg", config.auxTrackLabelBg); + xml.colorTag(level, "synthTrackLabelBg", config.synthTrackLabelBg); + xml.colorTag(level, "midiTrackBg", config.midiTrackBg); xml.colorTag(level, "ctrlGraphFg", config.ctrlGraphFg); xml.colorTag(level, "drumTrackBg", config.drumTrackBg); diff --git a/muse2/muse/gconfig.cpp b/muse2/muse/gconfig.cpp index 2b0caafb..944035a7 100644 --- a/muse2/muse/gconfig.cpp +++ b/muse2/muse/gconfig.cpp @@ -46,10 +46,29 @@ GlobalConfigValues config = { QColor(0x7f, 0x00, 0x7f), QColor(0x00, 0x7f, 0xff), QColor(0x00, 0x3f, 0x3f) - }, - QColor(0, 0, 255), // transportHandleColor; - QColor(255, 0, 0), // bigTimeForegroundColor; - QColor(0, 0, 0), // bigTimeBackgroundColor; + }, + { + QString("Default"), // Default part color names + QString("Refrain"), + QString("Bridge"), + QString("Intro"), + QString("Coda"), + QString("Chorus"), + QString("Solo"), + QString("Brass"), + QString("Percussion"), + QString("Drums"), + QString("Guitar"), + QString("Bass"), + QString("Flute"), + QString("Strings"), + QString("Keyboard"), + QString("Piano"), + QString("Saxophone") + }, + QColor(0, 0, 255), // transportHandleColor; + QColor(255, 0, 0), // bigTimeForegroundColor; + QColor(0, 0, 0), // bigTimeBackgroundColor; QColor(200, 200, 200), // waveEditBackgroundColor; { QFont(QString("arial"), 10, QFont::Normal), @@ -64,8 +83,17 @@ GlobalConfigValues config = { QColor(84, 97, 114), // trackBg; QColor(0x80, 0xff, 0x80), // selected track Bg; QColor(0x00, 0x00, 0x00), // selected track Fg; + + QColor(0, 160, 255), // midiTrackLabelBg; // Med blue + QColor(0, 160, 255), // drumTrackLabelBg; // Med blue + Qt::magenta, // waveTrackLabelBg; + Qt::green, // outputTrackLabelBg; + Qt::red, // inputTrackLabelBg; + Qt::yellow, // groupTrackLabelBg; + QColor(120, 255, 255), // auxTrackLabelBg; // Light blue + QColor(255, 130, 0), // synthTrackLabelBg; // Med orange + QColor(220, 220, 220), // midiTrackBg; - QColor(255, 170, 0), // ctrlGraphFg; Medium orange QColor(220, 220, 220), // drumTrackBg; QColor(220, 220, 220), // waveTrackBg; QColor(189, 220, 193), // outputTrackBg; @@ -73,8 +101,10 @@ GlobalConfigValues config = { QColor(220, 220, 220), // groupTrackBg; QColor(220, 220, 220), // auxTrackBg; QColor(220, 220, 220), // synthTrackBg; - QColor(98, 124, 168), // part canvas bg - QColor(0, 0, 0), // mixerBg; + + QColor(98, 124, 168), // part canvas bg + QColor(255, 170, 0), // ctrlGraphFg; Medium orange + QColor(0, 0, 0), // mixerBg; 384, // division; 1024, // rtcTicks diff --git a/muse2/muse/gconfig.h b/muse2/muse/gconfig.h index f58b1a51..2eeea7cb 100644 --- a/muse2/muse/gconfig.h +++ b/muse2/muse/gconfig.h @@ -51,17 +51,27 @@ struct GlobalConfigValues { int globalAlphaBlend; QColor palette[16]; QColor partColors[NUM_PARTCOLORS]; - QColor transportHandleColor; - QColor bigTimeForegroundColor; - QColor bigTimeBackgroundColor; + QString partColorNames[NUM_PARTCOLORS]; + QColor transportHandleColor; + QColor bigTimeForegroundColor; + QColor bigTimeBackgroundColor; QColor waveEditBackgroundColor; //QFont fonts[6]; QFont fonts[NUM_FONTS]; QColor trackBg; QColor selectTrackBg; QColor selectTrackFg; + + QColor midiTrackLabelBg; + QColor drumTrackLabelBg; + QColor waveTrackLabelBg; + QColor outputTrackLabelBg; + QColor inputTrackLabelBg; + QColor groupTrackLabelBg; + QColor auxTrackLabelBg; + QColor synthTrackLabelBg; + QColor midiTrackBg; - QColor ctrlGraphFg; QColor drumTrackBg; QColor waveTrackBg; QColor outputTrackBg; @@ -69,7 +79,9 @@ struct GlobalConfigValues { QColor groupTrackBg; QColor auxTrackBg; QColor synthTrackBg; + QColor partCanvasBg; + QColor ctrlGraphFg; QColor mixerBg; int division; diff --git a/muse2/muse/mixer/strip.cpp b/muse2/muse/mixer/strip.cpp index 30515129..0c4059d8 100644 --- a/muse2/muse/mixer/strip.cpp +++ b/muse2/muse/mixer/strip.cpp @@ -94,28 +94,36 @@ void Strip::setLabelText() QColor c; switch(track->type()) { case Track::AUDIO_OUTPUT: - c = Qt::green; + //c = Qt::green; + c = config.outputTrackLabelBg; break; case Track::AUDIO_GROUP: - c = Qt::yellow; + //c = Qt::yellow; + c = config.groupTrackLabelBg; break; case Track::AUDIO_AUX: - c = QColor(120, 255, 255); // Light blue + //c = QColor(120, 255, 255); // Light blue + c = config.auxTrackLabelBg; break; case Track::WAVE: - c = Qt::magenta; + //c = Qt::magenta; + c = config.waveTrackLabelBg; break; case Track::AUDIO_INPUT: - c = Qt::red; + //c = Qt::red; + c = config.inputTrackLabelBg; break; case Track::AUDIO_SOFTSYNTH: - c = QColor(255, 130, 0); // Med orange + //c = QColor(255, 130, 0); // Med orange + c = config.synthTrackLabelBg; break; case Track::MIDI: + //c = QColor(0, 160, 255); // Med blue + c = config.midiTrackLabelBg; + break; case Track::DRUM: - { - c = QColor(0, 160, 255); // Med blue - } + //c = QColor(0, 160, 255); // Med blue + c = config.drumTrackLabelBg; break; default: return; @@ -125,6 +133,7 @@ void Strip::setLabelText() QPalette palette; palette.setColor(label->backgroundRole(), c); label->setPalette(palette); + //label->setStyleSheet(QString("background-color: ") + c.name()); } //--------------------------------------------------------- diff --git a/muse2/muse/widgets/appearancebase.ui b/muse2/muse/widgets/appearancebase.ui index 67f1ea7c..b739e3f5 100644 --- a/muse2/muse/widgets/appearancebase.ui +++ b/muse2/muse/widgets/appearancebase.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>591</width> - <height>633</height> + <width>538</width> + <height>531</height> </rect> </property> <property name="windowTitle"> @@ -204,526 +204,783 @@ <attribute name="title"> <string>Colors</string> </attribute> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <layout class="QGridLayout"> - <item row="0" column="1"> - <widget class="QGroupBox" name="aPaletteBox"> - <property name="focusPolicy"> - <enum>Qt::NoFocus</enum> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0" rowspan="2"> + <widget class="QTreeWidget" name="itemList"> + <property name="rootIsDecorated"> + <bool>true</bool> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + <column> + <property name="text"> + <string>Items</string> + </property> + </column> + </widget> + </item> + <item row="0" column="1"> + <widget class="QGroupBox" name="aPaletteBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="title"> + <string>Palette</string> + </property> + <property name="selectedId" stdset="0"> + <number>0</number> + </property> + <layout class="QGridLayout" name="gridLayout_1"> + <item row="0" column="0"> + <widget class="QPushButton" name="palette0"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QPushButton" name="palette1"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QPushButton" name="palette2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="0" column="3"> + <widget class="QPushButton" name="palette3"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QPushButton" name="palette4"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QPushButton" name="palette5"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QPushButton" name="palette6"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="3"> + <widget class="QPushButton" name="palette7"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QPushButton" name="palette8"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="palette9"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QPushButton" name="palette10"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="2" column="3"> + <widget class="QPushButton" name="palette11"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QPushButton" name="palette12"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QPushButton" name="palette13"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QPushButton" name="palette14"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="3" column="3"> + <widget class="QPushButton" name="palette15"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="0" column="2"> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QFrame" name="colorframe"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="title"> - <string>Palette</string> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> </property> - <property name="selectedId" stdset="0"> - <number>0</number> + <property name="frameShadow"> + <enum>QFrame::Sunken</enum> </property> - <layout class="QGridLayout"> - <property name="spacing"> - <number>0</number> - </property> - <item row="0" column="0"> - <widget class="QPushButton" name="palette0"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QPushButton" name="palette1"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QPushButton" name="palette2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QPushButton" name="palette3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QPushButton" name="palette4"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="5" column="0"> - <widget class="QPushButton" name="palette5"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QPushButton" name="palette8"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QPushButton" name="palette9"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QPushButton" name="palette10"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QPushButton" name="palette11"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QPushButton" name="palette12"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="QPushButton" name="palette13"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="7" column="0"> - <widget class="QPushButton" name="palette7"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="6" column="0"> - <widget class="QPushButton" name="palette6"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="7" column="1"> - <widget class="QPushButton" name="palette15"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="QPushButton" name="palette14"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> </widget> </item> - <item row="1" column="1"> + <item> <widget class="QPushButton" name="addToPalette"> <property name="text"> <string>add to palette</string> </property> </widget> </item> - <item row="0" column="2" rowspan="2"> - <widget class="QFrame" name="colorframe"> + </layout> + </item> + <item row="1" column="1" colspan="2"> + <layout class="QGridLayout"> + <item row="0" column="1"> + <widget class="QSpinBox" name="rval"> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QSlider" name="hslider"> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="textLabel3_2"> + <property name="text"> + <string>B</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="textLabel5_2"> + <property name="text"> + <string>S</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="textLabel4_2"> + <property name="text"> + <string>H</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QSpinBox" name="bval"> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="5" column="2"> + <widget class="QSlider" name="vslider"> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="5" column="0"> + <widget class="QLabel" name="textLabel6_2"> + <property name="text"> + <string>V</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="textLabel2_2"> + <property name="text"> + <string>G</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QSpinBox" name="sval"> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QSlider" name="gslider"> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="4" column="2"> + <widget class="QSlider" name="sslider"> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QSlider" name="bslider"> + <property name="maximum"> + <number>255</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QSpinBox" name="gval"> + <property name="maximum"> + <number>255</number> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QSlider" name="rslider"> <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> + <property name="minimum"> + <number>0</number> </property> - <property name="frameShadow"> - <enum>QFrame::Sunken</enum> + <property name="maximum"> + <number>255</number> + </property> + <property name="tracking"> + <bool>true</bool> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::NoTicks</enum> </property> </widget> </item> - <item row="2" column="1" colspan="2"> - <layout class="QGridLayout"> - <item row="0" column="1"> - <widget class="QSpinBox" name="rval"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QSlider" name="hslider"> - <property name="maximum"> - <number>255</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="textLabel3_2"> - <property name="text"> - <string>B</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="textLabel5_2"> - <property name="text"> - <string>S</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="textLabel4_2"> - <property name="text"> - <string>H</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QSpinBox" name="bval"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="5" column="2"> - <widget class="QSlider" name="vslider"> - <property name="maximum"> - <number>255</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="5" column="0"> - <widget class="QLabel" name="textLabel6_2"> - <property name="text"> - <string>V</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="textLabel2_2"> - <property name="text"> - <string>G</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QSpinBox" name="sval"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QSlider" name="gslider"> - <property name="maximum"> - <number>255</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QSlider" name="sslider"> - <property name="maximum"> - <number>255</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QSlider" name="bslider"> - <property name="maximum"> - <number>255</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QSpinBox" name="gval"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QSlider" name="rslider"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimum"> - <number>0</number> - </property> - <property name="maximum"> - <number>255</number> - </property> - <property name="tracking"> - <bool>true</bool> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::NoTicks</enum> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="QSpinBox" name="vval"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QSpinBox" name="hval"> - <property name="maximum"> - <number>255</number> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="textLabel1"> - <property name="text"> - <string>R</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - </layout> + <item row="5" column="1"> + <widget class="QSpinBox" name="vval"> + <property name="maximum"> + <number>255</number> + </property> + </widget> </item> - <item row="0" column="0" rowspan="3"> - <widget class="QTreeWidget" name="itemList"> - <property name="rootIsDecorated"> - <bool>true</bool> + <item row="3" column="1"> + <widget class="QSpinBox" name="hval"> + <property name="maximum"> + <number>255</number> </property> - <property name="allColumnsShowFocus"> - <bool>true</bool> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="textLabel1"> + <property name="text"> + <string>R</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> </property> - <column> - <property name="text"> - <string>Items</string> - </property> - </column> </widget> </item> </layout> </item> - <item> + <item row="2" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Color name:</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="colorNameLineEdit"/> + </item> + </layout> + </item> + <item row="2" column="1" colspan="2"> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QLabel" name="textLabel1_2"> @@ -778,22 +1035,6 @@ </item> </layout> </item> - <item> - <spacer name="botColorSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> </layout> </widget> <widget class="QWidget" name="tab3"> diff --git a/muse2/muse/widgets/mtrackinfo.cpp b/muse2/muse/widgets/mtrackinfo.cpp index af957dd2..f9903037 100644 --- a/muse2/muse/widgets/mtrackinfo.cpp +++ b/muse2/muse/widgets/mtrackinfo.cpp @@ -42,6 +42,14 @@ void MidiTrackInfo::setTrack(Track* t) if(!t->isMidiTrack()) return; selected = t; + + QPalette pal; + if(selected->type() == Track::DRUM) + pal.setColor(trackNameLabel->backgroundRole(), config.drumTrackLabelBg); + else + pal.setColor(trackNameLabel->backgroundRole(), config.midiTrackLabelBg); + trackNameLabel->setPalette(pal); + updateTrackInfo(-1); } @@ -71,6 +79,7 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, Track* sel_track) : QWidget(parent recEchoIconSet.addPixmap(*midiThruOnIcon, QIcon::Normal, QIcon::On); recEchoIconSet.addPixmap(*midiThruOffIcon, QIcon::Normal, QIcon::Off); recEchoButton->setIcon(recEchoIconSet); + recEchoButton->setIconSize(midiThruOnIcon->size()); // MusE-2: AlignCenter and WordBreak are set in the ui(3) file, but not supported by QLabel. Turn them on here. trackNameLabel->setAlignment(Qt::AlignCenter); @@ -81,10 +90,23 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, Track* sel_track) : QWidget(parent //trackNameLabel->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum)); if(selected) + { trackNameLabel->setObjectName(selected->cname()); - QPalette pal; - pal.setColor(trackNameLabel->backgroundRole(), QColor(0, 160, 255)); // Med blue - trackNameLabel->setPalette(pal); + QPalette pal; + //pal.setColor(trackNameLabel->backgroundRole(), QColor(0, 160, 255)); // Med blue + if(selected->type() == Track::DRUM) + pal.setColor(trackNameLabel->backgroundRole(), config.drumTrackLabelBg); + else + pal.setColor(trackNameLabel->backgroundRole(), config.midiTrackLabelBg); + trackNameLabel->setPalette(pal); + } + //else + //{ + // pal.setColor(trackNameLabel->backgroundRole(), config.midiTrackLabelBg); + // trackNameLabel->setPalette(pal); + //} + + //trackNameLabel->setStyleSheet(QString("background-color: ") + QColor(0, 160, 255).name()); // Med blue trackNameLabel->setWordWrap(true); trackNameLabel->setAutoFillBackground(true); trackNameLabel->setTextFormat(Qt::PlainText); diff --git a/muse2/muse/widgets/musewidgetsplug.cpp b/muse2/muse/widgets/musewidgetsplug.cpp index e5858bd4..4b61cf2a 100644 --- a/muse2/muse/widgets/musewidgetsplug.cpp +++ b/muse2/muse/widgets/musewidgetsplug.cpp @@ -76,10 +76,29 @@ GlobalConfigValues config = { QColor(0x7f, 0x00, 0x7f), QColor(0x00, 0x7f, 0xff), QColor(0x00, 0x3f, 0x3f) - }, - QColor(0, 0, 255), // transportHandleColor; - QColor(255, 0, 0), // bigTimeForegroundColor; - QColor(0, 0, 0), // bigTimeBackgroundColor; + }, + { + QString("Default"), // Default part color names + QString("Refrain"), + QString("Bridge"), + QString("Intro"), + QString("Coda"), + QString("Chorus"), + QString("Solo"), + QString("Brass"), + QString("Percussion"), + QString("Drums"), + QString("Guitar"), + QString("Bass"), + QString("Flute"), + QString("Strings"), + QString("Keyboard"), + QString("Piano"), + QString("Saxophone") + }, + QColor(0, 0, 255), // transportHandleColor; + QColor(255, 0, 0), // bigTimeForegroundColor; + QColor(0, 0, 0), // bigTimeBackgroundColor; QColor(200, 200, 200), // waveEditBackgroundColor; { QFont(QString("arial"), 10, QFont::Normal), @@ -94,17 +113,28 @@ GlobalConfigValues config = { QColor(0xff, 0xff, 0xff), // trackBg; QColor(0x80, 0xff, 0x80), // selected track Bg; QColor(0x00, 0x00, 0x00), // selected track Fg; - QColor(0xff, 0xff, 0xff), // midiTrackBg; - QColor(255, 170, 0), // ctrlGraphFg; Medium orange - QColor(0xff, 0xff, 0xff), // drumTrackBg; - QColor(0xff, 0xff, 0xff), // waveTrackBg; - QColor(0xff, 0xff, 0xff), // outputTrackBg; - QColor(0xff, 0xff, 0xff), // inputTrackBg; - QColor(0xff, 0xff, 0xff), // groupTrackBg; - QColor(0xff, 0xff, 0xff), // auxTrackBg; - QColor(0xff, 0xff, 0xff), // synthTrackBg; + + QColor(0, 160, 255), // midiTrackLabelBg; // Med blue + QColor(0, 160, 255), // drumTrackLabelBg; // Med blue + Qt::magenta, // waveTrackLabelBg; + Qt::green, // outputTrackLabelBg; + Qt::red, // inputTrackLabelBg; + Qt::yellow, // groupTrackLabelBg; + QColor(120, 255, 255), // auxTrackLabelBg; // Light blue + QColor(255, 130, 0), // synthTrackLabelBg; // Med orange + + QColor(220, 220, 220), // midiTrackBg; + QColor(220, 220, 220), // drumTrackBg; + QColor(220, 220, 220), // waveTrackBg; + QColor(189, 220, 193), // outputTrackBg; + QColor(189, 220, 193), // inputTrackBg; + QColor(220, 220, 220), // groupTrackBg; + QColor(220, 220, 220), // auxTrackBg; + QColor(220, 220, 220), // synthTrackBg; + QColor(98, 124, 168), // part canvas bg - QColor(98, 124, 168), // mixerBg; + QColor(255, 170, 0), // ctrlGraphFg; Medium orange + QColor(98, 124, 168), // mixerBg; 384, // division; 1024, // rtcTicks |