Skip to content

Commit d6812f5

Browse files
authored
Merge pull request #3494 from ControlSystemStudio/CSSTUDIO-3374
CSSTUDIO-3374 Set border of `model_root` in Display Editor when it is focused directly using CSS
2 parents c48f7cc + bb6fb39 commit d6812f5

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

app/display/editor/src/main/java/org/csstudio/display/builder/editor/DisplayEditor.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public DisplayEditor(final JFXRepresentation toolkit, final int stack_size)
199199
public Parent create ()
200200
{
201201
model_root = toolkit.createModelRoot();
202-
model_root.getStyleClass().add("widget_pane_unfocused");
202+
model_root.getStyleClass().add("widget_pane");
203203
autoScrollHandler = new AutoScrollHandler(model_root);
204204

205205
final Group scroll_body = (Group) model_root.getContent();
@@ -225,13 +225,6 @@ public Parent create ()
225225
setSnap(prefs.getBoolean(SNAP_WIDGETS, true));
226226
setCoords(prefs.getBoolean(SHOW_COORDS, true));
227227

228-
model_root.focusedProperty().addListener((observableValue, aBoolean, focused) -> {
229-
if (focused) {
230-
model_root.getStyleClass().add("widget_pane_focused");
231-
} else {
232-
model_root.getStyleClass().remove("widget_pane_focused");
233-
}
234-
});
235228
return root;
236229
}
237230

app/display/editor/src/main/resources/org/csstudio/display/builder/editor/opieditor.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@
180180
-fx-snap-to-pixel: false
181181
}
182182

183-
.widget_pane_unfocused{
183+
.widget_pane{
184184
-fx-border-color: #F4F4F4;
185185
}
186186

187-
.widget_pane_focused{
187+
.widget_pane:focused{
188188
-fx-border-color: #00A0D8;
189189
}
190190

0 commit comments

Comments
 (0)