[Commits] [wesnoth/wesnoth] 864e30: Fix: container_base with explicit minimum size can...
GitHub
noreply at github.com
Sat Dec 17 16:25:04 UTC 2016
Branch: refs/heads/grid-size-control
Home: https://github.com/wesnoth/wesnoth
Commit: 864e302f7c712a5b57d4639d27bd69f1c3e80e0f
https://github.com/wesnoth/wesnoth/commit/864e302f7c712a5b57d4639d27bd69f1c3e80e0f
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2016-12-17 (Sat, 17 Dec 2016)
Changed paths:
M src/gui/widgets/container_base.cpp
Log Message:
-----------
Fix: container_base with explicit minimum size can't shrink below that
Composite widgets, i.e. widgets which inherit container_base, such as the
unit preview pane, can have an explicit minimum size set in their
definition. The widget will request either that size or however much space
the child widgets want, whichever is higher.
If
* the minimum size was higher,
* there isn't enough space for that size, and
* there would be enough space for the underlying grid not to shrink,
then the attempt to reduce the size of the composite widget doesn't do
anything. The container_base tells the grid to shrink, but the grid is
already small enough to fit inside the given space. Thus, the grid doesn't
do anything. In addition, the container_base doesn't change its own size
afterwards.
This commit fixes the issue and allows composite widgets to shrink.
More information about the Commits
mailing list