Opened 8 years ago

Last modified 8 weeks ago

#12150 assigned enhancement

[BColumnListView] Fix BSizeColumn to use the si unit in DrawField (easy)

Reported by: Janus Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by pulkomandy)

Currently, BColumnListView render sizes (in BSizeColumn, src/kits/interface/ColumnTypes.cpp) using "KB", "MB", etc suffixes.

The sizes are acutally multiples of 1024, not 1000, and so the suffix should be KiB, MiB, etc.

Ideally, the code would be adjusted to use string_for_size, which will not only do this, but also make sure to use the correct decimal separators depending on the user locale preferences. But, using string_for_size makes it more complicated to do "smart" string truncation (removing the least significant digits) to fit the text in the column when it is too small. See #13882 for an example of what happens when string_for_size is used without care.

Change History (2)

comment:1 by axeld, 6 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:2 by pulkomandy, 8 weeks ago

Description: modified (diff)
Summary: [BColumnListView] Fix BSizeColumn to use the si unit in DrawField[BColumnListView] Fix BSizeColumn to use the si unit in DrawField (easy)
Note: See TracTickets for help on using tickets.