Skip to content

add generic fallback if the WidgetFontStyle name is unknown - #3934

Merged
georgweiss merged 2 commits into
masterfrom
font_fallback
Sep 22, 2026
Merged

georgweiss merged 2 commits into
masterfrom
font_fallback

Conversation

@lcaouen

@lcaouen lcaouen commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

If a display where a widget has selected one of the new styles is loaded into a version of Phoebus where this is not supported, the editor will show an error dialog and the widget will be highlighted. To avoid this issue, a generic fallback has been added to check if the WidgetFontStyle name is unknown.
This PR will help adding the new underline style in the future (#3927)

Checklist

  • Testing:
    • Created a bob file with a new (and unknown) style : UNDERLINE
    • Before this commit, the editor shows an error dialog and the widget is highlighted
    • After this commit, the REGULAR style is selected by default and only an error is logged in the console (no error dialog)

@georgweiss georgweiss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but maybe the debug log should include the name argument, e.g.

log(Level.WARNING, "Cannot find WidgetFontStyle " + name, e)

@georgweiss
georgweiss merged commit e7c7241 into master Sep 22, 2026
4 of 5 checks passed
@sonarqubecloud

Copy link
Copy Markdown

@shroffk
shroffk deleted the font_fallback branch September 22, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants