[Commits] [wesnoth/wesnoth] 864e30: Fix: container_base with explicit minimum size can...

GitHub noreply at github.com
Tue Dec 27 17:12:41 UTC 2016


  Branch: refs/heads/master
  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.


  Commit: 3442101f90ac1601d29eee163054a4519cbb9644
      https://github.com/wesnoth/wesnoth/commit/3442101f90ac1601d29eee163054a4519cbb9644
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2016-12-18 (Sun, 18 Dec 2016)

  Changed paths:
    M src/gui/widgets/container_base.cpp

  Log Message:
  -----------
  container_base: query default size instead of minimum size


  Commit: 6c587de6e46ff67af320325c42331b9fb7bdbcdd
      https://github.com/wesnoth/wesnoth/commit/6c587de6e46ff67af320325c42331b9fb7bdbcdd
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2016-12-27 (Tue, 27 Dec 2016)

  Changed paths:
    M src/gui/widgets/container_base.cpp

  Log Message:
  -----------
  Merge pull request #904 from wesnoth/grid-size-control

Ability to shrink composite widgets below the default size


Compare: https://github.com/wesnoth/wesnoth/compare/19d5267ee49e...6c587de6e46f


More information about the Commits mailing list