Permalink
Browse files

Themes: Fix the observers icon being hidden under the minimap

Closes #3543. Fixups #3441.

The observers icon is declared immediately after `report_timeout`,
therefore the timeout widget was the ref rect for the observers widget:
https://github.com/wesnoth/wesnoth/blob/83ba09a5a98b817a3e50a89dd6b41d2f779af5ff/src/theme.cpp#L120

PR #3441 added a battery icon to the left of the timeout widget. That
shifted the timeout widget to the right and the observers widget shifted
along with it due to its relative positioning. The observers widget
moved even on devices that didn't have a battery.

Fix this by using the battery box as the ref of the observers widget,
because it currently occupies the absolute location the observers widget
was positioned relatively to.
  • Loading branch information...
jostephd committed Sep 25, 2018
1 parent 83ba09a commit 461cd2c4bdeb2eb0e84ede6e57cd0b315dee2cee
Showing with 1 addition and 0 deletions.
  1. +1 −0 data/themes/default.cfg
@@ -362,6 +362,7 @@
[observers]
id=observers
font_size={DEFAULT_FONT_SMALL}
ref=battery-box-topright
rect="+5,=,+16,+{DEFAULT_FONT_SMALL_HEIGHT}"
xanchor=right
yanchor=fixed

0 comments on commit 461cd2c

Please sign in to comment.