1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Update icons when theme changed

This commit is contained in:
Poommetee Ketson
2018-02-25 23:04:16 +07:00
parent 08584b7e22
commit 2de1dfa42f
16 changed files with 117 additions and 41 deletions

View File

@@ -48,6 +48,20 @@ void TileMapEditor::_notification(int p_what) {
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
bool new_show_tile_info = EditorSettings::get_singleton()->get("editors/tile_map/show_tile_info_on_hover");
if (new_show_tile_info != show_tile_info) {
show_tile_info = new_show_tile_info;
tile_info->set_visible(show_tile_info);
}
if (is_visible_in_tree()) {
_update_palette();
}
} // fallthrough
case NOTIFICATION_ENTER_TREE: {
transp->set_icon(get_icon("Transpose", "EditorIcons"));
@@ -61,19 +75,6 @@ void TileMapEditor::_notification(int p_what) {
search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
bool new_show_tile_info = EditorSettings::get_singleton()->get("editors/tile_map/show_tile_info_on_hover");
if (new_show_tile_info != show_tile_info) {
show_tile_info = new_show_tile_info;
tile_info->set_visible(show_tile_info);
}
if (is_visible_in_tree()) {
_update_palette();
}
} break;
}
}