GtkScale: Update the label's size request from set_digits ()
authorLuca Bacci <luca.bacci982@gmail.com>
Tue, 6 Sep 2022 17:27:38 +0000 (19:27 +0200)
committerLuca Bacci <luca.bacci982@gmail.com>
Tue, 6 Sep 2022 19:08:31 +0000 (21:08 +0200)
commitcc57692345042a2d49f1caccc9d06926da119e33
treee9ee73697d4f0a8d2d13488723578c62c661aaad
parente4be073f0a29520b6aefbb99b53c5cab90671010
GtkScale: Update the label's size request from set_digits ()

Update the label size request when setting the digits property
by calling the update_label_request () util function.

That util function works by measuring the size request of the
label with the lower and upper values of the adjustment, then
taking the max. That way the size requisition is constant
regardless of the actual displayed value.

Since the util function internally works by setting the text
of the label, let it also set the text at last by taking in
account the current adjustment's value. Most of its callers
do that anyway.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5156
gtk/gtkscale.c