label-freetype: Force resize calculation when moving control

When moving the label around we need to do a full recalculation
of the metrics, because the position is part of the computation.
This commit is contained in:
Ray Strode 2024-01-04 16:05:40 -05:00
parent 1c2c9e622d
commit 345d28b3cb

View file

@ -854,15 +854,19 @@ show_control (ply_label_plugin_control_t *label,
long y)
{
ply_rectangle_t dirty_area;
bool force_resize = false;
dirty_area = label->area;
label->display = display;
label->area.x = x;
label->area.y = y;
if (label->area.x != x || label->area.y != y) {
label->area.x = x;
label->area.y = y;
force_resize = true;
}
label->is_hidden = false;
size_control (label, false);
size_control (label, force_resize);
if (!label->is_hidden && label->display != NULL)
ply_pixel_display_draw_area (label->display,