mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 08:53:08 +01:00
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:
parent
d8e7e24f59
commit
f3ec590eb5
1 changed files with 4 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue