Skip to content

Fix icons colors for files and directories at light color preset#116641

Open
Scrawach wants to merge 1 commit intogodotengine:masterfrom
Scrawach:fix-file-dialog-folder-colors
Open

Fix icons colors for files and directories at light color preset#116641
Scrawach wants to merge 1 commit intogodotengine:masterfrom
Scrawach:fix-file-dialog-folder-colors

Conversation

@Scrawach
Copy link
Contributor

Before After
before after

After #111212 some icons are been lost for EditorFileDialog. It seems there are several similar icons, but in different colors. Because of this, they handle color differently. As a result, you can see that in light theme darkens red folder (in 4.5 too).

@AdriaandeJongh
Copy link
Contributor

… but now the red folder is brown :P

@Scrawach
Copy link
Contributor Author

Scrawach commented Feb 23, 2026

Yep, but it was like this in previous versions too. It's just regression fix. I've also been thinking about fixing this, but it's hard for me to predict what it will affect. And, perhaps, it's supposed to work that way :D

One of the possible solutions. It's required this code changes in themes:

//p_theme->set_icon("folder_thumbnail", "FileDialog", p_theme->get_icon("FolderBigThumb", EditorStringName(EditorIcons)));
p_theme->set_color("folder_icon_color", "FileDialog", (Color(1, 1, 1)).lerp(p_config.accent_color, 0.7));

As result:
result

But it's required paint Folder.svg (editor\icons\Folder.svg) to white color, because file dock icons use this icons and folder_icon_color together. Yes, it's a bit confusing right now because of the different colors of similar icons.

But it's another issue with that:

issue

@Scrawach
Copy link
Contributor Author

Another solution would be to multiply folders color by a constant, as it's done in other places. But the red color will still be darker here.

In EditorFileDialog:

Color EditorFileDialog::_get_folder_color(const String &p_path) const {
	Color default_color = FileDialog::_get_folder_color(p_path);
	Color folder_color = FileSystemDock::get_dir_icon_color(p_path, default_color);

	if (!EditorThemeManager::is_dark_icon_and_font() && folder_color != default_color) {
		folder_color *= FileSystemDock::ITEM_COLOR_SCALE;
	}

	return folder_color;
}
trying_fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[4.6.1-stable] Icons for files and directories in the file browser have messed up colors when you use the light color preset

3 participants