You've already forked godot
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user