When [unit_status] shows two or more images, only the first showed and
there was no indication that there were further statuses. Now an
ellipsis is shown and the tooltip contains the information about the
second and further statuses.
Fixes#3197
The strategy is two-fold. We move the rendering of the icon into the
battery status report where it can be disabled at runtime, and allow the
countdown/clock to move to the position of the battery status if the device
doesn't have a battery. I also moved rendering of the clock icon to the
time report to allow the icon to move together with the text.
I needed to change theme::status_ to store pointers to status items because
otherwise the countdown object loses its type when inserted to the map. And
to be able to use std::unique_ptr inside the theme class, I had to make the
class non-copyable and movable.
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:
83ba09a5a9/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.
(cherry picked from commit 461cd2c4bd)
English uses 2 letter abbrev but some languages like Czech don't have this abbrev so we need wider space for our 6 letter label "Životů"
(cherry picked from commit d51ccbe538)
This slider hasn't worked in ages, and we're planning to remove it anyway.
The slider "groove" image remains since it's hard drawn in the background image file.
Since GUI1 widgets seem to rely on the given font size values in font.hpp
for their dimensions, those are unchanged. ThemeWML-provided sizes were adjusted,
and larger sizes assigned to elements that were too small with the new font.
Theme element rects were also adjusted as necessary.
More specifically, horizontal resolutions less than 1024 px.
Okay, I lied. This doesn't fully fix that on master because recent font
and theme changes cause it to be misaligned even on >= 1024 px. But
hopefully someone will figure something out later.
This is a backport of a 1.12 commit.
The rectangle for the unit_stats was overlapping other rectangles, making
it not function properly. Just resized it to fit. Tested with single
poison effect, both poison and slow, and no effects, all worked.
Reverts a decision from commit 10b7cd63f5
in order to both make the Classic theme backportable to 1.12 and
eliminate an unnecessary complication for UMC.
At some point in the future, the Default theme will replace Classic when
the rumored UnitBox theme becomes the default, so I'd say naming its
directories "classic" makes sense, while the current Classic theme is
the "legacy" classic.
If we hadn't gotten stuck with Default using "classic" dirs in 1.12
there would be no need for any of this irritating nonsense.
namely the first one in "Engine related features". To implement this feature, I added the command field in the configuration for the context menu.
This comes as an alternative to https://github.com/wesnoth/wesnoth/pull/246