Repository: godotengine/godot
File: editor/editor_themes.cpp (C++)

Code before:
	if (!p_only_thumbs) {
		for (int i = 0; i < editor_icons_count; i++) {
			Ref<ImageTexture> icon;

			if (accent_color_icons.has(editor_icons_names[i])) {
				icon = editor_generate_icon(i, EDSCALE, 1.0, accent_color_map);
			} else {
				float saturation = p_icon_saturation;
				if (saturation_exceptions.has(editor_icons_names[i])) {
					saturation = 1.0;
				}

				if (conversion_exceptions.has(editor_icons_names[i])) {
					icon = editor_generate_icon(i, EDSCALE, saturation);
				} else {
					icon = editor_generate_icon(i, EDSCALE, saturation, color_conversion_map);
				}
			}

			p_theme->set_icon(editor_icons_names[i], SNAME("EditorIcons"), icon);
		}
	}

	// Generate thumbnail icons with the given thumbnail size.
	// See editor\icons\editor_icons_builders.py for the code that determines which icons are thumbnails.
	if (p_thumb_size >= 64) {
		const float scale = (float)p_thumb_size / 64.0 * EDSCALE;
		for (int i = 0; i < editor_bg_thumbs_count; i++) {
			const int index = editor_bg_thumbs_indices[i];
			Ref<ImageTexture> icon;

			if (accent_color_icons.has(editor_icons_names[index])) {
				icon = editor_generate_icon(index, scale, 1.0, accent_color_map);
			} else {
				float saturation = p_icon_saturation;
				if (saturation_exceptions.has(editor_icons_names[index])) {
					saturation = 1.0;
				}

				if (conversion_exceptions.has(editor_icons_names[index])) {
					icon = editor_generate_icon(index, scale, saturation);
				} else {
					icon = editor_generate_icon(index, scale, saturation, color_conversion_map);
				}
			}

			p_theme->set_icon(editor_icons_names[index], SNAME("EditorIcons"), icon);
		}
	} else {
		const float scale = (float)p_thumb_size / 32.0 * EDSCALE;
		for (int i = 0; i < editor_md_thumbs_count; i++) {

Review comment (suggestion):
```suggestion
			const String &editor_icon_name = editor_icons_names[i];
```

Code after:
	saturation_exceptions.insert("Logo");

	// Accent color conversion map.
	// It is used on some icons (checkbox, radio, toggle, etc.), regardless of the dark
	// or light mode.
	HashMap<Color, Color> accent_color_map;
	HashSet<StringName> accent_color_icons;

	const Color accent_color = p_theme->get_color(SNAME("accent_color"), SNAME("Editor"));
	accent_color_map[Color::html("699ce8")] = accent_color;
	if (accent_color.get_luminance() > 0.75) {
		accent_color_map[Color::html("ffffff")] = Color(0.2, 0.2, 0.2);
	}

	accent_color_icons.insert("GuiChecked");
	accent_color_icons.insert("GuiRadioChecked");
	accent_color_icons.insert("GuiIndeterminate");
	accent_color_icons.insert("GuiToggleOn");
	accent_color_icons.insert("GuiToggleOnMirrored");
	accent_color_icons.insert("PlayOverlay");

	// Generate icons.
	if (!p_only_thumbs) {
		for (int i = 0; i < editor_icons_count; i++) {
			Ref<ImageTexture> icon;

			const String &editor_icon_name = editor_icons_names[i];
			if (accent_color_icons.has(editor_icon_name)) {
				icon = editor_generate_icon(i, get_gizmo_handle_scale(editor_icon_name), 1.0, accent_color_map);
			} else {
				float saturation = p_icon_saturation;
				if (saturation_exceptions.has(editor_icon_name)) {
					saturation = 1.0;
				}

				if (conversion_exceptions.has(editor_icon_name)) {
					icon = editor_generate_icon(i, get_gizmo_handle_scale(editor_icon_name), saturation);
				} else {
					icon = editor_generate_icon(i, get_gizmo_handle_scale(editor_icon_name), saturation, color_conversion_map);
				}
			}

			p_theme->set_icon(editor_icon_name, SNAME("EditorIcons"), icon);
		}
	}

	// Generate thumbnail icons with the given thumbnail size.
	// See editor\icons\editor_icons_builders.py for the code that determines which icons are thumbnails.
	if (p_thumb_size >= 64) {
		const float scale = (float)p_thumb_size / 64.0 * EDSCALE;
		for (int i = 0; i < editor_bg_thumbs_count; i++) {