[wesnoth-commits] [wesnoth/wesnoth] 718878: GUI2: made link_aware a per-instance config option...

Charles Dang noreply at github.com
Fri Dec 11 16:04:00 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 7188781f914f2d2dbcd3c269a03ca5337c19714a
      https://github.com/wesnoth/wesnoth/commit/7188781f914f2d2dbcd3c269a03ca5337c19714a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2020-12-12 (Sat, 12 Dec 2020)

  Changed paths:
    M changelog.md
    M data/gui/widget/chatbox.cfg
    M data/gui/widget/label_default.cfg
    M data/gui/widget/label_story_screen_title.cfg
    M data/gui/window/addon_license_prompt.cfg
    M data/gui/window/addon_manager.cfg
    M data/gui/window/campaign_dialog.cfg
    M data/gui/window/server_info.cfg
    M src/gui/widgets/label.cpp
    M src/gui/widgets/label.hpp
    M src/gui/widgets/scroll_label.cpp
    M src/gui/widgets/scroll_label.hpp

  Log Message:
  -----------
  GUI2: made link_aware a per-instance config option rather than per-definition

Back when link awareness was first added (https://github.com/wesnoth/wesnoth/pull/300), this key was added
globally to label definitions alongside link_color. This had the unintended side effect of making *all* labels
link aware, leading to issues such as being able to open a do-you-want-to-open prompt from an instance of the
same ad-infinitum.

This became an active issue after 213453e6cf78371360471ac4d110602aafecd9f3, since now that labels could capture
focus if link_aware was true - which it always was for most labels - labels in toggle panels would always
grab mouse_motion events and no longer allow their parent toggle panels to gain their hovered states. That
appears to be in keeping with the design of GUI2, and a further evaluation of that issue is needed at a later
time. However, the fact remains that almost every single label was marked as link-aware, even when in almost every
case that was not the desired behavior.

This change move the link_aware config option to individual label and scroll_label instances. The following uses
had this explicitly enabled:

- Addon license prompt
- Addon descriptions
- Campaign descriptions
- The Server Info popup
- The chatbox





More information about the Commits mailing list