[wesnoth-commits] [wesnoth/wesnoth] 2b9c7b: GUI2/Canvas: allow formula values for [text] font_...
GitHub
noreply at github.com
Mon Mar 26 01:13:08 UTC 2018
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 2b9c7b1abd7f881953552dac49d68f2aa5cf2525
https://github.com/wesnoth/wesnoth/commit/2b9c7b1abd7f881953552dac49d68f2aa5cf2525
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-26 (Mon, 26 Mar 2018)
Changed paths:
M data/gui/schema.cfg
M src/gui/core/canvas.cpp
M src/gui/core/canvas_private.hpp
Log Message:
-----------
GUI2/Canvas: allow formula values for [text] font_size=
Commit: db5abb7e637fd87699fce49a9543faafc3f58068
https://github.com/wesnoth/wesnoth/commit/db5abb7e637fd87699fce49a9543faafc3f58068
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-26 (Mon, 26 Mar 2018)
Changed paths:
M data/gui/macros/_initial.cfg
M data/gui/schema.cfg
M data/gui/widget/text_box_default.cfg
M data/gui/window/addon_manager.cfg
M data/gui/window/chat_log.cfg
M data/gui/window/game_load.cfg
M data/gui/window/lobby_main.cfg
M data/gui/window/mp_create_game.cfg
M data/gui/window/unit_create.cfg
M data/gui/window/unit_recall.cfg
M src/gui/widgets/text_box.cpp
M src/gui/widgets/text_box.hpp
Log Message:
-----------
GUI2/Text Box: refactored hint text interface
Previously, I had implemented the hint text ("Search)" and image (the magnifying glass)
as a custom text box definition. This caused some problems, though. Since the string was
hard-coded as part of a WFL formula, it couldn't be translated (see #2709 and #2732). It
also wasn't expandable to any other usecase.
Instead, I've added two new hint_text= and hint_image= keys to [text_box], wrapped the
"Search" text and magnifying image path in a helper macro, and refactored the default
definition to display the hint text and image when appropriate.
This also fixes a minor issue where selected text wouldn't remain highlighted when the
box wasn't focused when using the filter definition (it did with the default one).
This should fix the untranslatable "Search" text issue mentioned in both issues above.
The new string is in the wesnoth-lib textdomain.
Compare: https://github.com/wesnoth/wesnoth/compare/229d2f04831f...db5abb7e637f
More information about the Commits
mailing list