1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-05 21:02:42 +02:00

libgimpwidgets: No decimal for u8 RGB color selector

This patch uses the is_u8 variable in GimpColorScales's
create_group () function to conditionally set decimals to
0 when creating u8 RGB color selectors.
This change will help further distinguish between the 0...00
and 0..255 views in the Color Selectors. It will also better
convey to users that u8 is an integer value rather than a
floating point.
This commit is contained in:
Alx Sa
2025-08-07 04:05:48 +00:00
parent 4e0dd10341
commit d58b17cb10

View File

@@ -313,7 +313,7 @@ create_group (GimpColorScales *scales,
scale_defs[i].default_value,
scale_defs[i].spin_min_value,
scale_defs[i].spin_max_value,
1);
is_u8 ? 0 : 1);
gtk_grid_attach (GTK_GRID (grid), scales->scales[i], 1, row, 3, 1);
gimp_label_spin_set_increments (GIMP_LABEL_SPIN (scales->scales[i]),
1.0, scale_defs[i].scale_inc);