mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +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
|
|
@ -34,7 +34,6 @@
|
|||
#include "ardour/session.h"
|
||||
#include "ardour/smf_source.h"
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "gui_thread.h"
|
||||
#include "midi_region_view.h"
|
||||
#include "midi_streamview.h"
|
||||
|
|
@ -45,6 +44,7 @@
|
|||
#include "region_view.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "selection.h"
|
||||
#include "ui_config.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
|
@ -85,7 +85,7 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv)
|
|||
|
||||
color_handler ();
|
||||
|
||||
UIConfiguration::ColorsChanged.connect(sigc::mem_fun(*this, &MidiStreamView::color_handler));
|
||||
UIConfiguration::instance().ColorsChanged.connect(sigc::mem_fun(*this, &MidiStreamView::color_handler));
|
||||
|
||||
note_range_adjustment.set_page_size(_highest_note - _lowest_note);
|
||||
note_range_adjustment.set_value(_lowest_note);
|
||||
|
|
@ -323,7 +323,7 @@ MidiStreamView::draw_note_lines()
|
|||
*/
|
||||
|
||||
if (i <= highest_note()) {
|
||||
_note_lines->add (y, 1.0, ARDOUR_UI::config()->color ("piano roll black outline"));
|
||||
_note_lines->add (y, 1.0, UIConfiguration::instance().color ("piano roll black outline"));
|
||||
}
|
||||
|
||||
/* now add a thicker line/bar which covers the entire vertical
|
||||
|
|
@ -336,10 +336,10 @@ MidiStreamView::draw_note_lines()
|
|||
case 6:
|
||||
case 8:
|
||||
case 10:
|
||||
color = ARDOUR_UI::config()->color_mod ("piano roll black", "piano roll black");
|
||||
color = UIConfiguration::instance().color_mod ("piano roll black", "piano roll black");
|
||||
break;
|
||||
default:
|
||||
color = ARDOUR_UI::config()->color_mod ("piano roll white", "piano roll white");
|
||||
color = UIConfiguration::instance().color_mod ("piano roll white", "piano roll white");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -442,7 +442,7 @@ MidiStreamView::setup_rec_box ()
|
|||
_trackview.session()->record_status() == Session::Recording &&
|
||||
_trackview.track()->record_enabled()) {
|
||||
|
||||
if (ARDOUR_UI::config()->get_show_waveforms_while_recording() && rec_regions.size() == rec_rects.size()) {
|
||||
if (UIConfiguration::instance().get_show_waveforms_while_recording() && rec_regions.size() == rec_rects.size()) {
|
||||
|
||||
/* add a new region, but don't bother if they set show-waveforms-while-recording mid-record */
|
||||
|
||||
|
|
@ -565,9 +565,9 @@ MidiStreamView::color_handler ()
|
|||
draw_note_lines ();
|
||||
|
||||
if (_trackview.is_midi_track()) {
|
||||
canvas_rect->set_fill_color (ARDOUR_UI::config()->color_mod ("midi track base", "midi track base"));
|
||||
canvas_rect->set_fill_color (UIConfiguration::instance().color_mod ("midi track base", "midi track base"));
|
||||
} else {
|
||||
canvas_rect->set_fill_color (ARDOUR_UI::config()->color ("midi bus base"));
|
||||
canvas_rect->set_fill_color (UIConfiguration::instance().color ("midi bus base"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue