Skip to content

Add underline style font - #3927

Open
lcaouen wants to merge 1 commit into
ControlSystemStudio:masterfrom
lcaouen:add-underline-style-to-font
Open

lcaouen wants to merge 1 commit into
ControlSystemStudio:masterfrom
lcaouen:add-underline-style-to-font

Conversation

@lcaouen

@lcaouen lcaouen commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Add the underline style font to some widgets.

List of the widgets concerned by this PR :

  • ActionButtonRepresentation
  • BaseLEDRepresentation
  • BoolButtonRepresentation
  • CheckBoxRepresentation
  • ChoiceButtonRepresentation
  • LabelRepresentation
  • RadioRepresentation
  • SlideButtonRepresentation
  • TextSymbolRepresentation
  • TextUpdateRepresentation

Testing has been done manually by checking the widgets in a bob file.

image

add underline style font

fix end of file

trim trailing whitespace

trim trailing whitespace
@sonarqubecloud

Copy link
Copy Markdown

@georgweiss

Copy link
Copy Markdown
Collaborator

I think this looks OK.
@shroffk, any reason to not merge?

@georgweiss

Copy link
Copy Markdown
Collaborator

@lcaouen, I spotted a potential issue...

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 as problematic, see below.

Maybe we should consider a fallback, i.e. if the style cannot be found, fallback to WidgetFontStyle.REGULAR, and maybe just log the problem.

Screenshot 2026-09-18 at 14 39 34
java.lang.IllegalArgumentException: No enum constant org.csstudio.display.builder.model.properties.WidgetFontStyle.
	at java.base/java.lang.Enum.valueOf(Enum.java:293)
	at org.csstudio.display.builder.model.properties.WidgetFontStyle.valueOf(WidgetFontStyle.java:15)
	at org.csstudio.display.builder.model.properties.FontWidgetProperty.readFromXML(FontWidgetProperty.java:102)
	at org.csstudio.display.builder.model.WidgetConfigurator.configureAllPropertiesFromMatchingXML(WidgetConfigurator.java:136)
	at org.csstudio.display.builder.model.WidgetConfigurator.configureFromXML(WidgetConfigurator.java:104)
	at org.csstudio.display.builder.model.widgets.ActionButtonWidget$ActionButtonConfigurator.configureFromXML(ActionButtonWidget.java:181)
	at org.csstudio.display.builder.model.persist.ModelReader.createWidget(ModelReader.java:326)
	at org.csstudio.display.builder.model.persist.ModelReader.readWidget(ModelReader.java:298)

@shroffk

shroffk commented Sep 18, 2026

Copy link
Copy Markdown
Member

Maybe we should consider a fallback, i.e. if the style cannot be found, fallback to WidgetFontStyle.REGULAR, and maybe just log the problem.

+1
I think we should add the fallback

Other than that I think this is a good addition

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.

3 participants