Skip to content

Commit

Permalink
Fixed flickering in calendar UI when views get resized.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemmermann committed Aug 31, 2022
1 parent e93d342 commit 7535d43
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,16 @@ public DayViewSkin(T view) {

loadData("initial data loading");

view.heightProperty().addListener(it -> {
InvalidationListener loadDataListener = it -> {
if (view.isScrollingEnabled()) {
// run later, or we cause flickering
Platform.runLater(() -> {
loadData("height changed");
});
}
});
view.hourHeightProperty().addListener(it -> loadData("hour height changed"));
};
view.heightProperty().addListener(loadDataListener);
view.hourHeightProperty().addListener(loadDataListener);

Rectangle clip = new Rectangle();
clip.widthProperty().bind(view.widthProperty());
Expand Down

0 comments on commit 7535d43

Please sign in to comment.