mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 23:46:20 +01:00
properly restore newer (cairo-canvas related) UI config parameters
This commit is contained in:
parent
1b73ab2065
commit
11becd4a6b
6 changed files with 19 additions and 4 deletions
|
|
@ -210,6 +210,9 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
}
|
||||
|
||||
ui_config = new UIConfiguration();
|
||||
ui_config->ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed));
|
||||
boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
|
||||
ui_config->map_parameters (pc);
|
||||
|
||||
editor = 0;
|
||||
mixer = 0;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@
|
|||
#include "ardour/osc.h"
|
||||
#endif
|
||||
|
||||
#include "canvas/wave_view.h"
|
||||
|
||||
#include "audio_clock.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "actions.h"
|
||||
|
|
@ -311,8 +313,6 @@ ARDOUR_UI::setup_session_options ()
|
|||
void
|
||||
ARDOUR_UI::parameter_changed (std::string p)
|
||||
{
|
||||
ENSURE_GUI_THREAD (*this, &ARDOUR_UI::parameter_changed, p)
|
||||
|
||||
if (p == "external-sync") {
|
||||
|
||||
ActionManager::map_some_state ("Transport", "ToggleExternalSync", sigc::mem_fun (_session->config, &SessionConfiguration::get_external_sync));
|
||||
|
|
@ -413,6 +413,8 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||
} else if (p == "super-rapid-clock-update") {
|
||||
stop_clocking ();
|
||||
start_clocking ();
|
||||
} else if (p == "waveform-gradient-depth") {
|
||||
ArdourCanvas::WaveView::set_global_gradient_depth (config()->get_waveform_gradient_depth());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -296,7 +296,6 @@ ThemeManager::on_waveform_gradient_depth_change ()
|
|||
ArdourCanvas::WaveView::set_global_gradient_depth (v);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ThemeManager::on_timeline_item_gradient_depth_change ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,6 +59,15 @@ UIConfiguration::~UIConfiguration ()
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
UIConfiguration::map_parameters (boost::function<void (std::string)>& functor)
|
||||
{
|
||||
#undef UI_CONFIG_VARIABLE
|
||||
#define UI_CONFIG_VARIABLE(Type,var,Name,value) functor (Name);
|
||||
#include "ui_config_vars.h"
|
||||
#undef UI_CONFIG_VARIABLE
|
||||
}
|
||||
|
||||
int
|
||||
UIConfiguration::load_defaults ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ class UIConfiguration : public PBD::Stateful
|
|||
|
||||
uint32_t color_by_name (const std::string&);
|
||||
|
||||
sigc::signal<void,const char*> ParameterChanged;
|
||||
sigc::signal<void,std::string> ParameterChanged;
|
||||
void map_parameters (boost::function<void (std::string)>&);
|
||||
|
||||
#undef UI_CONFIG_VARIABLE
|
||||
#define UI_CONFIG_VARIABLE(Type,var,name,value) \
|
||||
|
|
|
|||
|
|
@ -603,6 +603,7 @@ WaveView::CacheEntry::image ()
|
|||
|
||||
#else
|
||||
cerr << "draw, logscaled = " << _wave_view->_logscaled << " global " << WaveView::_global_logscaled << endl;
|
||||
cerr << "gradient depth: " << _wave_view->gradient_depth() << endl;
|
||||
|
||||
boost::scoped_array<LineTips> tips (new LineTips[_n_peaks]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue