From 12fcf4dae5e458df1ff869bdea7da6525f10112c Mon Sep 17 00:00:00 2001 From: Rebecca Williams Date: Fri, 3 Jul 2026 14:30:08 +0100 Subject: [PATCH] Fix bug with a rotated Label in a Group widget A translation is applied to the JFX Label to get a rotated label but the width property of the label remains unchanged and so the group pane thinks this child is wider than it should be and paints the group out to this width causing screen sizing problems. --- .../javafx/widgets/LabelRepresentation.java | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/LabelRepresentation.java b/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/LabelRepresentation.java index 3585156e5d..66b46fd532 100644 --- a/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/LabelRepresentation.java +++ b/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/LabelRepresentation.java @@ -7,6 +7,7 @@ *******************************************************************************/ package org.csstudio.display.builder.representation.javafx.widgets; +import javafx.scene.layout.Pane; import org.csstudio.display.builder.model.DirtyFlag; import org.csstudio.display.builder.model.UntypedWidgetPropertyListener; import org.csstudio.display.builder.model.WidgetProperty; @@ -32,13 +33,14 @@ * @author Kay Kasemir */ @SuppressWarnings("nls") -public class LabelRepresentation extends RegionBaseRepresentation +public class LabelRepresentation extends RegionBaseRepresentation { private final DirtyFlag dirty_style = new DirtyFlag(); private final DirtyFlag dirty_content = new DirtyFlag(); private final UntypedWidgetPropertyListener contentChangedListener = this::contentChanged; private final UntypedWidgetPropertyListener styleChangedListener = this::styleChanged; private volatile Pos pos; + private Label label; /** Was there ever any transformation applied to the jfx_node? * @@ -49,11 +51,11 @@ public class LabelRepresentation extends RegionBaseRepresentation