mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +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
|
|
@ -510,7 +510,7 @@ ProcessorEntry::toggle_panner_link ()
|
|||
ProcessorEntry::Control::Control (boost::shared_ptr<AutomationControl> c, string const & n)
|
||||
: _control (c)
|
||||
, _adjustment (gain_to_slider_position_with_max (1.0, Config->get_max_gain()), 0, 1, 0.01, 0.1)
|
||||
, _slider (&_adjustment, boost::shared_ptr<PBD::Controllable>(), 0, max(13.f, rintf(13.f * ARDOUR_UI::config()->get_ui_scale())))
|
||||
, _slider (&_adjustment, boost::shared_ptr<PBD::Controllable>(), 0, max(13.f, rintf(13.f * UIConfiguration::instance().get_ui_scale())))
|
||||
, _slider_persistant_tooltip (&_slider)
|
||||
, _button (ArdourButton::led_default_elements)
|
||||
, _ignore_ui_adjustment (false)
|
||||
|
|
@ -792,7 +792,7 @@ PluginInsertProcessorEntry::plugin_insert_splitting_changed ()
|
|||
|
||||
if (_plugin_insert->splitting () || in != sinks)
|
||||
{
|
||||
_routing_icon.set_size_request (-1, std::max (7.f, rintf(7.f * ARDOUR_UI::config()->get_ui_scale())));
|
||||
_routing_icon.set_size_request (-1, std::max (7.f, rintf(7.f * UIConfiguration::instance().get_ui_scale())));
|
||||
_routing_icon.set_visible(true);
|
||||
_input_icon.show();
|
||||
} else {
|
||||
|
|
@ -817,7 +817,7 @@ PluginInsertProcessorEntry::hide_things ()
|
|||
ProcessorEntry::PortIcon::PortIcon(bool input) {
|
||||
_input = input;
|
||||
_ports = ARDOUR::ChanCount(ARDOUR::DataType::AUDIO, 1);
|
||||
set_size_request (-1, std::max (2.f, rintf(2.f * ARDOUR_UI::config()->get_ui_scale())));
|
||||
set_size_request (-1, std::max (2.f, rintf(2.f * UIConfiguration::instance().get_ui_scale())));
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -838,7 +838,7 @@ ProcessorEntry::PortIcon::on_expose_event (GdkEventExpose* ev)
|
|||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_fill (cr);
|
||||
|
||||
const double dx = rint(max(2., 2. * ARDOUR_UI::config()->get_ui_scale()));
|
||||
const double dx = rint(max(2., 2. * UIConfiguration::instance().get_ui_scale()));
|
||||
if (_ports.n_total() > 1) {
|
||||
for (uint32_t i = 0; i < _ports.n_total(); ++i) {
|
||||
if (i < _ports.n_midi()) {
|
||||
|
|
@ -886,7 +886,7 @@ ProcessorEntry::RoutingIcon::on_expose_event (GdkEventExpose* ev)
|
|||
cairo_rectangle (cr, ev->area.x, ev->area.y, ev->area.width, ev->area.height);
|
||||
cairo_clip (cr);
|
||||
|
||||
cairo_set_line_width (cr, max (1.f, ARDOUR_UI::config()->get_ui_scale()));
|
||||
cairo_set_line_width (cr, max (1.f, UIConfiguration::instance().get_ui_scale()));
|
||||
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
|
||||
|
||||
Gtk::Allocation a = get_allocation();
|
||||
|
|
@ -936,7 +936,7 @@ ProcessorEntry::RoutingIcon::on_expose_event (GdkEventExpose* ev)
|
|||
cairo_curve_to (cr, si_x, 0, si_x0, height, si_x0, 0);
|
||||
cairo_stroke (cr);
|
||||
} else if (midi_sources == 0 && midi_sinks == 1) {
|
||||
const double dx = 1 + rint(max(2., 2. * ARDOUR_UI::config()->get_ui_scale()));
|
||||
const double dx = 1 + rint(max(2., 2. * UIConfiguration::instance().get_ui_scale()));
|
||||
// draw "T"
|
||||
// TODO connect back to track-input of last midi-out if any, otherwise draw "X"
|
||||
const float si_x = rintf(width * .2f) + .5f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue