Skip to content

Commit

Permalink
Various changes here and there :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemmermann committed Sep 2, 2024
1 parent 846641e commit 7c39723
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import javafx.scene.control.Label;
import javafx.scene.control.ToggleGroup;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseButton;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
Expand Down Expand Up @@ -174,9 +175,11 @@ private CustomToggleButton createButton(String text, Ikon icon, String path) {
button.setGraphic(new FontIcon(icon));
button.setMaxWidth(Double.MAX_VALUE);
button.setUserData(path);
button.setOnMousePressed(evt -> {
MobileHomePage.getInstance().setContentType(MobileHomePage.ContentType.NORMAL);
MobileLinkUtil.getToPage(path);
button.setOnMouseClicked(evt -> {
if (evt.getButton().equals(MouseButton.PRIMARY) && evt.isStillSincePress()) {
MobileHomePage.getInstance().setContentType(MobileHomePage.ContentType.NORMAL);
MobileLinkUtil.getToPage(path);
}
});
toggleGroup.getToggles().add(button);
return button;
Expand Down

0 comments on commit 7c39723

Please sign in to comment.