Status bar too big, keeps changing format

Fixed Bad behavior UI & UX
RealisticOptimist · 4 years ago

Issue description

I play with 2560x1600, Windowed (but full size), Scale 120%.

2022-08-26 11_41_31-
2022-08-26 12_03_04-Captain of Industry

Apparently with 100% scale there is enough space, but at 120% scale sth. is wrong. Even if it stays single line, the shown items sometimes move sideways when content changes.

Expected behavior

In 4.10 it still worked fine ...

Game version

v0.4.11

RealisticOptimist · 4 years ago

Update:
The items move sideways even with 100% scale. And I could clearly observe it happen on month changes. So (at least) the object displaying the date string is at fault.

Captain Zuff Captain Zuff · 4 years ago

Just to clarify here, the bar is jumping back and forth between 1 and 2 bars at the end of each month?

RealisticOptimist · 4 years ago

No, it's not a simple toggle:

See this (incomplete) collage:
CoI_Statusbar

Every time the date string changes length, the status bar changes. the placement of the object gets varied, in some cases it turns into two lines (which is correct when the window is too small).

There are two length changing events: 9th->10th every month. and every new month. Luckily the used font has mono spaced digits, otherwise the statusbar would jiggle a bit every day.

The space in the statusbar reserved for the date is not long enough.

When calculating the needed space for the date string within the status bar, for a given UI scaling for all 12 months (in the configured language, with a 2-digit day of month) the length needs to be calculated to determine the longest. Then that shall result in a stable statusbar for a given window size.

Captain Filip Captain Filip · 4 years ago

Fixed in v0.4.12. Thanks for your report!

Closed as ✅ Fixed

6 Showing 1–5 of 5