Style storage units differently
The storage context tile and its associated dialog (which you get by clicking on the tile) display sizes like 4 MB
in lozenges.
The original design styles the unit text (MB
) smaller than the number (4
), at least in the dialog (at the bottom of the design).
This styling should be implemented and applied to both the dialog and the tile.
It will require GLib’s g_format_size_full()
API to be used instead of g_format_size()
, and a new flag added to return only the units. Then that can be replaced in the full string.
i.e. something like changing size_str = g_format_size (size_bytes)
to
size_full_str = g_format_size (size_bytes);
size_units_str = g_format_size_full (size_bytes, G_FORMAT_SIZE_UNITS_ONLY);
size_units_wrapped_str = g_strdup_printf ("<span style='font-size:smaller'>%s</span>", size_units_str);
size_str = str_replace (size_full_str, size_units_str, size_units_wrapped_str);
See discussion on !898 (comment 1246498)
Edited by Philip Withnall