From b5a5f4c5292489130d81dfc90262500d25b7364c Mon Sep 17 00:00:00 2001 From: Werner Schweer Date: Fri, 18 Jan 2008 21:18:58 +0000 Subject: updates --- muse/CMakeLists.txt | 2 +- muse/ChangeLog | 8 +- muse/awl/tcanvas.cpp | 48 +- muse/awl/tcanvas.h | 66 ++- muse/muse/arranger/tlwidget.cpp | 2 +- muse/muse/conf.cpp | 31 +- muse/muse/ctrl/ctrleditor.cpp | 5 +- muse/muse/gconfig.cpp | 14 +- muse/muse/gconfig.h | 5 +- muse/muse/importmidi.cpp | 3 - muse/muse/instruments/minstrument.cpp | 4 +- muse/muse/midiedit/dcanvas.cpp | 4 +- muse/muse/mixer/astrip.cpp | 8 +- muse/muse/mixer/midirack.cpp | 2 +- muse/muse/mixer/mstrip.cpp | 13 +- muse/muse/mixer/rack.cpp | 2 +- muse/muse/mixer/strip.cpp | 6 +- muse/muse/muse.cpp | 67 ++- muse/muse/muse.h | 3 +- muse/muse/muse.qrc | 1 + muse/muse/preferences.cpp | 111 +--- muse/muse/preferences.h | 1 - muse/muse/preferences.ui | 1030 ++++++++++++++++----------------- muse/muse/style.qss | 66 +++ muse/muse/widgets/utils.cpp | 11 +- 25 files changed, 743 insertions(+), 770 deletions(-) create mode 100644 muse/muse/style.qss diff --git a/muse/CMakeLists.txt b/muse/CMakeLists.txt index ec1ab318..5af6816e 100644 --- a/muse/CMakeLists.txt +++ b/muse/CMakeLists.txt @@ -52,7 +52,7 @@ include ( ${PROJECT_SOURCE_DIR}/cmake/UsePkgConfig1.cmake ) include ( ${PROJECT_SOURCE_DIR}/cmake/TargetDoc.cmake) option ( ENABLE_DSSI "enable Disposable Soft Synth Interface" ON) -option ( ENABLE_VST "enable VST/win support" OFF) +option ( ENABLE_VST "enable VST/win support" ON) option ( ENABLE_FLUID "enable fluidsynth softsynth plugins" ON) option ( ENABLE_ZYNADDSUBFX "enable zyaddsubfx softsynth plugin" OFF) diff --git a/muse/ChangeLog b/muse/ChangeLog index 9c92b9a0..abb81c73 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,4 +1,10 @@ -17.1. (ws) +18.1. (ws) + - Remove font & style configuration. Fonts and other things are configured in + QT style sheets. The application style sheet is configurable. Default is + the build-in file "style.qss". +17.1.2008 (ws) + - use QSettings to save/restore main window geometry + - do not change geometry of main window when changing project - fix crash: loading another song, then Settings->Preferences - added svn revision number to "About" box - changed version number to 2.0.1, install to muse-2.0 diff --git a/muse/awl/tcanvas.cpp b/muse/awl/tcanvas.cpp index f5ce2100..6ec4f68f 100644 --- a/muse/awl/tcanvas.cpp +++ b/muse/awl/tcanvas.cpp @@ -423,7 +423,7 @@ bool TimeCanvas::eventFilter(QObject* obj, QEvent* event) void TimeCanvas::keyPressEvent(QKeyEvent *e) { - if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Down || + if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Down || e->key() == Qt::Key_Left || e->key() == Qt::Key_Right) keyboardNavigate(e); } @@ -533,7 +533,7 @@ void TimeCanvas::paintClockRuler(QPainter& p, const QRect& r) int y = rulerHeight - 16; p.setPen(Qt::black); - p.setFont(config.fonts[4]); + p.setFont(_font3); QRect tr(r); tr.setHeight(12); @@ -590,12 +590,12 @@ void TimeCanvas::paintClockRuler(QPainter& p, const QRect& r) int yy; QString s; if (sr == 0) { - p.setFont(config.fonts[3]); + p.setFont(_font2); s.sprintf("%d:00", min); yy = y; } else { - p.setFont(config.fonts[1]); + p.setFont(_font1); s.sprintf("%02d", sr); yy = y + 7; } @@ -613,7 +613,7 @@ void TimeCanvas::paintClockRuler(QPainter& p, const QRect& r) int min2 = (sec2+59)/60; for (int min = min1; min < min2; ++min) { QString s; - p.setFont(config.fonts[3]); + p.setFont(_font2); s.sprintf("%d", min); int xp = pos2pix(AL::Pos(min * AL::sampleRate * 60, AL::FRAMES)); p.setPen(Qt::black); @@ -665,7 +665,7 @@ void TimeCanvas::paintMetronomRuler(QPainter& p, const QRect& r) int w = r.width(); int y = rulerHeight - 16; - p.setFont(config.fonts[4]); + p.setFont(_font3); int h = 14; int y1 = r.y(); @@ -724,7 +724,7 @@ void TimeCanvas::paintMetronomRuler(QPainter& p, const QRect& r) for (int bar = bar1; bar <= bar2;) { AL::Pos stick(bar, 0, 0); if (metronomeRulerMag) { - p.setFont(config.fonts[3]); + p.setFont(_font2); int x = pos2pix(stick); QString s; s.setNum(bar + 1); @@ -752,12 +752,12 @@ void TimeCanvas::paintMetronomRuler(QPainter& p, const QRect& r) if (beat == 0) { num = bar + 1; y3 = y + 2; - p.setFont(config.fonts[3]); + p.setFont(_font2); } else { num = beat + 1; y3 = y + 8; - p.setFont(config.fonts[1]); + p.setFont(_font1); r.moveTop(r.top() + 1); } s.setNum(num); @@ -999,7 +999,7 @@ void TimeCanvas::setLocatorPos(int idx, const AL::Pos& val, bool follow) { if (pos[idx] == val) return; - QFontMetrics fm(config.fonts[3]); + QFontMetrics fm(_font2); int fw = fm.width("123") + 2; int w = qMax(markIcon[idx]->width() + 2, fw); int h = widget()->height(); @@ -1841,3 +1841,31 @@ void TimeCanvas::setPart(const AL::Pos& p1, const AL::Pos& p2) widget()->update(); } +//--------------------------------------------------------- +// setFont1 +//--------------------------------------------------------- + +void TimeCanvas::setFont1(const QFont& f) + { + _font1 = f; + printf("TimeCanvas::setFont1\n"); + } + +//--------------------------------------------------------- +// setFont2 +//--------------------------------------------------------- + +void TimeCanvas::setFont2(const QFont& f) + { + _font2 = f; + } + +//--------------------------------------------------------- +// setFont3 +//--------------------------------------------------------- + +void TimeCanvas::setFont3(const QFont& f) + { + _font3 = f; + } + diff --git a/muse/awl/tcanvas.h b/muse/awl/tcanvas.h index 7e3841f2..09b26b1d 100644 --- a/muse/awl/tcanvas.h +++ b/muse/awl/tcanvas.h @@ -66,6 +66,23 @@ static const int keyHeight = 13; class TimeCanvas : public QFrame { Q_OBJECT + Q_PROPERTY(QFont font1 READ font1 WRITE setFont1) + Q_PROPERTY(QFont font2 READ font2 WRITE setFont2) + Q_PROPERTY(QFont font3 READ font3 WRITE setFont3) + + // I could not find out how to set the size of a font property with + // style sheets. As a workaround here are special "size" properties + // which could be set with style sheet command + // TimeCanvas { qproperty-fontSize1: 6 } + + Q_PROPERTY(int fontSize1 READ fontSize1 WRITE setFontSize1 STORED false) + Q_PROPERTY(int fontSize2 READ fontSize2 WRITE setFontSize2 STORED false) + Q_PROPERTY(int fontSize3 READ fontSize3 WRITE setFontSize3 STORED false) + + QFont _font1; + QFont _font2; + QFont _font3; + int yRange; bool _yFit; AL::Pos pos1; // time scroll range @@ -141,32 +158,32 @@ class TimeCanvas : public QFrame { bool eventFilter(QObject*, QEvent*); virtual void paint(QPainter&, QRect) = 0; - virtual void mousePress(QMouseEvent*) { printf("mousePress method not overloaded\n"); } - virtual void mouseMove(QPoint) { printf("mouseMove method not overloaded\n"); } - virtual void mouseRelease(QMouseEvent*) { printf("mouseRelease method not overloaded\n"); } - virtual void mouseDoubleClick(QMouseEvent*) { printf("mouseDoubleClick method not overloaded\n"); } + virtual void mousePress(QMouseEvent*) {} + virtual void mouseMove(QPoint) {} + virtual void mouseRelease(QMouseEvent*) {} + virtual void mouseDoubleClick(QMouseEvent*) {} virtual void paintDrumList(QPainter&, QRect) {} - virtual void layout() { printf("layout method not overloaded\n"); } - virtual void enterB() { printf("enterB method not overloaded\n"); } - virtual void leaveB() { printf("leaveB method not overloaded\n"); } + virtual void layout() {} + virtual void enterB() {} + virtual void leaveB() {} virtual void setCursor(); - virtual void timeTypeChanged() { printf("timeTypeChanged method not overloaded\n");} - virtual void magChanged() { printf("magChanged method not overloaded\n");} + virtual void timeTypeChanged() {} + virtual void magChanged() {} - virtual void paintControllerCanvas(QPainter&, QRect) { printf("paintControllerCanvas method not overloaded\n"); } - virtual void paintControllerPanel(QPainter&, QRect) { printf("paintControllerPanel method not overloaded\n"); } + virtual void paintControllerCanvas(QPainter&, QRect) {} + virtual void paintControllerPanel(QPainter&, QRect) {} - virtual void dragEnter(QDragEnterEvent*) { printf("dragEnter method not overloaded\n"); } - virtual void drop(QDropEvent*) { printf("drop method not overloaded\n"); } - virtual void dragMove(QDragMoveEvent*) { printf("dragMove method not overloaded\n"); } - virtual void dragLeave(QDragLeaveEvent*) { printf("dragLeave method not overloaded\n"); } + virtual void dragEnter(QDragEnterEvent*) {} + virtual void drop(QDropEvent*) {} + virtual void dragMove(QDragMoveEvent*) {} + virtual void dragLeave(QDragLeaveEvent*) {} - virtual void addController() { printf("addController method not overloaded\n"); } + virtual void addController() {} virtual void keyPressEvent(QKeyEvent *e); - virtual void keyboardNavigate(QKeyEvent *) { printf("keyboardNavigate method not overloaded\n"); } + virtual void keyboardNavigate(QKeyEvent *) {} // map logical coordinates to physical coordinates (pixel) int mapx(int x) const; @@ -253,6 +270,21 @@ class TimeCanvas : public QFrame { void updateCanvasB() { _widget->update(rCanvasB); } void updateRuler() { _widget->update(rRuler); } + QFont font1() const { return _font1; } + QFont font2() const { return _font2; } + QFont font3() const { return _font3; } + + void setFont1(const QFont& f); + void setFont2(const QFont& f); + void setFont3(const QFont& f); + + int fontSize1() const { return _font1.pointSize(); } + int fontSize2() const { return _font2.pointSize(); } + int fontSize3() const { return _font3.pointSize(); } + void setFontSize1(int val) { _font1.setPointSize(val); } + void setFontSize2(int val) { _font2.setPointSize(val); } + void setFontSize3(int val) { _font3.setPointSize(val); } + static FollowMode followMode; friend class CtrlEdit; }; diff --git a/muse/muse/arranger/tlwidget.cpp b/muse/muse/arranger/tlwidget.cpp index 01a2085b..fdf08d0b 100644 --- a/muse/muse/arranger/tlwidget.cpp +++ b/muse/muse/arranger/tlwidget.cpp @@ -259,10 +259,10 @@ void TLWidget::configChanged() outPort = 0; label = new QLabel; + label->setObjectName("trackLabel"); l->addWidget(label); label->setIndent(3); - label->setFont(config.fonts[1]); label->setText(_track->cname()); label->setFixedHeight(11); diff --git a/muse/muse/conf.cpp b/muse/muse/conf.cpp index 7b7561ef..5dfbc8b2 100644 --- a/muse/muse/conf.cpp +++ b/muse/muse/conf.cpp @@ -62,21 +62,7 @@ void readConfiguration(QDomNode node) QString tag(e.tagName()); QString s(e.text()); int i = s.toInt(); - if (tag == "theme") - config.style = s; - else if (tag == "font0") - config.fonts[0].fromString(s); - else if (tag == "font1") - config.fonts[1].fromString(s); - else if (tag == "font2") - config.fonts[2].fromString(s); - else if (tag == "font3") - config.fonts[3].fromString(s); - else if (tag == "font4") - config.fonts[4].fromString(s); - else if (tag == "font5") - config.fonts[5].fromString(s); - else if (tag == "palette0") + if (tag == "palette0") QColorDialog::setCustomColor(0, readColor(node).rgb()); else if (tag == "palette1") QColorDialog::setCustomColor(1, readColor(node).rgb()); @@ -126,8 +112,6 @@ void readConfiguration(QDomNode node) config.trackBg[Track::MIDI_OUT] = readColor(node); else if (tag == "midiInputBg") config.trackBg[Track::MIDI_IN] = readColor(node); -// else if (tag == "midiChannelBg") -// config.trackBg[Track::MIDI_CHANNEL] = readColor(node); else if (tag == "midiSyntiBg") config.trackBg[Track::MIDI_SYNTI] = readColor(node); else if (tag == "extendedMidi") @@ -159,7 +143,7 @@ void readConfiguration(QDomNode node) else if (tag == "canvasUsePixmap") config.canvasUseBgPixmap = i; else if (tag == "geometryMain") - config.geometryMain = AL::readGeometry(node); + ; // obsolete else if (tag == "geometryTransport") config.geometryTransport = AL::readGeometry(node); else if (tag == "geometryBigTime") @@ -176,8 +160,6 @@ void readConfiguration(QDomNode node) config.bigTimeForegroundColor = readColor(node); else if (tag == "bigtimeBackgroundcolor") config.bigTimeBackgroundColor = readColor(node); -// else if (tag == "transportHandleColor") -// config.transportHandleColor = readColor(node); else if (tag == "freewheelMode") config.useJackFreewheelMode = i; else if (tag == "mtctype") @@ -409,13 +391,6 @@ void MusE::writeGlobalConfiguration(Xml& xml) const xml.tag("startProject", config.startProject); xml.tag("freewheelMode", config.useJackFreewheelMode); - xml.tag("theme", config.style); - - for (int i = 0; i < 6; ++i) { - char buffer[32]; - sprintf(buffer, "font%d", i); - xml.tag(buffer, config.fonts[i].toString()); - } for (int i = 0; i < QColorDialog::customCount(); ++i) { char buffer[32]; snprintf(buffer, 32, "palette%d", i); @@ -454,7 +429,6 @@ void MusE::writeGlobalConfiguration(Xml& xml) const xml.tag("acceptMMC", acceptMMC); xml.tag("acceptMC", acceptMC); - xml.tag("geometryMain", config.geometryMain); xml.tag("geometryTransport", config.geometryTransport); xml.tag("geometryBigTime", config.geometryBigTime); xml.tag("geometryPianoroll", config.geometryPianoroll); @@ -526,7 +500,6 @@ void MusE::writeConfiguration(Xml& xml) const xml.tag("bigtimeVisible", bt_id->isChecked()); xml.tag("transportVisible", tr_id->isChecked()); - xml.tag("geometryMain", this); if (transport) xml.tag("geometryTransport", transport); if (bigtime) diff --git a/muse/muse/ctrl/ctrleditor.cpp b/muse/muse/ctrl/ctrleditor.cpp index 0d7c1a72..cc89c4c6 100644 --- a/muse/muse/ctrl/ctrleditor.cpp +++ b/muse/muse/ctrl/ctrleditor.cpp @@ -201,9 +201,10 @@ void CtrlEditor::paint(QPainter& p, const QRect& r) // if (_drawCtrlName) { QString s(ctrl()->name()); - p.setFont(config.fonts[3]); + QFont f(tc()->font()); +// p.setFont(config.fonts[3]); p.setPen(Qt::black); - QFontMetrics fm(config.fonts[3]); + QFontMetrics fm(f); int ly = fm.lineSpacing() + 2; p.drawText(2, ly, s); } diff --git a/muse/muse/gconfig.cpp b/muse/muse/gconfig.cpp index 46850dcc..f80542cb 100644 --- a/muse/muse/gconfig.cpp +++ b/muse/muse/gconfig.cpp @@ -21,8 +21,9 @@ #include "gconfig.h" GlobalConfigValues config = { + ":/style.qss", // default style sheet { - QColor(255, 232, 140), // part colors + QColor(255, 232, 140), // part colors QColor(0xff, 0x00, 0x00), QColor(0x00, 0xff, 0x00), QColor(0x00, 0x00, 0xff), @@ -45,14 +46,6 @@ GlobalConfigValues config = { QColor(255, 0, 0), // bigTimeForegroundColor; QColor(0, 0, 0), // bigTimeBackgroundColor; QColor(200, 200, 200), // waveEditBackgroundColor; - { - QFont(), - QFont(), - QFont(), - QFont(), - QFont(), - QFont() - }, { QColor(Qt::white), // outputTrackBg; QColor(Qt::yellow), // groupTrackBg; @@ -62,7 +55,6 @@ GlobalConfigValues config = { QColor(Qt::gray), // midi; QColor(Qt::gray), // midiOut; QColor(Qt::gray), // midiIn; -// QColor(Qt::gray), // midiChannel; QColor(Qt::gray), // midiSynti; }, @@ -84,7 +76,6 @@ GlobalConfigValues config = { START_ASK_FOR_PROJECT, // startMode QString(""), // start song path 384, // gui division - QRect(0, 0, 800, 560), // GeometryMain; QRect(0, 0, 200, 100), // GeometryTransport; QRect(0, 0, 600, 200), // GeometryBigTime; QRect(100, 100, 600, 400), // GeometryPianoroll; @@ -113,7 +104,6 @@ GlobalConfigValues config = { 5, // canvasShowPartEvent false, // canvasShowGrid; - QString(""), // style false, // use JACK freewheel mode QString("sweep"), // externalWavEditor shell command diff --git a/muse/muse/gconfig.h b/muse/muse/gconfig.h index 8d22d227..b30fdebb 100644 --- a/muse/muse/gconfig.h +++ b/muse/muse/gconfig.h @@ -59,13 +59,13 @@ struct MixerConfig { //--------------------------------------------------------- struct GlobalConfigValues { + QString styleSheetFile; QColor partColors[NUM_PARTCOLORS]; QColor selectPartBg; QColor transportHandleColor; QColor bigTimeForegroundColor; QColor bigTimeBackgroundColor; QColor waveEditBackgroundColor; - QFont fonts[6]; QColor trackBg[Track::TRACK_TYPES]; @@ -90,7 +90,6 @@ struct GlobalConfigValues { QString startProject; // path for start project int guiDivision; // division for tick display - QRect geometryMain; QRect geometryTransport; QRect geometryBigTime; QRect geometryPianoroll; @@ -112,8 +111,6 @@ struct GlobalConfigValues { int canvasShowPartEvent; // bool canvasShowGrid; - QString style; - bool useJackFreewheelMode; QString externalWavEditor; diff --git a/muse/muse/importmidi.cpp b/muse/muse/importmidi.cpp index d7b1ba7d..db8179dd 100644 --- a/muse/muse/importmidi.cpp +++ b/muse/muse/importmidi.cpp @@ -222,9 +222,6 @@ void MusE::importMidi(const QString &file) if (mixer2 && config.mixer2Visible) mixer2->setUpdateMixer(); - resize(config.geometryMain.size()); - move(config.geometryMain.topLeft()); - if (config.transportVisible) transport->show(); transport->move(config.geometryTransport.topLeft()); diff --git a/muse/muse/instruments/minstrument.cpp b/muse/muse/instruments/minstrument.cpp index 05220d37..a189c63d 100644 --- a/muse/muse/instruments/minstrument.cpp +++ b/muse/muse/instruments/minstrument.cpp @@ -150,7 +150,7 @@ static void loadIDF(QFileInfo* fi) midiInstruments.replace(idx, i); replaced = true; if (debugMsg) - printf("Midi Instrument Definition <%s> overwritten\n", + printf("Midi Instrument Definition <%s> overwritten\n", i->iname().toLocal8Bit().data()); break; } @@ -545,7 +545,7 @@ void MidiInstrument::populatePatchPopup(QMenu* menu, int) if (pg.size() > 1) { for (std::vector::iterator i = pg.begin(); i != pg.end(); ++i) { QMenu* pm = menu->addMenu(i->name); - pm->setFont(config.fonts[0]); +// pm->setFont(config.fonts[0]); PatchList& pl = i->patches; for (PatchList::const_iterator ipl = pl.begin(); ipl != pl.end(); ++ipl) { const Patch* mp = *ipl; diff --git a/muse/muse/midiedit/dcanvas.cpp b/muse/muse/midiedit/dcanvas.cpp index ed258b73..20d8170d 100644 --- a/muse/muse/midiedit/dcanvas.cpp +++ b/muse/muse/midiedit/dcanvas.cpp @@ -364,7 +364,7 @@ void DrumCanvas::cmd(QAction* a) unsigned tick = event.tick(); bool selected = devent->isSelected(); bool inLoop = (tick >= song->lpos()) && (tick < song->rpos()); - + int range = editor->applyTo(); if ((range == RANGE_ALL) || (range == RANGE_SELECTED && selected) @@ -604,7 +604,7 @@ void DrumCanvas::paintDrumList(QPainter& p, QRect r) { p.fillRect(r, QColor(0xe0, 0xe0, 0xe0)); paintVLine(p, 0, rPanelB.y(), rPanelA.x() + rPanelA.width()); - p.setFont(config.fonts[1]); +// p.setFont(config.fonts[1]); int yoff = wpos.y() - rPanelA.y(); int i = (r.y() + yoff) / drumHeight; diff --git a/muse/muse/mixer/astrip.cpp b/muse/muse/mixer/astrip.cpp index 449a718f..dae88d49 100644 --- a/muse/muse/mixer/astrip.cpp +++ b/muse/muse/mixer/astrip.cpp @@ -72,7 +72,7 @@ AudioStrip::AudioStrip(Mixer* m, AudioTrack* t, bool align) connect(stereo, SIGNAL(clicked(bool)), SLOT(stereoToggled(bool))); pre = new QToolButton; - pre->setFont(config.fonts[1]); + pre->setObjectName("preButton"); pre->setCheckable(true); pre->setText(tr("Pre")); pre->setToolTip(tr("pre fader - post fader")); @@ -100,7 +100,6 @@ AudioStrip::AudioStrip(Mixer* m, AudioTrack* t, bool align) grid->addWidget(slider, 3, 0, 1, 2); // 100, Qt::AlignRight); sl = new Awl::VolEntry(this); - sl->setFont(config.fonts[1]); sl->setSuffix(tr("dB")); sl->setFrame(true); sl->setValue(vol); @@ -413,15 +412,14 @@ Awl::PanKnob* AudioStrip::addPanKnob(Awl::PanEntry** dlabel, int row) if (dlabel) *dlabel = pl; - pl->setFont(config.fonts[1]); +// pl->setFont(config.fonts[1]); pl->setFrame(true); pl->setFixedSize(entrySize); QLabel* plb = new QLabel; + plb->setObjectName("knobLabel"); plb->setText(tr("Pan")); - - plb->setFont(config.fonts[1]); plb->setFixedSize(entrySize); plb->setAlignment(Qt::AlignCenter); diff --git a/muse/muse/mixer/midirack.cpp b/muse/muse/mixer/midirack.cpp index 778122fc..0b054729 100644 --- a/muse/muse/mixer/midirack.cpp +++ b/muse/muse/mixer/midirack.cpp @@ -40,7 +40,7 @@ MidiRack::MidiRack(QWidget* parent, MidiTrackBase* t) setAttribute(Qt::WA_DeleteOnClose, true); verticalScrollBar()->setStyle(smallStyle); track = t; - setFont(config.fonts[1]); +// setFont(config.fonts[1]); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); diff --git a/muse/muse/mixer/mstrip.cpp b/muse/muse/mixer/mstrip.cpp index 1b927aae..5c1f2e34 100644 --- a/muse/muse/mixer/mstrip.cpp +++ b/muse/muse/mixer/mstrip.cpp @@ -180,13 +180,12 @@ void MidiStrip::addKnob(int ctrl, int idx, const QString& tt, const QString& lab knob->setEnabled(enabled); controller[idx].dl = dl; - dl->setFont(config.fonts[1]); dl->setFixedSize(entrySize); dl->setEnabled(enabled); QLabel* lb = new QLabel(label, this); + lb->setObjectName("knobLabel"); controller[idx].lb = lb; - lb->setFont(config.fonts[1]); lb->setFixedSize(entrySize); lb->setAlignment(Qt::AlignCenter); lb->setEnabled(enabled); @@ -229,7 +228,7 @@ MidiStrip::MidiStrip(Mixer* m, MidiTrack* t, bool align) sl = new Awl::MidiVolEntry(this); sl->setId(CTRL_VOLUME); - sl->setFont(config.fonts[1]); +// sl->setFont(config.fonts[1]); sl->setFixedHeight(entrySize.height()); connect(slider, SIGNAL(valueChanged(double,int)), SLOT(ctrlChanged(double, int))); @@ -579,7 +578,7 @@ MidiOutPortStrip::MidiOutPortStrip(Mixer* m, MidiOutPort* t, bool align) sl = new Awl::MidiVolEntry(this); sl->setId(CTRL_MASTER_VOLUME); sl->setMax(128 * 128 - 1); - sl->setFont(config.fonts[1]); +// sl->setFont(config.fonts[1]); sl->setFixedHeight(entrySize.height()); controllerChanged(CTRL_MASTER_VOLUME); @@ -886,9 +885,7 @@ MidiInPortStrip::MidiInPortStrip(Mixer* m, MidiInPort* t, bool align) for (int ch = MIDI_CHANNELS-1; ch >= 0; --ch) { QLabel* l = new QLabel(QString("%1").arg(ch+1)); - QFont f = l->font(); - f.setPixelSize(8); - l->setFont(f); + l->setObjectName("midiChannelLabel"); ag->addWidget(l, ch, 0, Qt::AlignCenter); channelActivity[ch] = new QLabel; ag->addWidget(channelActivity[ch], ch, 1, Qt::AlignCenter); @@ -1063,7 +1060,7 @@ MidiSyntiStrip::MidiSyntiStrip(Mixer* m, MidiSynti* t, bool align) sl = new Awl::MidiVolEntry(this); sl->setId(CTRL_MASTER_VOLUME); - sl->setFont(config.fonts[1]); +// sl->setFont(config.fonts[1]); sl->setFixedHeight(entrySize.height()); connect(slider, SIGNAL(valueChanged(double,int)), SLOT(ctrlChanged(double, int))); diff --git a/muse/muse/mixer/rack.cpp b/muse/muse/mixer/rack.cpp index 2074df6c..dbd76804 100644 --- a/muse/muse/mixer/rack.cpp +++ b/muse/muse/mixer/rack.cpp @@ -46,7 +46,7 @@ EffectRack::EffectRack(QWidget* parent, AudioTrack* t, bool flag) verticalScrollBar()->setStyle(smallStyle); track = t; - setFont(config.fonts[1]); +// setFont(config.fonts[1]); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); diff --git a/muse/muse/mixer/strip.cpp b/muse/muse/mixer/strip.cpp index c02dabe8..38519878 100644 --- a/muse/muse/mixer/strip.cpp +++ b/muse/muse/mixer/strip.cpp @@ -40,11 +40,6 @@ void Strip::resetPeaks() void Strip::updateLabel() { - QPalette p = label->palette(); - p.setColor(label->backgroundRole(), track->ccolor()); - label->setPalette(p); - label->setAutoFillBackground(true); - label->setFont(config.fonts[4]); label->setText(track->name()); label->setToolTip(track->name()); } @@ -76,6 +71,7 @@ Strip::Strip(Mixer* m, Track* t, bool align) //--------------------------------------------- label = new QLabel; + label->setObjectName(track->cname()); label->setFixedHeight(LABEL_HEIGHT); label->setTextFormat(Qt::PlainText); label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp index 2b061c31..9ad28877 100644 --- a/muse/muse/muse.cpp +++ b/muse/muse/muse.cpp @@ -1202,8 +1202,8 @@ void MusE::loadProject1(const QString& path) mixer1->setUpdateMixer(); if (mixer2 && config.mixer2Visible) mixer2->setUpdateMixer(); - resize(config.geometryMain.size()); - move(config.geometryMain.topLeft()); +// resize(config.geometryMain.size()); +// move(config.geometryMain.topLeft()); if (config.transportVisible) transport->show(); transport->move(config.geometryTransport.topLeft()); @@ -1447,6 +1447,7 @@ void MusE::closeEvent(QCloseEvent* event) d.remove(filename); d.remove(f.baseName() + ".wca"); } + writeSettings(); qApp->quit(); } @@ -2177,16 +2178,6 @@ void MusE::preferences() preferencesDialog->show(); } -//--------------------------------------------------------- -// loadTheme -//--------------------------------------------------------- - -void MusE::loadTheme(const QString& s) - { - if (style()->objectName() != s) - QApplication::setStyle(s); - } - //--------------------------------------------------------- // configChanged // - called whenever configuration has changed @@ -2198,8 +2189,6 @@ void MusE::changeConfig(bool writeFlag) { if (writeFlag) writeGlobalConfiguration(); - loadTheme(config.style); - QApplication::setFont(config.fonts[0]); updateConfiguration(); emit configChanged(); } @@ -2860,19 +2849,13 @@ int main(int argc, char* argv[]) initMidiController(); initMidiInstruments(); MuseApplication app(argc, argv); - - config.fonts[0] = QFont(QString("helvetica"), 10, QFont::Normal); - config.fonts[1] = QFont(QString("helvetica"), 6, QFont::Normal); - config.fonts[2] = QFont(QString("helvetica"), 10, QFont::Normal); - config.fonts[3] = QFont(QString("helvetica"), 8, QFont::Bold); - config.fonts[4] = QFont(QString("helvetica"), 8, QFont::Bold); // simple buttons, timescale numbers - config.fonts[5] = QFont(QString("Courier"), 14, QFont::Bold); + QCoreApplication::setOrganizationName("MusE"); + QCoreApplication::setOrganizationDomain("muse.org"); + QCoreApplication::setApplicationName("MusE"); gmDrumMap.initGm(); // init default drum map readConfiguration(); - QApplication::setFont(config.fonts[0]); - // this style is used for scrollbars in mixer plugin racks: smallStyle = new QWindowsStyle(); @@ -2890,6 +2873,16 @@ int main(int argc, char* argv[]) } } + QFile cf(config.styleSheetFile); + if (cf.open(QIODevice::ReadOnly)) { + QByteArray ss = cf.readAll(); + QString sheet(QString::fromUtf8(ss.data())); + app.setStyleSheet(sheet); + cf.close(); + } + else + printf("loading style sheet <%s> failed\n", qPrintable(config.styleSheetFile)); + bool useJACK = !(debugMode || midiOnly); if (useJACK) { if (initJackAudio()) { @@ -2970,6 +2963,7 @@ int main(int argc, char* argv[]) song = new Song(); muse = new MusE(); + muse->readSettings(); app.setMuse(muse); //--------------------------------------------------- @@ -3138,3 +3132,30 @@ void MusE::beat() arranger->getStrip()->heartBeat(); } +//--------------------------------------------------------- +// writeSettings +//--------------------------------------------------------- + +void MusE::writeSettings() + { + QSettings settings; + settings.beginGroup("MainWindow"); + settings.setValue("size", size()); + settings.setValue("pos", pos()); + settings.endGroup(); + } + +//--------------------------------------------------------- +// readSettings +//--------------------------------------------------------- + +void MusE::readSettings() + { + QSettings settings; + settings.beginGroup("MainWindow"); + resize(settings.value("size", QSize(950, 500)).toSize()); + move(settings.value("pos", QPoint(10, 10)).toPoint()); + settings.endGroup(); + } + + diff --git a/muse/muse/muse.h b/muse/muse/muse.h index 9bb05db6..8a9d4f68 100644 --- a/muse/muse/muse.h +++ b/muse/muse/muse.h @@ -156,6 +156,7 @@ class MusE : public QMainWindow // , public Ui::MuseBase virtual void focusInEvent(QFocusEvent*); void addMidiFile(const QString name); void copyParts(bool); + void writeSettings(); signals: void configChanged(); @@ -242,7 +243,6 @@ class MusE : public QMainWindow // , public Ui::MuseBase void bounceToFile(); void closeEvent(QCloseEvent*e); void loadProject(const QString&); - void loadTheme(const QString&); bool seqStart(); void showTransport(bool flag); void showBigtime(bool); @@ -294,6 +294,7 @@ class MusE : public QMainWindow // , public Ui::MuseBase QAction* playAction; void showListEditor(const Pos&, Track*, Part*, Ctrl*); + void readSettings(); }; //--------------------------------------------------------- diff --git a/muse/muse/muse.qrc b/muse/muse/muse.qrc index e71a2afd..b15b64da 100644 --- a/muse/muse/muse.qrc +++ b/muse/muse/muse.qrc @@ -1,6 +1,7 @@ + style.qss xpm/muse_icon_64x64.png xpm/splash.png xpm/filenew.png diff --git a/muse/muse/preferences.cpp b/muse/muse/preferences.cpp index 50c37e3d..84c2fe98 100644 --- a/muse/muse/preferences.cpp +++ b/muse/muse/preferences.cpp @@ -91,6 +91,8 @@ PreferencesDialog::PreferencesDialog(Arranger* a, QWidget* parent) connect(usePixmap, SIGNAL(toggled(bool)), SLOT(usePixmapToggled(bool))); connect(useColor, SIGNAL(toggled(bool)), SLOT(useColorToggled(bool))); + + styleSheetPath->setText(config->styleSheetFile); currentBg = config->canvasBgPixmap; if (currentBg.isEmpty()) currentBg = ""; @@ -201,26 +203,6 @@ PreferencesDialog::PreferencesDialog(Arranger* a, QWidget* parent) connect(addToPalette, SIGNAL(clicked()), SLOT(addToPaletteClicked())); - //--------------------------------------------------- - // STYLE - //--------------------------------------------------- - - themeComboBox->clear(); - - QString cs = muse->style()->objectName(); - cs = cs.toLower(); - - themeComboBox->addItems(QStyleFactory::keys()); - for (int i = 0; i < themeComboBox->count(); ++i) { - if (themeComboBox->itemText(i).toLower() == cs) { - themeComboBox->setCurrentIndex(i); - } - } - - //--------------------------------------------------- - // Fonts - //--------------------------------------------------- - connect(applyButton, SIGNAL(clicked()), SLOT(apply())); connect(okButton, SIGNAL(clicked()), SLOT(ok())); connect(cancelButton, SIGNAL(clicked()), SLOT(cancel())); @@ -298,11 +280,6 @@ PreferencesDialog::PreferencesDialog(Arranger* a, QWidget* parent) showMixer1->setChecked(config->mixer1Visible); showMixer2->setChecked(config->mixer2Visible); - arrangerX->setValue(config->geometryMain.x()); - arrangerY->setValue(config->geometryMain.y()); - arrangerW->setValue(config->geometryMain.width()); - arrangerH->setValue(config->geometryMain.height()); - transportX->setValue(config->geometryTransport.x()); transportY->setValue(config->geometryTransport.y()); @@ -391,7 +368,6 @@ static void setButtonColor(QAbstractButton* b, const QRgb c) void PreferencesDialog::resetValues() { *config = ::config; // init with global config values - updateFonts(); setButtonColor(palette0, QColorDialog::customColor(0)); setButtonColor(palette1, QColorDialog::customColor(1)); @@ -419,49 +395,13 @@ PreferencesDialog::~PreferencesDialog() delete config; } -//--------------------------------------------------------- -// updateFonts -//--------------------------------------------------------- - -void PreferencesDialog::updateFonts() - { - fontSize0->setValue(config->fonts[0].pointSize()); - fontName0->setCurrentFont(config->fonts[0]); - italic0->setChecked(config->fonts[0].italic()); - bold0->setChecked(config->fonts[0].bold()); - - fontSize1->setValue(config->fonts[1].pointSize()); - fontName1->setCurrentFont(config->fonts[1]); - italic1->setChecked(config->fonts[1].italic()); - bold1->setChecked(config->fonts[1].bold()); - - fontSize2->setValue(config->fonts[2].pointSize()); - fontName2->setCurrentFont(config->fonts[2]); - italic2->setChecked(config->fonts[2].italic()); - bold2->setChecked(config->fonts[2].bold()); - - fontSize3->setValue(config->fonts[3].pointSize()); - fontName3->setCurrentFont(config->fonts[3]); - italic3->setChecked(config->fonts[3].italic()); - bold3->setChecked(config->fonts[3].bold()); - - fontSize4->setValue(config->fonts[4].pointSize()); - fontName4->setCurrentFont(config->fonts[4]); - italic4->setChecked(config->fonts[4].italic()); - bold4->setChecked(config->fonts[4].bold()); - - fontSize5->setValue(config->fonts[5].pointSize()); - fontName5->setCurrentFont(config->fonts[5]); - italic5->setChecked(config->fonts[5].italic()); - bold5->setChecked(config->fonts[5].bold()); - } - //--------------------------------------------------------- // apply //--------------------------------------------------------- void PreferencesDialog::apply() { + ::config.styleSheetFile = styleSheetPath->text(); int showPartEvent = 0; int showPartType = 0; @@ -491,42 +431,6 @@ void PreferencesDialog::apply() if (currentBg != "") config->canvasBgPixmap = currentBg; - config->fonts[0] = fontName0->currentFont(); - config->fonts[0].setPointSize(fontSize0->value()); - config->fonts[0].setItalic(italic0->isChecked()); - config->fonts[0].setBold(bold0->isChecked()); - - QApplication::setFont(config->fonts[0]); - - config->fonts[1] = fontName1->currentFont(); - config->fonts[1].setPointSize(fontSize1->value()); - config->fonts[1].setItalic(italic1->isChecked()); - config->fonts[1].setBold(bold1->isChecked()); - - config->fonts[2] = fontName2->currentFont(); - config->fonts[2].setPointSize(fontSize2->value()); - config->fonts[2].setItalic(italic2->isChecked()); - config->fonts[2].setBold(bold2->isChecked()); - - config->fonts[3] = fontName3->currentFont(); - config->fonts[3].setPointSize(fontSize3->value()); - config->fonts[3].setItalic(italic3->isChecked()); - config->fonts[3].setBold(bold3->isChecked()); - - config->fonts[4] = fontName4->currentFont(); - config->fonts[4].setPointSize(fontSize4->value()); - config->fonts[4].setItalic(italic4->isChecked()); - config->fonts[4].setBold(bold4->isChecked()); - - config->fonts[5] = fontName5->currentFont(); - config->fonts[5].setPointSize(fontSize5->value()); - config->fonts[5].setItalic(italic5->isChecked()); - config->fonts[5].setBold(bold5->isChecked()); - - config->style = themeComboBox->currentText(); - // setting up a new theme might change the fontsize, so re-read - fontSize0->setValue(QApplication::font().pointSize()); - config->canvasShowGrid = arrGrid->isChecked(); // set colors... ::config = *config; @@ -565,11 +469,6 @@ void PreferencesDialog::apply() ::config.mixer1Visible = showMixer1->isChecked(); ::config.mixer2Visible = showMixer2->isChecked(); - ::config.geometryMain.setX(arrangerX->value()); - ::config.geometryMain.setY(arrangerY->value()); - ::config.geometryMain.setWidth(arrangerW->value()); - ::config.geometryMain.setHeight(arrangerH->value()); - ::config.geometryTransport.setX(transportX->value()); ::config.geometryTransport.setY(transportY->value()); ::config.geometryTransport.setWidth(0); @@ -635,10 +534,6 @@ void PreferencesDialog::apply() w->move(::config.geometryBigTime.topLeft()); } - - muse->resize(::config.geometryMain.size()); - muse->move(::config.geometryMain.topLeft()); - muse->setHeartBeat(); // set guiRefresh audio->msgSetRtc(); // set midi tick rate muse->changeConfig(true); // save settings diff --git a/muse/muse/preferences.h b/muse/muse/preferences.h index 69cc49a2..75cb5754 100644 --- a/muse/muse/preferences.h +++ b/muse/muse/preferences.h @@ -42,7 +42,6 @@ class PreferencesDialog : public QDialog, public Ui::PreferencesDialogBase { QButtonGroup* colorGroup; QButtonGroup* startProjectGroup; - void updateFonts(); void updateColor(); private slots: diff --git a/muse/muse/preferences.ui b/muse/muse/preferences.ui index ca65292b..5417c33c 100644 --- a/muse/muse/preferences.ui +++ b/muse/muse/preferences.ui @@ -13,48 +13,116 @@ Dialog - - 9 - 6 + + 9 + + + 9 + + + 9 + + + 9 + - 2 + 0 Application - - 9 - 6 + + 9 + + + 9 + + + 9 + + + 9 + + + + + Style + + + + + + Style Sheet: + + + + + + + + + + ... + + + :/xpm/fileopen.png + + + + + + Start MusE + + true + - - 9 - 3 + + 9 + + + 9 + + + 9 + + + 9 + - - 0 - 3 + + 0 + + + 0 + + + 0 + + + 0 + @@ -96,12 +164,21 @@ - - 0 - 6 + + 0 + + + 0 + + + 0 + + + 0 + @@ -132,19 +209,32 @@ Local Paths + + true + - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 - - 0 - 0 + 0 0 @@ -160,9 +250,7 @@ - - 0 - 0 + 0 0 @@ -178,9 +266,7 @@ - - 0 - 0 + 0 0 @@ -206,9 +292,7 @@ - - 0 - 0 + 0 0 @@ -229,11 +313,26 @@ Views + + true + - + 9 - + + 9 + + + 9 + + + 9 + + + 3 + + 3 @@ -473,28 +572,46 @@ Editors - - 9 - 6 + + 9 + + + 9 + + + 9 + + + 9 + - 0 + 4 Arranger - - 9 - 6 + + 9 + + + 9 + + + 9 + + + 9 + @@ -504,12 +621,21 @@ true - - 11 - 6 + + 11 + + + 11 + + + 11 + + + 11 + @@ -543,10 +669,22 @@ true - + 11 - + + 11 + + + 11 + + + 11 + + + 6 + + 6 @@ -613,18 +751,28 @@ false - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 - - 7 - 1 + 0 0 @@ -708,10 +856,22 @@ Pianoroll - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 @@ -770,22 +930,22 @@ - - 9999 - 50 + + 9999 + - - 9999 - 50 + + 9999 + @@ -801,10 +961,22 @@ DrumEditor - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 @@ -829,12 +1001,12 @@ - - 9999 - 50 + + 9999 + @@ -849,12 +1021,12 @@ - - 9999 - 50 + + 9999 + @@ -874,10 +1046,22 @@ MasterEditor - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 @@ -895,12 +1079,12 @@ - - 9999 - 50 + + 9999 + @@ -915,12 +1099,12 @@ - - 9999 - 50 + + 9999 + @@ -947,20 +1131,32 @@ WaveEditor - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 - - 9999 - 50 + + 9999 + @@ -992,12 +1188,12 @@ - - 9999 - 50 + + 9999 + @@ -1024,22 +1220,43 @@ Audio - - 9 - 6 + + 9 + + + 9 + + + 9 + + + 9 + Mixer - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 @@ -1052,9 +1269,7 @@ - - 5 - 0 + 0 0 @@ -1062,12 +1277,12 @@ dB - - 0 - -100 + + 0 + -60 @@ -1086,9 +1301,7 @@ - - 5 - 0 + 0 0 @@ -1113,12 +1326,12 @@ ms - - 5000 - 20 + + 5000 + @@ -1131,9 +1344,7 @@ - - 5 - 0 + 0 0 @@ -1141,12 +1352,12 @@ dB - - 0 - -100 + + 0 + 10 @@ -1168,9 +1379,7 @@ - - 5 - 0 + 0 0 @@ -1216,22 +1425,46 @@ Midi - - 8 - 6 + + 8 + + + 8 + + + 8 + + + 8 + Ticks + + true + - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 @@ -1334,11 +1567,26 @@ Input Routing + + true + - + 8 - + + 8 + + + 8 + + + 8 + + + 6 + + 6 @@ -1380,11 +1628,26 @@ Output Routing + + true + - + 8 - + + 8 + + + 8 + + + 8 + + + 8 + + 8 @@ -1430,10 +1693,22 @@ GUI - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 @@ -1464,12 +1739,12 @@ /sec - - 100 - 2 + + 100 + 20 @@ -1489,12 +1764,21 @@ RemoteControl - - 9 - 6 + + 9 + + + 9 + + + 9 + + + 9 + @@ -1503,14 +1787,29 @@ Midi Remote Control + + true + true - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 @@ -1601,10 +1900,22 @@ Colors - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 @@ -1616,10 +1927,22 @@ Palette - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + 6 @@ -1800,12 +2123,21 @@ - - 0 - 6 + + 0 + + + 0 + + + 0 + + + 0 + @@ -1831,9 +2163,7 @@ - - 1 - 7 + 0 0 @@ -1858,9 +2188,7 @@ - - 7 - 7 + 0 0 @@ -1875,12 +2203,21 @@ - - 0 - 6 + + 0 + + + 0 + + + 0 + + + 0 + @@ -1905,12 +2242,21 @@ - - 0 - 6 + + 0 + + + 0 + + + 0 + + + 0 + @@ -1935,391 +2281,25 @@ - - - Fonts/Style - - - - 9 - - - 6 - - - - - - 7 - 5 - 0 - 0 - - - - QT Theme - - - - 11 - - - 6 - - - - - 0 - - - 6 - - - - - - 1 - 0 - 0 - 0 - - - - - Windows - - - - - MusE - - - - - Metal - - - - - Norwegian Wood - - - - - Platinum - - - - - CDE - - - - - Motif - - - - - Motif Plus - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 190 - 20 - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - - - - Fonts - - - - 11 - - - 2 - - - - - Family - - - - - - - Size - - - - - - - Font 1 - - - - - - - Font 2 - - - - - - - Font 3 - - - - - - - Font 0 - - - - - - - - 4 - 0 - 0 - 0 - - - - - - - - - 4 - 0 - 0 - 0 - - - - - - - - - 4 - 0 - 0 - 0 - - - - - - - - - 4 - 0 - 0 - 0 - - - - - - - - Bold - - - - - - - Bold - - - - - - - Bold - - - - - - - Bold - - - - - - - Italic - - - - - - - Italic - - - - - - - Italic - - - - - - - Italic - - - - - - - Font 4 - - - - - - - Font 5 - - - - - - - - 4 - 0 - 0 - 0 - - - - - - - - - 4 - 0 - 0 - 0 - - - - - - - - Bold - - - - - - - Bold - - - - - - - Italic - - - - - - - Italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - 6 + + 0 + + + 0 + + + 0 + + + 0 + @@ -2380,7 +2360,9 @@
greendotbutton.h
- + + + okButton diff --git a/muse/muse/style.qss b/muse/muse/style.qss new file mode 100644 index 00000000..b62122c5 --- /dev/null +++ b/muse/muse/style.qss @@ -0,0 +1,66 @@ +/* + * this is the MusE application style sheet + */ + +QLabel#midiChannelLabel { font-size: 6pt } +MidiRack, EffectRack { font-size: 8pt } +QLabel#trackLabel { font-size: 6pt } +SimpleButton { font-size: 8pt } +QToolButton#routeButton { font-size: 8pt } +QToolButton#preButton { font-size: 8pt } + +TimeCanvas { + qproperty-fontSize1: 6; + qproperty-fontSize2: 8; + qproperty-fontSize3: 8 + } + +QLabel#knobLabel { font-size: 8pt } +Awl--MidiVolEntry { font-size: 5pt } +Awl--MidiPanEntry { font-size: 5pt } +Awl--VolEntry { font-size: 5pt } +Awl--PanEntry { font-size: 5pt } + +QLabel#AudioOut { + font-size: 7pt; + background-color: white; + } + +QLabel#Group { + font-size: 7pt; + background-color: yellow; + } + +QLabel#Wave { + font-size: 7pt; + background-color: rgb(0,255,0); + } + +QLabel#AudioIn { + font-size: 7pt; + background-color: red; + } + +QLabel#Synth { + font-size: 7pt; + background-color: blue; + } + +QLabel#Midi { + font-size: 7pt; + background-color: gray; + } + +QLabel#MidiOut { + font-size: 7pt; + background-color: gray; + } + +QLabel#MidiIn { + font-size: 7pt; + background-color: gray; + } +QLabel#M-Synth { + font-size: 7pt; + background-color: gray; + } diff --git a/muse/muse/widgets/utils.cpp b/muse/muse/widgets/utils.cpp index f95d121e..b7fd9cee 100644 --- a/muse/muse/widgets/utils.cpp +++ b/muse/muse/widgets/utils.cpp @@ -222,7 +222,6 @@ SimpleButton* newMuteButton() { // SimpleButton* mute = new SimpleButton(parent, muteIconOff, muteIconOn); SimpleButton* mute = new SimpleButton(QT_TR_NOOP("m")); - mute->setFont(config.fonts[BFONT]); mute->setCheckable(true); mute->setToolTip(QT_TR_NOOP("mute")); mute->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); @@ -237,7 +236,6 @@ SimpleButton* newSoloButton() { // SimpleButton* solo = new SimpleButton(parent, soloIconOn, soloIconOff); SimpleButton* solo = new SimpleButton(QT_TR_NOOP("s")); - solo->setFont(config.fonts[BFONT]); solo->setCheckable(true); solo->setToolTip(QT_TR_NOOP("solo")); solo->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); @@ -251,7 +249,6 @@ SimpleButton* newSoloButton() SimpleButton* newMonitorButton() { SimpleButton* monitor = new SimpleButton(QT_TR_NOOP("Mo")); - monitor->setFont(config.fonts[BFONT]); monitor->setCheckable(true); monitor->setToolTip(QT_TR_NOOP("monitor")); monitor->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); @@ -265,7 +262,6 @@ SimpleButton* newMonitorButton() SimpleButton* newDrumMapButton() { SimpleButton* dm = new SimpleButton(QT_TR_NOOP("Dr")); - dm->setFont(config.fonts[BFONT]); dm->setCheckable(true); dm->setToolTip(QT_TR_NOOP("use drum map")); return dm; @@ -301,7 +297,6 @@ SimpleButton* newRecordButton() SimpleButton* newAutoReadButton() { SimpleButton* ar = new SimpleButton(QT_TR_NOOP("aR")); - ar->setFont(config.fonts[BFONT]); ar->setCheckable(true); ar->setToolTip(QT_TR_NOOP("automation read")); return ar; @@ -314,7 +309,6 @@ SimpleButton* newAutoReadButton() SimpleButton* newAutoWriteButton() { SimpleButton* aw = new SimpleButton(QT_TR_NOOP("aW")); - aw->setFont(config.fonts[BFONT]); aw->setCheckable(true); aw->setToolTip(QT_TR_NOOP("automation write")); return aw; @@ -327,7 +321,6 @@ SimpleButton* newAutoWriteButton() SimpleButton* newSyncButton() { SimpleButton* sync = new SimpleButton(QT_TR_NOOP("sync")); - sync->setFont(config.fonts[BFONT]); sync->setCheckable(true); sync->setToolTip(QT_TR_NOOP("send sync events")); return sync; @@ -371,7 +364,7 @@ SimpleButton* newStereoButton() QToolButton* newOutRouteButton() { QToolButton* oR = new QToolButton; - oR->setFont(config.fonts[BFONT]); + oR->setObjectName("routeButton"); oR->setFixedHeight(BUTTON_HEIGHT); oR->setText(QT_TR_NOOP("oR")); oR->setCheckable(false); @@ -390,7 +383,7 @@ QToolButton* newOutRouteButton() QToolButton* newInRouteButton() { QToolButton* iR = new QToolButton; - iR->setFont(config.fonts[BFONT]); + iR->setObjectName("routeButton"); iR->setFixedHeight(BUTTON_HEIGHT); iR->setText(QT_TR_NOOP("iR")); iR->setCheckable(false); -- cgit v1.2.3