mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +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
|
|
@ -55,6 +55,7 @@
|
|||
#include "streamview.h"
|
||||
#include "editor_drag.h"
|
||||
#include "editor.h"
|
||||
#include "ui_config.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
|
@ -82,7 +83,7 @@ Glib::RefPtr<Gtk::SizeGroup> TimeAxisView::midi_scroomer_size_group = Glib::RefP
|
|||
void
|
||||
TimeAxisView::setup_sizes()
|
||||
{
|
||||
name_width_px = ceilf (100.f * ARDOUR_UI::config()->get_ui_scale());
|
||||
name_width_px = ceilf (100.f * UIConfiguration::instance().get_ui_scale());
|
||||
}
|
||||
|
||||
TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
|
||||
|
|
@ -219,7 +220,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
|||
time_axis_hbox.show();
|
||||
top_hbox.pack_start (scroomer_placeholder, false, false); // OR pack_end to move after meters ?
|
||||
|
||||
UIConfiguration::ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler));
|
||||
UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler));
|
||||
|
||||
GhostRegion::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&TimeAxisView::erase_ghost, this, _1), gui_context());
|
||||
}
|
||||
|
|
@ -1055,7 +1056,7 @@ TimeAxisView::get_selection_rect (uint32_t id)
|
|||
rect->rect = new ArdourCanvas::Rectangle (selection_group);
|
||||
CANVAS_DEBUG_NAME (rect->rect, "selection rect");
|
||||
rect->rect->set_outline (false);
|
||||
rect->rect->set_fill_color (ARDOUR_UI::config()->color_mod ("selection rect", "selection rect"));
|
||||
rect->rect->set_fill_color (UIConfiguration::instance().color_mod ("selection rect", "selection rect"));
|
||||
|
||||
rect->start_trim = new ArdourCanvas::Rectangle (selection_group);
|
||||
CANVAS_DEBUG_NAME (rect->start_trim, "selection rect start trim");
|
||||
|
|
@ -1220,26 +1221,26 @@ TimeAxisView::color_handler ()
|
|||
|
||||
for (list<SelectionRect*>::iterator i = used_selection_rects.begin(); i != used_selection_rects.end(); ++i) {
|
||||
|
||||
(*i)->rect->set_fill_color (ARDOUR_UI::config()->color_mod ("selection rect", "selection rect"));
|
||||
(*i)->rect->set_outline_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->rect->set_fill_color (UIConfiguration::instance().color_mod ("selection rect", "selection rect"));
|
||||
(*i)->rect->set_outline_color (UIConfiguration::instance().color ("selection"));
|
||||
|
||||
(*i)->start_trim->set_fill_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->start_trim->set_outline_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->start_trim->set_fill_color (UIConfiguration::instance().color ("selection"));
|
||||
(*i)->start_trim->set_outline_color (UIConfiguration::instance().color ("selection"));
|
||||
|
||||
(*i)->end_trim->set_fill_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->end_trim->set_outline_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->end_trim->set_fill_color (UIConfiguration::instance().color ("selection"));
|
||||
(*i)->end_trim->set_outline_color (UIConfiguration::instance().color ("selection"));
|
||||
}
|
||||
|
||||
for (list<SelectionRect*>::iterator i = free_selection_rects.begin(); i != free_selection_rects.end(); ++i) {
|
||||
|
||||
(*i)->rect->set_fill_color (ARDOUR_UI::config()->color_mod ("selection rect", "selection rect"));
|
||||
(*i)->rect->set_outline_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->rect->set_fill_color (UIConfiguration::instance().color_mod ("selection rect", "selection rect"));
|
||||
(*i)->rect->set_outline_color (UIConfiguration::instance().color ("selection"));
|
||||
|
||||
(*i)->start_trim->set_fill_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->start_trim->set_outline_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->start_trim->set_fill_color (UIConfiguration::instance().color ("selection"));
|
||||
(*i)->start_trim->set_outline_color (UIConfiguration::instance().color ("selection"));
|
||||
|
||||
(*i)->end_trim->set_fill_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->end_trim->set_outline_color (ARDOUR_UI::config()->color ("selection"));
|
||||
(*i)->end_trim->set_fill_color (UIConfiguration::instance().color ("selection"));
|
||||
(*i)->end_trim->set_outline_color (UIConfiguration::instance().color ("selection"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue