Micro optimization: only queue resize when widget is realized
This commit is contained in:
parent
d6e3afd3ae
commit
1b13bf607f
@ -2387,7 +2387,10 @@ AudioClock::dpi_reset ()
|
||||
*/
|
||||
first_width = 0;
|
||||
first_height = 0;
|
||||
|
||||
if (get_realized ()) {
|
||||
queue_resize ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -116,7 +116,9 @@ DurationInfoBox::dpi_reset ()
|
||||
_layout_value->get_pixel_size (wv, hv);
|
||||
_width = 8 + wv;
|
||||
_height = 4 + hv;
|
||||
if (get_realized ()) {
|
||||
queue_resize ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -198,7 +200,9 @@ XrunInfoBox::dpi_reset ()
|
||||
_layout_value->get_pixel_size (wv, hv);
|
||||
_width = 8 + wv;
|
||||
_height = 8 + hv;
|
||||
if (get_realized ()) {
|
||||
queue_resize ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -291,7 +295,9 @@ RemainInfoBox::dpi_reset ()
|
||||
_width = 8 + std::max (wl, wv);
|
||||
_height = 2 + hv + 2 + hl + 2;
|
||||
|
||||
if (get_realized ()) {
|
||||
queue_resize ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user