summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog2
-rw-r--r--muse2/muse/appearance.cpp63
-rw-r--r--muse2/muse/widgets/appearancebase.ui10
-rw-r--r--muse2/share/CMakeLists.txt3
-rw-r--r--muse2/share/themes/Ardour.cfg62
-rw-r--r--muse2/share/themes/Ardour.qss53
-rw-r--r--muse2/share/themes/CMakeLists.txt30
-rw-r--r--muse2/share/themes/Dark Theme.cfg (renamed from muse2/share/darkbase.cfg)0
-rw-r--r--muse2/share/themes/Dark Theme.qss (renamed from muse2/share/darkbase.qss)0
-rw-r--r--muse2/share/themes/Light Theme.cfg (renamed from muse2/share/lightbase.cfg)0
10 files changed, 188 insertions, 35 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index d6b03f1a..528a6350 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,5 @@
+03.02.2013:
+ - Generalized theming somewhat more and added a basic Ardour complementary theme (rj)
28.02.2013:
- Wave Editor: Fixed some painting problems. Optimizations, speed boosts. (Tim)
24.02.2013:
diff --git a/muse2/muse/appearance.cpp b/muse2/muse/appearance.cpp
index 2b696c7b..057e12de 100644
--- a/muse2/muse/appearance.cpp
+++ b/muse2/muse/appearance.cpp
@@ -241,12 +241,11 @@ Appearance::Appearance(Arranger* a, QWidget* parent)
connect(hval, SIGNAL(valueChanged(int)), SLOT(hsliderChanged(int)));
connect(sval, SIGNAL(valueChanged(int)), SLOT(ssliderChanged(int)));
connect(vval, SIGNAL(valueChanged(int)), SLOT(vsliderChanged(int)));
- connect(changeThemeButton, SIGNAL(clicked()), SLOT(changeTheme()));
connect(addToPalette, SIGNAL(clicked()), SLOT(addToPaletteClicked()));
//---------------------------------------------------
- // STYLE
+ // STYLE
//---------------------------------------------------
openStyleSheet->setIcon(*openIcon);
connect(openStyleSheet, SIGNAL(clicked()), SLOT(browseStyleSheet()));
@@ -254,7 +253,21 @@ Appearance::Appearance(Arranger* a, QWidget* parent)
connect(defaultStyleSheet, SIGNAL(clicked()), SLOT(setDefaultStyleSheet()));
//---------------------------------------------------
- // Fonts
+ // THEMES
+ //---------------------------------------------------
+ connect(changeThemeButton, SIGNAL(clicked()), SLOT(changeTheme()));
+
+ QDir themeDir(MusEGlobal::museGlobalShare + QString("/themes"));
+ QStringList list;
+
+ QStringList fileTypes;
+ fileTypes.append("*.cfg");
+ list = themeDir.entryList(fileTypes);
+
+ colorSchemeComboBox->addItems(list);
+
+ //---------------------------------------------------
+ // Fonts
//---------------------------------------------------
fontBrowse0->setIcon(QIcon(*openIcon));
@@ -279,6 +292,7 @@ Appearance::Appearance(Arranger* a, QWidget* parent)
connect(removeBgButton, SIGNAL(clicked()), SLOT(removeBackground()));
connect(clearBgButton, SIGNAL(clicked()), SLOT(clearBackground()));
connect(partShowevents, SIGNAL(toggled(bool)), eventButtonGroup, SLOT(setEnabled(bool)));
+
//updateColor();
}
@@ -469,12 +483,13 @@ void Appearance::updateFonts()
//---------------------------------------------------------
// changeTheme
//
-// Simple theme selector that over time should
-// be exchanged for a more dynamic solution
//---------------------------------------------------------
void Appearance::changeTheme()
{
+ if (colorSchemeComboBox->currentIndex() == 0) {
+ return;
+ }
if(QMessageBox::question(MusEGlobal::muse, QString("Muse"),
tr("Do you really want to reset colors to theme default?"), tr("&Ok"), tr("&Cancel"),
QString::null, 0, 1 ) == 1)
@@ -482,29 +497,29 @@ void Appearance::changeTheme()
return;
}
- if (colorSchemeComboBox->currentIndex()==1) // light theme
+
+ QString currentTheme = colorSchemeComboBox->currentText();
+ printf("Changing to theme %s\n", currentTheme.toLatin1().constData() );
+
+ QString themeDir = MusEGlobal::museGlobalShare + "/themes/";
+ backgroundTree->reset();
+ if (QFile::exists(themeDir + QFileInfo(currentTheme).baseName()+ ".qss"))
{
- // load standard light theme
- backgroundTree->reset();
- styleSheetPath->setText("");
- MusEGlobal::muse->loadStyleSheetFile("");
- MusEGlobal::config.styleSheetFile = "";
- QString configPath = MusEGlobal::museGlobalShare +"/lightbase.cfg";
- MusECore::readConfiguration(configPath.toLatin1().constData());
- colorSchemeComboBox->setCurrentIndex(0);
- MusEGlobal::muse->changeConfig(true);
+ styleSheetPath->setText(themeDir + QFileInfo(currentTheme).baseName()+ ".qss");
+ MusEGlobal::config.styleSheetFile = styleSheetPath->text();
}
- else if (colorSchemeComboBox->currentIndex()==2) // dark theme
+ else
{
- // load standard dark theme
- backgroundTree->reset();
- styleSheetPath->setText(MusEGlobal::museGlobalShare +"/darkbase.qss");
- MusEGlobal::config.styleSheetFile = styleSheetPath->text();
- QString configPath = MusEGlobal::museGlobalShare +"/darkbase.cfg";
- MusECore::readConfiguration(configPath.toLatin1().constData());
- colorSchemeComboBox->setCurrentIndex(0);
- MusEGlobal::muse->changeConfig(true);
+ styleSheetPath->setText("arg");
+ MusEGlobal::muse->loadStyleSheetFile("");
+ MusEGlobal::config.styleSheetFile = "";
}
+
+ QString configPath = themeDir + currentTheme;
+ MusECore::readConfiguration(configPath.toLatin1().constData());
+ colorSchemeComboBox->setCurrentIndex(0);
+ MusEGlobal::muse->changeConfig(true);
+
close();
}
//---------------------------------------------------------
diff --git a/muse2/muse/widgets/appearancebase.ui b/muse2/muse/widgets/appearancebase.ui
index 0468cef7..cbb33fb4 100644
--- a/muse2/muse/widgets/appearancebase.ui
+++ b/muse2/muse/widgets/appearancebase.ui
@@ -1205,16 +1205,6 @@
<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>
diff --git a/muse2/share/CMakeLists.txt b/muse2/share/CMakeLists.txt
index 26e011f6..ba75f398 100644
--- a/muse2/share/CMakeLists.txt
+++ b/muse2/share/CMakeLists.txt
@@ -33,6 +33,7 @@ subdirs(
wallpapers
scoreglyphs
locale
+ themes
)
-install (FILES didyouknow.txt splash.png darkbase.qss darkbase.cfg lightbase.cfg DESTINATION ${MusE_SHARE_DIR} )
+install (FILES didyouknow.txt splash.png DESTINATION ${MusE_SHARE_DIR} )
diff --git a/muse2/share/themes/Ardour.cfg b/muse2/share/themes/Ardour.cfg
new file mode 100644
index 00000000..a41bbb65
--- /dev/null
+++ b/muse2/share/themes/Ardour.cfg
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<muse version="2.0">
+ <configuration>
+ <theme>Oxygen</theme>
+ <globalAlphaBlend>170</globalAlphaBlend>
+ <partColor0 r="255" g="232" b="140"></partColor0>
+ <partColor1 r="255" g="0" b="0"></partColor1>
+ <partColor2 r="0" g="255" b="0"></partColor2>
+ <partColor3 r="0" g="0" b="255"></partColor3>
+ <partColor4 r="255" g="255" b="0"></partColor4>
+ <partColor5 r="0" g="255" b="255"></partColor5>
+ <partColor6 r="255" g="0" b="255"></partColor6>
+ <partColor7 r="159" g="199" b="239"></partColor7>
+ <partColor8 r="0" g="255" b="127"></partColor8>
+ <partColor9 r="127" g="0" b="0"></partColor9>
+ <partColor10 r="0" g="127" b="0"></partColor10>
+ <partColor11 r="0" g="0" b="127"></partColor11>
+ <partColor12 r="127" g="127" b="63"></partColor12>
+ <partColor13 r="0" g="127" b="127"></partColor13>
+ <partColor14 r="127" g="0" b="127"></partColor14>
+ <partColor15 r="0" g="127" b="255"></partColor15>
+ <partColor16 r="0" g="63" b="63"></partColor16>
+ <partColor17 r="0" g="0" b="0"></partColor17>
+ <partCanvasBg r="144" g="149" b="157"></partCanvasBg>
+ <trackBg r="60" g="63" b="72"></trackBg>
+ <selectTrackBg r="64" g="103" b="105"></selectTrackBg>
+ <selectTrackFg r="0" g="0" b="0"></selectTrackFg>
+ <mixerBg r="0" g="0" b="0"></mixerBg>
+ <midiTrackLabelBg r="74" g="150" b="194"></midiTrackLabelBg>
+ <drumTrackLabelBg2 r="150" g="177" b="189"></drumTrackLabelBg2>
+ <newDrumTrackLabelBg2 r="116" g="232" b="242"></newDrumTrackLabelBg2>
+ <waveTrackLabelBg r="213" g="128" b="202"></waveTrackLabelBg>
+ <outputTrackLabelBg r="84" g="185" b="58"></outputTrackLabelBg>
+ <inputTrackLabelBg r="199" g="75" b="64"></inputTrackLabelBg>
+ <groupTrackLabelBg r="236" g="214" b="90"></groupTrackLabelBg>
+ <auxTrackLabelBg2 r="142" g="157" b="6"></auxTrackLabelBg2>
+ <synthTrackLabelBg r="229" g="157" b="101"></synthTrackLabelBg>
+ <midiTrackBg r="49" g="71" b="90"></midiTrackBg>
+ <ctrlGraphFg r="255" g="170" b="0"></ctrlGraphFg>
+ <drumTrackBg r="49" g="71" b="90"></drumTrackBg>
+ <newDrumTrackBg r="49" g="71" b="90"></newDrumTrackBg>
+ <waveTrackBg r="85" g="60" b="60"></waveTrackBg>
+ <outputTrackBg r="59" g="83" b="62"></outputTrackBg>
+ <inputTrackBg r="91" g="88" b="85"></inputTrackBg>
+ <groupTrackBg r="90" g="72" b="54"></groupTrackBg>
+ <auxTrackBg r="50" g="90" b="90"></auxTrackBg>
+ <synthTrackBg r="91" g="57" b="47"></synthTrackBg>
+ <transportHandleColor r="0" g="0" b="255"></transportHandleColor>
+ <bigtimeForegroundcolor r="255" g="0" b="0"></bigtimeForegroundcolor>
+ <bigtimeBackgroundcolor r="0" g="0" b="0"></bigtimeBackgroundcolor>
+ <waveEditBackgroundColor r="200" g="200" b="200"></waveEditBackgroundColor>
+ <rulerBackgroundColor r="46" g="46" b="46"></rulerBackgroundColor>
+ <rulerForegroundColor r="154" g="154" b="154"></rulerForegroundColor>
+ <midiCanvasBackgroundColor r="172" g="172" b="172"></midiCanvasBackgroundColor>
+ <midiControllerViewBackgroundColor r="112" g="112" b="112"></midiControllerViewBackgroundColor>
+ <drumListBackgroundColor r="202" g="202" b="202"></drumListBackgroundColor>
+ <rulerCurrentColor r="54" g="113" b="42"></rulerCurrentColor>
+ <waveedit>
+ <bgcolor r="200" g="200" b="200"></bgcolor>
+ </waveedit>
+ </configuration>
+ </muse>
diff --git a/muse2/share/themes/Ardour.qss b/muse2/share/themes/Ardour.qss
new file mode 100644
index 00000000..fa563e87
--- /dev/null
+++ b/muse2/share/themes/Ardour.qss
@@ -0,0 +1,53 @@
+QWidget {
+ background-color: rgb(108,109,121);
+ color: rgb(193,193,197);
+}
+
+QToolBar QToolButton {
+ background-color: rgb(93,94,106);
+ border-color: rgb(70,70,70);
+ border-style: outset;
+ border-width: 1px;
+ border-radius: 5px;
+ padding: 1px;
+
+}
+
+QAction {
+ background-color: rgb(150,150,150);
+ spacing: 3px;
+ padding: 1px 4px;
+ background: transparent;
+ border-radius: 4px;
+ }
+
+QMenu::item:selected {
+ background-color: rgb(40,90,40);
+}
+
+QToolBar QToolButton:hover {
+ background-color: rgb(50,50,50);
+ border-color: rgb(58,167,221);
+ border-style: outset;
+ border-width: 1px;
+ border-radius: 3px;
+ padding: 2px;
+
+}
+
+QToolBar QToolButton:pressed {
+ background-color: rgb(125,247,131);
+ border-style: inset;
+ border-width: 1px;
+ border-radius: 2px;
+ padding: 2px;
+
+}
+QToolBar QToolButton:checked {
+ background-color: rgb(125,247,131);
+ border-style: inset;
+ border-width: 1px;
+ border-radius: 2px;
+ padding: 2px;
+
+}
diff --git a/muse2/share/themes/CMakeLists.txt b/muse2/share/themes/CMakeLists.txt
new file mode 100644
index 00000000..b31ddaec
--- /dev/null
+++ b/muse2/share/themes/CMakeLists.txt
@@ -0,0 +1,30 @@
+#=============================================================================
+# MusE
+# Linux Music Editor
+# $Id:$
+#
+# Copyright (C) 1999-2013 by Werner Schweer and others
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#=============================================================================
+
+file (GLOB theme_files *.cfg *.qss
+ )
+
+install( FILES ${theme_files}
+ DESTINATION ${MusE_SHARE_DIR}/themes
+ )
+
diff --git a/muse2/share/darkbase.cfg b/muse2/share/themes/Dark Theme.cfg
index 6ec8bcb5..6ec8bcb5 100644
--- a/muse2/share/darkbase.cfg
+++ b/muse2/share/themes/Dark Theme.cfg
diff --git a/muse2/share/darkbase.qss b/muse2/share/themes/Dark Theme.qss
index 8c40a4ba..8c40a4ba 100644
--- a/muse2/share/darkbase.qss
+++ b/muse2/share/themes/Dark Theme.qss
diff --git a/muse2/share/lightbase.cfg b/muse2/share/themes/Light Theme.cfg
index 9cced291..9cced291 100644
--- a/muse2/share/lightbase.cfg
+++ b/muse2/share/themes/Light Theme.cfg