summaryrefslogtreecommitdiff
path: root/muse2/muse/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/muse/widgets')
-rw-r--r--muse2/muse/widgets/appearancebase.ui34
-rw-r--r--muse2/muse/widgets/mtscale.cpp24
-rw-r--r--muse2/muse/widgets/mtscale.h1
-rw-r--r--muse2/muse/widgets/mtscale_flo.cpp18
-rw-r--r--muse2/muse/widgets/mtscale_flo.h1
5 files changed, 62 insertions, 16 deletions
diff --git a/muse2/muse/widgets/appearancebase.ui b/muse2/muse/widgets/appearancebase.ui
index 887f3834..3f270d36 100644
--- a/muse2/muse/widgets/appearancebase.ui
+++ b/muse2/muse/widgets/appearancebase.ui
@@ -23,7 +23,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
- <number>0</number>
+ <number>2</number>
</property>
<widget class="QWidget" name="tab1">
<attribute name="title">
@@ -189,9 +189,6 @@
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
- <attribute name="headerVisible">
- <bool>false</bool>
- </attribute>
<column>
<property name="text">
<string notr="true">1</string>
@@ -1202,6 +1199,35 @@
</layout>
</item>
<item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>MusE color scheme</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="colorSchemeComboBox">
+ <item>
+ <property name="text">
+ <string>current settings</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>light theme (changing overrides all other settings)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>dark theme (changing overrides all other settings)</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
<spacer name="spacer3">
<property name="orientation">
<enum>Qt::Vertical</enum>
diff --git a/muse2/muse/widgets/mtscale.cpp b/muse2/muse/widgets/mtscale.cpp
index 00947f6f..e15d22fa 100644
--- a/muse2/muse/widgets/mtscale.cpp
+++ b/muse2/muse/widgets/mtscale.cpp
@@ -27,6 +27,7 @@
#include "mtscale.h"
#include "song.h"
+#include "app.h"
#include "icons.h"
#include "gconfig.h"
@@ -60,9 +61,19 @@ MTScale::MTScale(int* r, QWidget* parent, int xs, bool _mode)
connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), SLOT(setPos(int, unsigned, bool)));
connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::song, SIGNAL(markerChanged(int)), SLOT(redraw()));
-
+ connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
+
setFixedHeight(28);
- setBg(QColor(0xe0, 0xe0, 0xe0));
+
+ setBg(MusEGlobal::config.rulerBg);
+ //setBg(QColor(0xe0, 0xe0, 0xe0));
+ }
+
+void MTScale::configChanged()
+ {
+ setBg(MusEGlobal::config.rulerBg);
+
+
}
//---------------------------------------------------------
@@ -234,7 +245,7 @@ void MTScale::pdraw(QPainter& p, const QRect& r)
//---------------------------------------------------
int y = 12;
- p.setPen(Qt::black);
+ p.setPen(MusEGlobal::config.rulerFg);
p.setFont(MusEGlobal::config.fonts[5]);
p.drawLine(r.x(), y+1, r.x() + r.width(), y+1);
QRect tr(r);
@@ -270,8 +281,7 @@ void MTScale::pdraw(QPainter& p, const QRect& r)
{
if (m->second.current())
{
- //p.fillRect(tr, white);
- p.fillRect(wr, Qt::white);
+ p.fillRect(tr, Qt::white);
}
int x2;
@@ -303,7 +313,7 @@ void MTScale::pdraw(QPainter& p, const QRect& r)
if(xp >= -1023)
{
QRect r = QRect(xp+10, 0, x2-xp, 12);
- p.setPen(Qt::black);
+ p.setPen(MusEGlobal::config.rulerFg);
p.drawText(r, Qt::AlignLeft|Qt::AlignVCenter, m->second.name());
}
@@ -343,7 +353,7 @@ void MTScale::pdraw(QPainter& p, const QRect& r)
}
}
}
- p.setPen(Qt::black);
+ p.setPen(MusEGlobal::config.rulerFg);
if (pos[3] != INT_MAX) {
int xp = mapx(pos[3]);
if (xp >= x && xp < x+w)
diff --git a/muse2/muse/widgets/mtscale.h b/muse2/muse/widgets/mtscale.h
index 4f76dcc2..db873e7f 100644
--- a/muse2/muse/widgets/mtscale.h
+++ b/muse2/muse/widgets/mtscale.h
@@ -44,6 +44,7 @@ class MTScale : public View {
private slots:
void songChanged(MusECore::SongChangedFlags_t);
+ void configChanged();
protected:
virtual void pdraw(QPainter&, const QRect&);
diff --git a/muse2/muse/widgets/mtscale_flo.cpp b/muse2/muse/widgets/mtscale_flo.cpp
index 9eb0253a..3b6ea502 100644
--- a/muse2/muse/widgets/mtscale_flo.cpp
+++ b/muse2/muse/widgets/mtscale_flo.cpp
@@ -27,6 +27,7 @@
#include "mtscale_flo.h"
#include "song.h"
+#include "app.h"
#include "icons.h"
#include "gconfig.h"
#include "scoreedit.h"
@@ -53,13 +54,20 @@ MTScaleFlo::MTScaleFlo(ScoreCanvas* parent_editor, QWidget* parent_widget)
connect(MusEGlobal::song, SIGNAL(posChanged(int, unsigned, bool)), SLOT(setPos(int, unsigned, bool)));
connect(MusEGlobal::song, SIGNAL(songChanged(MusECore::SongChangedFlags_t)), SLOT(songChanged(MusECore::SongChangedFlags_t)));
connect(MusEGlobal::song, SIGNAL(markerChanged(int)), SLOT(redraw()));
-
+ connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
+
parent=parent_editor;
setFixedHeight(28);
- setBg(QColor(0xe0, 0xe0, 0xe0));
+ setBg(MusEGlobal::config.rulerBg);
}
+void MTScaleFlo::configChanged()
+ {
+ setBg(MusEGlobal::config.rulerBg);
+
+
+ }
//---------------------------------------------------------
// songChanged
//---------------------------------------------------------
@@ -193,7 +201,7 @@ void MTScaleFlo::draw(QPainter& p, const QRect& r)
//---------------------------------------------------
int y = 12;
- p.setPen(Qt::black);
+ p.setPen(MusEGlobal::config.rulerFg);
p.setFont(MusEGlobal::config.fonts[5]);
p.drawLine(r.x(), y+1, r.x() + r.width(), y+1);
QRect tr(r);
@@ -230,7 +238,7 @@ void MTScaleFlo::draw(QPainter& p, const QRect& r)
if(xp >= -1023)
{
QRect r = QRect(xp+10, 0, x2-xp, 12);
- p.setPen(Qt::black);
+ p.setPen(MusEGlobal::config.rulerFg);
p.drawText(r, Qt::AlignLeft|Qt::AlignVCenter, m->second.name());
}
@@ -262,7 +270,7 @@ void MTScaleFlo::draw(QPainter& p, const QRect& r)
//---------------------------------------------------
- p.setPen(Qt::black);
+ p.setPen(MusEGlobal::config.rulerFg);
unsigned ctick;
int bar1, bar2, beat;
diff --git a/muse2/muse/widgets/mtscale_flo.h b/muse2/muse/widgets/mtscale_flo.h
index 4b089f5e..caadc994 100644
--- a/muse2/muse/widgets/mtscale_flo.h
+++ b/muse2/muse/widgets/mtscale_flo.h
@@ -46,6 +46,7 @@ class MTScaleFlo : public View {
private slots:
void songChanged(MusECore::SongChangedFlags_t);
+ void configChanged();
protected:
virtual void draw(QPainter&, const QRect&);