[Commits] [wesnoth/wesnoth] 22d3bc: fixup help: if two lines of unit traits, don't use...

GitHub noreply at github.com
Thu Jul 17 23:42:24 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 22d3bc03ab3aedd2a1dc911907553f19ab5d89fd
      https://github.com/wesnoth/wesnoth/commit/22d3bc03ab3aedd2a1dc911907553f19ab5d89fd
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-07-17 (Thu, 17 Jul 2014)

  Changed paths:
    M src/help.cpp

  Log Message:
  -----------
  fixup help: if two lines of unit traits, don't use three lines

This commit adds the code which figures out how to add proper
spacing to preserve the desired alignment, accounting for not
using a fixed width font.


  Commit: b7a8b5349349d0aab4a71c5887a37a5411c6fc44
      https://github.com/wesnoth/wesnoth/commit/b7a8b5349349d0aab4a71c5887a37a5411c6fc44
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-07-17 (Thu, 17 Jul 2014)

  Changed paths:
    M src/help.cpp

  Log Message:
  -----------
  fixup traits in help: when two lines used, align the : characters

This fixes up the previous commit, so that even if the numbers of
traits to be assigned from each group are different, the :'s will
end up aligned, by measuring the font-width of the entire rendered
first line label, and subtracting the amount due to the number to
appear in the second part, and assigning this much whitespace.


Compare: https://github.com/wesnoth/wesnoth/compare/c39fdae48622...b7a8b5349349


More information about the Commits mailing list