mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
add on_name_changed() virtual method to CairoWidget
If a CairoWidget does not a GtkRC-defined style, then changing its name does not trigger on_style_changed(). Since we want to use CairoWidget::set_name() to trigger changes in the rendering of a widget, this is ... bad. Adding on_name_changed() provides a workaround for that.
This commit is contained in:
parent
4a915ee541
commit
e4e6010cd4
2 changed files with 13 additions and 1 deletions
|
|
@ -20,14 +20,17 @@
|
|||
#include "gtkmm2ext/cairo_widget.h"
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
static const char* has_cairo_widget_background_info = "has_cairo_widget_background_info";
|
||||
|
||||
CairoWidget::CairoWidget ()
|
||||
: _active_state (Gtkmm2ext::Off)
|
||||
, _visual_state (Gtkmm2ext::NoVisualState)
|
||||
, _need_bg (true)
|
||||
, _name_proxy (this, X_("name"))
|
||||
{
|
||||
|
||||
_name_proxy.connect (sigc::mem_fun (*this, &CairoWidget::on_name_changed));
|
||||
}
|
||||
|
||||
CairoWidget::~CairoWidget ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue