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

GitHub noreply at github.com
Tue Dec 20 17:22:38 UTC 2016


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


  Commit: 1155cb8f63a4a9b310fd3a60ee9f26d1e444b47c
      https://github.com/wesnoth/wesnoth/commit/1155cb8f63a4a9b310fd3a60ee9f26d1e444b47c
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2016-12-20 (Tue, 20 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:
  -----------
  Merge pull request #901 from wesnoth/shrinking-styled-widgets

styled_widget: respect minimum size even for non-text widgets


Compare: https://github.com/wesnoth/wesnoth/compare/e02df2f21cb0...1155cb8f63a4


More information about the Commits mailing list