CSSTUDIO-3374 Set border of model_root in Display Editor when it is focused directly using CSS#3494
CSSTUDIO-3374 Set border of model_root in Display Editor when it is focused directly using CSS#3494abrahamwolk merged 1 commit intomasterfrom
model_root in Display Editor when it is focused directly using CSS#3494Conversation
… handler to manually add and remove a style class.
|
Looks good! |
|
How complex is your waterfall plot widget? In the scene graph, is it one image, or is it a node tree with lines, labels, rectangles, ...? |
I think it's quite complex. It's based on the https://github.com/fair-acc/chart-fx/ library, which provides a waterfall plot. E.g., it contains axes, which contain labels, etc. |
Maybe it overlaps partially with #3462 ? |
No, it doesn't overlap. |
|
A complex the scene graph will always be less performant, which is why the key plots are just images within the scene graph. But that's a separate issue, this focus border handling update is a good idea since it lessens the pain of a large scene graph. |

This pull request implements the setting of the blue border when Display Editor is focused directly using CSS instead of using an event handler to manually add and remove a style class.
The background for this pull request is that I am currently developing a new widget for Phoebus that displays a Waterfall Plot. When selecting an instance of the new Waterfall Plot Widget and then clicks on the background of the OPI (so that
model_rootis selected), the CPU usage goes constantly to over 100%. Through debugging, I have concluded that the cause is the event handler onmodel_rootthat adds and removes the CSS style class that sets the border ofmodel_rootin order to indicate that it is selected.This pull request removes the event handler and replaces it with a CSS implementation of
widget_pane:focused. I think this is an improvement over the implementation using an event handler, while it at the same time solves the performance issue I encounter.