summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Bindings
diff options
context:
space:
mode:
authorJames Magahern <james@magahern.com>2021-10-10 23:05:46 -0700
committerAndreas Kling <kling@serenityos.org>2021-10-11 10:15:34 +0200
commit4041848caa04ad523311e53040105c13b5f801c7 (patch)
tree878bb211a89ed527bba0fa933f5a3a26d0347439 /Userland/Libraries/LibWeb/Bindings
parentd79ab32850b3f93b0e710bc81a9cb7662e0ad585 (diff)
downloadserenity-4041848caa04ad523311e53040105c13b5f801c7.zip
ClockWidget: Left-align clock and center based on ideal width
I personally find it very distracting when the clock continuously shifts around as seconds tick. Because we're not using a monospace font for the clock, this is to be expected since each number has a different typographic width. However, a tradeoff can be made to make this slightly less distracting. Instead of _perfectly_ centering the time string for every given possible time, we can center it once based on a constant measurement and render the rest of the string as left-aligned. The advantage is that the clock no longer shifts around anymore while seconds tick. The disadvantage is that the time may sometimes be not perfectly centered by a pixel or two for certain numbers. Personally, I find the tradeoff well worth it, and I don't think I would even notice the imperfect centering unless I was specifically looking for it and watching it for a long time.
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings')
0 files changed, 0 insertions, 0 deletions