forked from j62/ctbrec
1
0
Fork 0

Fix: selection overlay did not show

The selection overlay did not show when a tab was opened the first time
This commit is contained in:
0xboobface 2018-12-12 18:30:50 +01:00
parent 672c133ee4
commit 5c4125c03e
1 changed files with 2 additions and 2 deletions

View File

@ -166,6 +166,8 @@ public class ThumbCell extends StackPane {
selectionOverlay = new Rectangle(); selectionOverlay = new Rectangle();
selectionOverlay.setOpacity(0); selectionOverlay.setOpacity(0);
selectionOverlay.widthProperty().bind(widthProperty());
selectionOverlay.heightProperty().bind(heightProperty());
StackPane.setAlignment(selectionOverlay, Pos.TOP_LEFT); StackPane.setAlignment(selectionOverlay, Pos.TOP_LEFT);
getChildren().add(selectionOverlay); getChildren().add(selectionOverlay);
@ -578,8 +580,6 @@ public class ThumbCell extends StackPane {
int margin = 4; int margin = 4;
topic.maxWidth(w-margin*2); topic.maxWidth(w-margin*2);
topic.setWrappingWidth(w-margin*2); topic.setWrappingWidth(w-margin*2);
selectionOverlay.setWidth(w);
selectionOverlay.setHeight(getHeight());
Rectangle clip = new Rectangle(w, h); Rectangle clip = new Rectangle(w, h);
clip.setArcWidth(10); clip.setArcWidth(10);