13
0

ardourfader: further steps to per-fader colors

This commit is contained in:
Paul Davis 2022-08-10 18:26:49 -06:00
parent 9459ca5583
commit 32c2ed3f21
2 changed files with 19 additions and 2 deletions

View File

@ -764,3 +764,17 @@ ArdourFader::get_parent_bg ()
return get_style ()->get_bg (get_state()); return get_style ()->get_bg (get_state());
} }
void
ArdourFader::set_bg (Gtkmm2ext::Color c)
{
explicit_bg = c;
have_explicit_bg = true;
}
void
ArdourFader::set_fg (Gtkmm2ext::Color c)
{
explicit_fg = c;
have_explicit_fg = true;
}

View File

@ -55,6 +55,9 @@ public:
Tweaks tweaks() const { return _tweaks; } Tweaks tweaks() const { return _tweaks; }
void set_tweaks (Tweaks); void set_tweaks (Tweaks);
void set_bg (Gtkmm2ext::Color);
void set_fg (Gtkmm2ext::Color);
protected: protected:
void on_size_request (GtkRequisition*); void on_size_request (GtkRequisition*);
void on_size_allocate (Gtk::Allocation& alloc); void on_size_allocate (Gtk::Allocation& alloc);
@ -100,9 +103,9 @@ private:
sigc::connection _parent_style_change; sigc::connection _parent_style_change;
Widget * _current_parent; Widget * _current_parent;
Gdk::Color get_parent_bg (); Gdk::Color get_parent_bg ();
Gtkmm2ext::Color _explicit_bg; Gtkmm2ext::Color explicit_bg;
bool have_explicit_bg; bool have_explicit_bg;
Gtkmm2ext::Color _explicit_fg; Gtkmm2ext::Color explicit_fg;
bool have_explicit_fg; bool have_explicit_fg;
void create_patterns(); void create_patterns();