Dynamically update ArdourButton indicator
Previously this was semi-random, on_size_request() may be called in response to some other widget changing size, before a given ArdourButton DPIReset handler could set _diameter = 0.
This commit is contained in:
@@ -691,12 +691,10 @@ ArdourButton::on_size_request (Gtk::Requisition* req)
|
||||
req->width = req->height = 0;
|
||||
CairoWidget::on_size_request (req);
|
||||
|
||||
if (_diameter == 0) {
|
||||
const float newdia = rintf (11.f * UIConfigurationBase::instance().get_ui_scale());
|
||||
if (_diameter != newdia) {
|
||||
_pattern_height = 0;
|
||||
_diameter = newdia;
|
||||
}
|
||||
const float newdia = rintf (11.f * UIConfigurationBase::instance().get_ui_scale());
|
||||
if (_diameter != newdia) {
|
||||
_pattern_height = 0;
|
||||
_diameter = newdia;
|
||||
}
|
||||
|
||||
if (_elements & Text) {
|
||||
|
||||
Reference in New Issue
Block a user