This fixes an -Woverloaded-virtual ambiguity introduced in b5e613d45
void render (cairo_t*, cairo_rectagle*)
void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*)
ArdourCanvas prefers cairomm and CairoWidget itself uses Cairo::Context,
this improves overall API consistency.
This should really be split in separate semantics for key and button events.
Fixes a subtle but nasty bug in the EngineDialog where the change of the default focus
widget from a Gtk::Button (acts on press) to an ArdourButton (acts on release) caused
events occuring after a dialog has grabbed focus to trigger button clicks
In the normal course of events, an ArdourButton requests just enough
space to display its elements. In particular the size will change when
the text does. Yet, in several cases it is better to avoid layout jittering; until now ArdourButton users manually set a static size on the button at creation time.
Introduce new API to set the text used for measuring the button size
separately from the text that will be displayed. In most cases this
enables the callers to replace
set_size_request_to_display_given_text(button, text, w, h);
where w and h were hard-coded to cater for other button elements, by
button.set_sizing_text(text);
which will make ArdourButton correctly compute the size request in all
cases with its real elements and padding. ArdourButton users can call
button.set_sizing_text("");
to get the size request depend on displayed text (which is the default).
If for whatever reason a grab is taken (e.g. a menu popping up) while
somebody is pressing a mouse button on an ArdourButton, then the
ArdourButton will not get the mouse button release event and will look
stuck in pressed position.
The leave notify event is fired if the mouse is still on the
ArdourButton while the grab is taken, but not if the user was dragging
the mouse outside of the button.
The only reliable way is to listen for the grab_broken_event signal.
Do so.
Diameter is calculated depending on font-scaling.
Besides, all explicit calls simply set the default
value, anyway. If some API is needed in the future,
it should set the diameter in [em].
This fixes issues where button text was set during static
initialization where the widget style was not yet available,
and a lot of related issues where the text was set
before style.
ArdourButtons now have a "pushed" animation.
The gradient is now implemented in the button, rather than providing 2 colors in the theme, which was burdensome.
Lots of code cleanup in ArdourButton. Removed several unnecessary flags.
Refactor more stuff into route_ui.