Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple editor theme propagation errors. #39235

Closed
Tracked by #37734
bruvzg opened this issue Jun 2, 2020 · 9 comments · Fixed by #40107
Closed
Tracked by #37734

Multiple editor theme propagation errors. #39235

bruvzg opened this issue Jun 2, 2020 · 9 comments · Fixed by #40107

Comments

@bruvzg
Copy link
Member

bruvzg commented Jun 2, 2020

Godot version:

master, a8787d1

OS/device including version:

Any

Issue description:

After OS/DisplayServer split, multiple editor UI elements use default bitmap font (no scaling and latin characters only), and have missing interface icons.

Elements with the wrong font:

  • "Load errors" dialog.
  • "Description" field in the "Create new node", "Create new resource" and "Search visual script", "Visual script > Change base type", "Visual shader > Add node".
  • "Visual script" and "Visual shader" note titles.
  • Table headers in the "Project settings" > "Input map", "Localization/Remaps", "Autoload" "Plugins" - and "GDNative"
  • "Animation Tree" > "State machine" and "Blend tree" note names.
  • "Feature List" field in the "Export" > "Features"
  • Table header in the "Orphan resource explorer"
  • Table header in "Editor settings" > "Shortcuts"
  • Table headers in bottom bar "Debugger" (on multiple tabs)
  • All text in the theme preview (might be intentional or was broken before split, see The theme editor preview is tiny on hiDPI displays #25585)

File dialog icons are missing in the following dialogs:

  • All file dialogs opened from "Export"
  • All file dialogs opened from "Inspector"

Related PRs: #39123 (Tooltip font), #38917 (Some documentation fonts).

@Anutrix
Copy link
Contributor

Anutrix commented Jun 2, 2020

File dialog icons are missing in the following dialogs:

All file dialogs opened from "Export"
All file dialogs opened from "Inspector"

It seems to issue with EditorFileDialog and not EditorDialog.
Also, I am not sure if the icons for EditorFileDialog should in type "EditorIcons" or if it should be in its own type "EditorFileDialog"(like FileDialog and other stuff work).

@Anutrix

This comment has been minimized.

@Anutrix
Copy link
Contributor

Anutrix commented Jun 4, 2020

Seems like the type EditorIcons is replaced by Icons at some point.

Update:
Finally found the issue source.
EditorFileDialog uses it's ItemList's theme to get its icons (item_list->get_theme_icon("FileThumbnail", "EditorIcons")).
The problem is that ItemList uses the default_theme(which doesn't have EditorIcons type at all). EditorIcons is a type that only exists in editor_theme.

A simple way to solve it is by creating an editor_theme using create_editor_theme(get_theme()) in EditorFileDialog like how EditorNode does it. But, isn't it bad to create the whole new editor_theme instance every time an EditorFileDialog is created?
I can make a PR if this solution is fine.

@txj-mssl
Copy link

txj-mssl commented Jun 9, 2020

I hope to fix this error as soon as possible

@txj-mssl
Copy link

txj-mssl commented Jun 9, 2020

Estimated repair time?

@akien-mga
Copy link
Member

akien-mga commented Jun 9, 2020

Estimated repair time?

What's your budget? :)

I already asked you not to ask for fixes in short deadlines (unless you're willing to pay someone to do the work). This is the master branch, and breakage is normal. There are dozens of other more critical issues that also need to be fixed. That branch is not usable in production at all, so putting so much pressure on having proper internationalization of the in-editor class reference for something which is not usable in production seems a bit far-fetched.

If all you care about is having your own version of Godot fully localized, I'd suggest that you cherry-pick #37164 for your own use in the 3.2 branch, which won't be affected by this bug in the first place.

@txj-mssl
Copy link

txj-mssl commented Jun 9, 2020

I just want to know how long it will take to fix it. It's not mandatory.

@akien-mga
Copy link
Member

Well unless a contributor chooses to look into it and fix it, this will be on @reduz's shoulders as his changes created the problem. Here's currently busy with rendering work and will hopefully then move on to investigate regressions related to the DisplayServer and Window changes, so maybe within a few weeks to a month.

@Anutrix
Copy link
Contributor

Anutrix commented Jun 10, 2020

Icon issue seems to be because of a timing issue. The icons are not ready/populated when they are set during the EditorFileDialog's creation. This can be confirmed because

item_menu->add_icon_item(item_list->get_theme_icon("Reload", "EditorIcons"), TTR("Refresh"), ITEM_MENU_REFRESH, KEY_F5);
has no issues. In fact, just doing _notification(NOTIFICATION_ENTER_TREE); inside this function makes all icons appear.

reduz added a commit to reduz/godot that referenced this issue Jul 4, 2020
MarcusElg pushed a commit to MarcusElg/godot that referenced this issue Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants