ui: Handle the battery/countdown report switcheroo differently

This fixes the countdown report (a.k.a. clock) using the wrong font size
at small resolutions, as well as taking over the battery report's box
without resizing it and thus running out of horizontal room most of the
time.

This also removes two broken references to "timeout-panel" and
"report_timeout", neither of which being names that actually exist in
this version of the theme.
This commit is contained in:
Iris Morelle 2021-03-18 20:15:27 -03:00
parent 2c540ccfce
commit e7d1a5dc8a

View file

@ -511,6 +511,10 @@
[remove]
id=battery
[/remove]
# Give the battery box the same dimensions as the countdown box
{CHANGE_STATUS_BOX +3 =+0 +90 +15 battery income-box-topright}
[change]
id=report_countdown
ref=battery-box-center
@ -642,7 +646,14 @@
{CHANGE_STATUS_BOX +1 =+0 +45 +15 units villages-box-topright}
{CHANGE_STATUS_BOX +1 =+0 +60 +15 upkeep units-box-topright}
{CHANGE_STATUS_BOX +1 =+0 +55 +15 income upkeep-box-topright}
{CHANGE_STATUS_BOX +1 =+0 +55 +15 battery income-box-topright}
# Actually the countdown box at this resolution since the battery is
# never displayed below 1152 px horizontal.
# HACK: 3 px shift downwards to align the text baseline to the rest
# because we can't change the rects in [change] when the [no_battery]
# rule in the the main resolution exists. Currently this hack isn't a
# cause for concern, but if the status boxes regain borders/backgrounds
# we are going to need a different solution.
{CHANGE_STATUS_BOX +1 =+3 +75 +15 battery income-box-topright}
[change]
id=menu-main
@ -687,23 +698,9 @@
font_size={DEFAULT_FONT_TINY}
[/change]
[change]
id=status-battery
rect="=+4,=+1,+40,+{DEFAULT_FONT_TINY_HEIGHT}"
id=report_countdown
font_size={DEFAULT_FONT_TINY}
[/change]
[change]
id=timeout-panel
rect="+5,=,+75,="
[/change]
[change]
id=report_timeout
font_size={DEFAULT_FONT_TINY}
rect="+0,=,+55,+{DEFAULT_FONT_TINY_HEIGHT}"
[/change]
[change]
id=observers
rect="+265,=,+16,+{DEFAULT_FONT_SMALL_HEIGHT}"
[/change]
[/partialresolution]
[/theme]