[Users] [Bug 4592] New: Date-column zigzags due to proportional fonts

noreply at thewildbeast.co.uk noreply at thewildbeast.co.uk
Tue May 3 04:08:52 UTC 2022


https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4592

            Bug ID: 4592
           Summary: Date-column zigzags due to proportional fonts
           Product: Claws Mail
           Version: GIT
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: minor
          Priority: P3
         Component: UI/Message List
          Assignee: users at lists.claws-mail.org
          Reporter: jb-claws at wisemo.com

The "date" column in the message list isn't aligned for readability, because
the various sub-fields of dates are shown with varying width depending on the
value.  So for example, "Fri" and "Wed" field values end up having different
pixel width, thus causing all fields to the right of them to zigzag as the user
tries to visually scan for mails from a specific date period.

Historically, the fix would have been to use a fixed width terminal font, but
that wouldn't look right in a modern graphical user interface, where
proportional fonts are the norm.

The proposed fix is to add UI initialization code which, upon startup or
font/locale change, loops over all the values for each name column type (such
as the (un)abbreviated week days) and all the digits (0 to 9) and measure the
max pixel width of each of these short lists.  Then when displaying the date
values, format each text value left aligned in its max pixel width, and each
digit centered in the max digit width.  So something like "Fri,,,,
,2,,9,-,0,,4,-,2,,0,,2,,2, ,1,,5,:,2,,2," where each "," represents where zero
or more padding pixels will need to be inserted.

Note that all this must be done after expanding "locale-default" format codes
to basic format codes, and using the format-relevant names of weekdays, months
and Japanese Eras (or any other name-based fields in locales that use names
instead of numbers).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Users mailing list