Fix round-corner backround of insensitive ArdourWidgets
ArdourButton draws a custom insensitive background, using the color "gtk_background". This can conflict with gtk's insensitive background color when using round-corners.
This commit is contained in:
@@ -297,7 +297,7 @@ CairoWidget::get_parent_bg ()
|
||||
_current_parent = parent;
|
||||
_parent_style_change = parent->signal_style_changed().connect (mem_fun (*this, &CairoWidget::on_style_changed));
|
||||
}
|
||||
return style->get_bg (get_state());
|
||||
return style->get_bg (Gtk::STATE_NORMAL);
|
||||
}
|
||||
|
||||
if (!parent->get_has_window()) {
|
||||
@@ -313,7 +313,7 @@ CairoWidget::get_parent_bg ()
|
||||
_current_parent = parent;
|
||||
_parent_style_change = parent->signal_style_changed().connect (mem_fun (*this, &CairoWidget::on_style_changed));
|
||||
}
|
||||
return parent->get_style ()->get_bg (parent->get_state());
|
||||
return parent->get_style ()->get_bg (Gtk::STATE_NORMAL);
|
||||
}
|
||||
|
||||
return get_style ()->get_bg (get_state());
|
||||
|
||||
@@ -545,7 +545,7 @@ ArdourButton::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_
|
||||
|
||||
// a transparent overlay to indicate insensitivity
|
||||
if ((visual_state() & Gtkmm2ext::Insensitive)) {
|
||||
rounded_function (cr, 0, 0, get_width(), get_height(), corner_radius);
|
||||
rounded_function (cr, 1, 1, get_width() - 2, get_height() - 2, corner_radius);
|
||||
uint32_t ins_color = UIConfigurationBase::instance().color ("gtk_background");
|
||||
Gtkmm2ext::set_source_rgb_a (cr, ins_color, 0.6);
|
||||
cairo_fill (cr);
|
||||
|
||||
Reference in New Issue
Block a user