[Commits] [wesnoth/wesnoth] e4aa7c: styled_widget: respect minimum size even for non-t...

GitHub noreply at github.com
Tue Dec 13 20:32:31 UTC 2016


  Branch: refs/heads/shrinking-styled-widgets
  Home:   https://github.com/wesnoth/wesnoth
  Commit: e4aa7c0d9504b5286ece73941421768948024774
      https://github.com/wesnoth/wesnoth/commit/e4aa7c0d9504b5286ece73941421768948024774
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2016-12-13 (Tue, 13 Dec 2016)

  Changed paths:
    M src/gui/widgets/spacer.cpp
    M src/gui/widgets/spacer.hpp
    M src/gui/widgets/styled_widget.cpp
    M src/gui/widgets/styled_widget.hpp

  Log Message:
  -----------
  styled_widget: respect minimum size even for non-text widgets

For widgets which don't contain text (label_ is empty),
request_reduce_width() and request_reduce_height() can be implemented in a
way that respects the minimum size set in widget definition. However,
neither of those functions do anything for non-text widgets.

This commit simply implements the request_reduce_* functions for non-text
widgets, and overrides the implementation for spacers because ingame WML
messages break otherwise.





More information about the Commits mailing list