Skip to content

Commit

Permalink
Replace hot-key markers with initials
Browse files Browse the repository at this point in the history
Suggested in #1152 and mitigates #1499.

(cherry picked from commit 150d8c1)
  • Loading branch information
Wedge009 committed Oct 25, 2019
1 parent 630a074 commit e353493
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/gui/dialogs/preferences_dialog.cpp
Expand Up @@ -813,7 +813,9 @@ listbox& preferences_dialog::setup_hotkey_list(window& window)
hotkey_list.clear();
visible_hotkeys_.clear();

std::string text_feature_on = "<span color='#0f0'>" + _("&#9679;") + "</span>";
std::string text_game_feature_on = "<span color='#0f0'>" + _("game_initial^G") + "</span>";
std::string text_editor_feature_on = "<span color='#0f0'>" + _("editor_initial^E") + "</span>";
std::string text_title_feature_on = "<span color='#0f0'>" + _("title_initial^T") + "</span>";

for(const auto& hotkey_item : hotkey::get_hotkey_commands()) {
if(hotkey_item.hidden) {
Expand All @@ -830,11 +832,11 @@ listbox& preferences_dialog::setup_hotkey_list(window& window)
row_action = hotkey_item.description;
row_hotkey = hotkey::get_names(hotkey_item.command);

row_is_g = hotkey_item.scope[hotkey::SCOPE_GAME] ? text_feature_on : "";
row_is_g = hotkey_item.scope[hotkey::SCOPE_GAME] ? text_game_feature_on : "";
row_is_g_markup = "true";
row_is_e = hotkey_item.scope[hotkey::SCOPE_EDITOR] ? text_feature_on : "";
row_is_e = hotkey_item.scope[hotkey::SCOPE_EDITOR] ? text_editor_feature_on : "";
row_is_e_markup = "true";
row_is_t = hotkey_item.scope[hotkey::SCOPE_MAIN_MENU] ? text_feature_on : "";
row_is_t = hotkey_item.scope[hotkey::SCOPE_MAIN_MENU] ? text_title_feature_on : "";
row_is_t_markup = "true";

hotkey_list.add_row(row_data);
Expand Down

0 comments on commit e353493

Please sign in to comment.