Skip to content

Commit

Permalink
feat: made it so that logosection when clicked sends user to Homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
emilfa committed Mar 10, 2026
1 parent df5a249 commit eb54636
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/edu/group5/app/view/Header.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Header extends BorderPane {

public Header(HeaderController controller) {
this.controller = controller;
getStylesheets().add(getClass().getResource("/homepage/header.css").toExternalForm());
getStylesheets().add(getClass().getResource("/header/header.css").toExternalForm());
setId("header");

setLeft(getLogoSection());
Expand All @@ -24,11 +24,11 @@ private StackPane getLogoSection() {
StackPane logoSection = new StackPane();
logoSection.setId("logo-section");
logoSection.setAlignment(Pos.CENTER);
logoSection.setOnMouseClicked(e -> System.out.println("logoSection"));
logoSection.setOnMouseClicked(e -> controller.handleHomeBtn());
logoSection.setStyle("-fx-cursor: hand;");

ImageView logo = new ImageView(
new Image(getClass().getResource("/homepage/hmh-logo.png").toExternalForm())
new Image(getClass().getResource("/header/images/hmh-logo.png").toExternalForm())
);
logo.setFitHeight(60);
logo.setPreserveRatio(true);
Expand Down Expand Up @@ -67,7 +67,7 @@ private StackPane getProfileSection() {
profileSection.setStyle("-fx-cursor: hand;");

ImageView avatar = new ImageView(
new Image(getClass().getResource("/homepage/avatar.png").toExternalForm())
new Image(getClass().getResource("/header/images/avatar.png").toExternalForm())
);
avatar.setFitHeight(60);
avatar.setPreserveRatio(true);
Expand Down

0 comments on commit eb54636

Please sign in to comment.