X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Ftheme_manager.cc;h=9fdba15da8414dc940130309129c06eb9d7103a4;hb=c3e7746e367b5b461f0577b548c9e29854bdde06;hp=8d4daf0a3d372d527db590f498cb1ca208d58bbd;hpb=95a24f9707c342ea1764eb8d1de0a9c73eda84df;p=ardour.git diff --git a/gtk2_ardour/theme_manager.cc b/gtk2_ardour/theme_manager.cc index 8d4daf0a3d..9fdba15da8 100644 --- a/gtk2_ardour/theme_manager.cc +++ b/gtk2_ardour/theme_manager.cc @@ -26,6 +26,8 @@ #include #include +#include + #include "theme_manager.h" #include "rgb_macros.h" #include "ardour_ui.h" @@ -42,7 +44,7 @@ sigc::signal ColorsChanged; sigc::signal ColorChanged; ThemeManager::ThemeManager() - : ArdourDialog ("ThemeManager"), + : ArdourDialog ("Theme Manager"), dark_button ("Dark Theme"), light_button ("Light Theme"), reset_button ("Restore Defaults") @@ -191,12 +193,27 @@ load_rc_file (const string& filename, bool themechange) Gtkmm2ext::UI::instance()->load_rcfile (rcfile, themechange); } +/* hmm, this is a problem. the profile doesn't + exist when the theme manager is constructed + and toggles buttons during "normal" GTK setup. + + a better solution will be to make all Profile + methods static or something. + + XXX FIX ME +*/ + +#define HACK_PROFILE_IS_SAE() (getenv("ARDOUR_SAE")!=0) + void ThemeManager::on_dark_theme_button_toggled() { if (!dark_button.get_active()) return; - - ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_dark.rc"); + if (HACK_PROFILE_IS_SAE()){ + ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_dark_sae.rc"); + } else { + ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_dark.rc"); + } load_rc_file (ARDOUR_UI::config()->ui_rc_file.get(), true); } @@ -204,8 +221,11 @@ void ThemeManager::on_light_theme_button_toggled() { if (!light_button.get_active()) return; - - ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light.rc"); + if (HACK_PROFILE_IS_SAE()){ + ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light_sae.rc"); + } else { + ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light.rc"); + } load_rc_file (ARDOUR_UI::config()->ui_rc_file.get(), true); } @@ -242,9 +262,9 @@ ThemeManager::setup_theme () rcfile = ARDOUR_UI::config()->ui_rc_file.get(); } - if (rcfile == "ardour2_ui_dark.rc") { + if (rcfile == "ardour2_ui_dark.rc" || rcfile == "ardour2_ui_dark_sae.rc") { dark_button.set_active(); - } else if (rcfile == "ardour2_ui_light.rc") { + } else if (rcfile == "ardour2_ui_light.rc" || "ardour2_ui_light_sae.rc") { light_button.set_active(); }