Skip to content

Commit

Permalink
chore: Scaling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelsa committed May 13, 2026
1 parent 989d98d commit 6830e37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public void createUIComponents() {
navigation = new VBox();
navigation.setMaxHeight(Double.MAX_VALUE);
navigation.getStyleClass().add("dark");
navigation.setMaxWidth(200);
navigation.setPrefWidth(150); // ScrollPane's affect this massively
navigation.setMaxWidth(150);
navigation.setMinWidth(150);

header = new HBox();
header.getStyleClass().add("light");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
package edu.ntnu.idi.idatt.view.primary.stock;

import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Collectors;

import edu.ntnu.idi.idatt.model.portfolio.Share;
import edu.ntnu.idi.idatt.service.transaction.SaleCalculator;
import edu.ntnu.idi.idatt.session.UserSession;
import edu.ntnu.idi.idatt.view.SceneFactory;
import edu.ntnu.idi.idatt.view.SceneManager;
import edu.ntnu.idi.idatt.view.components.AbstractViewUI;
Expand Down Expand Up @@ -84,9 +78,10 @@ public Parent createContent() {

.wrap(new VBox())
.properties((wrapper) -> wrapper.setPadding(new Insets(20)))
.properties((wrapper) -> wrapper.setMaxWidth(400))
.addContent(buyInputField = new TextField())
.addContent(buyPrice = new TextValueComponent("Price: "))
.addContent(buyCost = new TextValueComponent("Where taxes and commision: "))
.addContent(buyCost = new TextValueComponent("Taxes & commision: "))
.addContent(totalPrice = new TextValueComponent("Total: "))
.unwrap()
.addContent(resultMessage = new TextValueComponent(""))
Expand Down Expand Up @@ -123,7 +118,7 @@ public Parent createMenu() {
return UIFactory.createMenu("Account",
List.of(" • Portfolio", " • Transactions"),
() -> System.out.println("Portfolio clicked!"),
() -> System.out.println("Transaction clicked!"));
() -> SceneManager.switchTo(SceneFactory.createTransactionView()));

}

Expand Down

0 comments on commit 6830e37

Please sign in to comment.