mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Move UIConfiguration Singleton into UIConfiguration header
This removes the direct dependence on ardour_ui.h from 39 files
This commit is contained in:
parent
45d487f16e
commit
6b019a4953
84 changed files with 726 additions and 712 deletions
|
|
@ -43,6 +43,7 @@
|
|||
#include "utils.h"
|
||||
#include "meter_patterns.h"
|
||||
#include "timers.h"
|
||||
#include "ui_config.h"
|
||||
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/route.h"
|
||||
|
|
@ -100,8 +101,8 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
|
|||
next_release_selects = false;
|
||||
_width = Wide;
|
||||
|
||||
fader_length = rint (fader_length * ARDOUR_UI::config()->get_ui_scale());
|
||||
fader_girth = rint (fader_girth * ARDOUR_UI::config()->get_ui_scale());
|
||||
fader_length = rint (fader_length * UIConfiguration::instance().get_ui_scale());
|
||||
fader_girth = rint (fader_girth * UIConfiguration::instance().get_ui_scale());
|
||||
|
||||
if (horizontal) {
|
||||
gain_slider = manage (new HSliderController (&gain_adjustment, boost::shared_ptr<PBD::Controllable>(), fader_length, fader_girth));
|
||||
|
|
@ -170,8 +171,8 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
|
|||
RedrawMetrics.connect (sigc::mem_fun(*this, &GainMeterBase::redraw_metrics));
|
||||
|
||||
UI::instance()->theme_changed.connect (sigc::mem_fun(*this, &GainMeterBase::on_theme_changed));
|
||||
UIConfiguration::ColorsChanged.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), false));
|
||||
UIConfiguration::DPIReset.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), true));
|
||||
UIConfiguration::instance().ColorsChanged.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), false));
|
||||
UIConfiguration::instance().DPIReset.connect (sigc::bind(sigc::mem_fun (*this, &GainMeterBase::color_handler), true));
|
||||
}
|
||||
|
||||
GainMeterBase::~GainMeterBase ()
|
||||
|
|
@ -900,7 +901,7 @@ GainMeterBase::update_meters()
|
|||
peak_display.set_text (buf);
|
||||
}
|
||||
}
|
||||
if (mpeak >= ARDOUR_UI::config()->get_meter_peak()) {
|
||||
if (mpeak >= UIConfiguration::instance().get_meter_peak()) {
|
||||
peak_display.set_name ("MixerStripPeakDisplayPeak");
|
||||
}
|
||||
}
|
||||
|
|
@ -935,7 +936,7 @@ GainMeterBase::redraw_metrics()
|
|||
meter_ticks2_area.queue_draw ();
|
||||
}
|
||||
|
||||
#define PX_SCALE(pxmin, dflt) rint(std::max((double)pxmin, (double)dflt * ARDOUR_UI::config()->get_ui_scale()))
|
||||
#define PX_SCALE(pxmin, dflt) rint(std::max((double)pxmin, (double)dflt * UIConfiguration::instance().get_ui_scale()))
|
||||
|
||||
GainMeter::GainMeter (Session* s, int fader_length)
|
||||
: GainMeterBase (s, false, fader_length, 24)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue