Skip to content

Commit

Permalink
Fix the error where button 1 is displayed, button 2 is hidden, but th…
Browse files Browse the repository at this point in the history
…e Separator between button 1 and button 2 is shown.
  • Loading branch information
leewyatt committed Sep 15, 2023
1 parent 58cefb6 commit 12dfd01
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ public TileView(T item) {
button1.managedProperty().bind(button1.visibleProperty());
button1.visibleProperty().bind(button1TextProperty().isNotEmpty().or(button1GraphicProperty().isNotNull()));

Separator separator1 = new Separator(Orientation.VERTICAL);
separator1.managedProperty().bind(button1.visibleProperty());
separator1.visibleProperty().bind(button1.visibleProperty());

button2 = new Button();
button2.setFocusTraversable(false);
button2.getStyleClass().addAll("bg-transparent-button", "button2");
Expand All @@ -121,6 +117,10 @@ public TileView(T item) {
button2.managedProperty().bind(button2.visibleProperty());
button2.visibleProperty().bind(button2TextProperty().isNotEmpty().or(button2GraphicProperty().isNotNull()));

Separator separator1 = new Separator(Orientation.VERTICAL);
separator1.managedProperty().bind(button1.visibleProperty());
separator1.visibleProperty().bind(button1.visibleProperty().and(button2.visibleProperty()));

Separator separator2 = new Separator(Orientation.VERTICAL);
separator2.managedProperty().bind(button2.visibleProperty());
separator2.visibleProperty().bind(button2.visibleProperty());
Expand Down

0 comments on commit 12dfd01

Please sign in to comment.