Skip to content

Commit

Permalink
Fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
IzN432 committed Oct 21, 2024
1 parent 340732f commit 8888a5e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/main/java/keycontacts/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
*/
public class MainWindow extends UiPart<Stage> {

// TODO Abstract out the binder into its own class
private static final double ARC_RADIUS_X = 8.0;
private static final double ARC_RADIUS_Y = 6.0;
private static final double ARC_LENGTH = 260.0;
private static final double ARC_START_ANGLE = -40.0;

private static final String FXML = "Notebook.fxml";

private final Logger logger = LogsCenter.getLogger(getClass());
Expand Down Expand Up @@ -66,11 +72,6 @@ public class MainWindow extends UiPart<Stage> {
@FXML
private StackPane statusbarPlaceholder;

private static final double ARC_RADIUS_X = 8.0;
private static final double ARC_RADIUS_Y = 6.0;
private static final double ARC_LENGTH = 260.0;
private static final double ARC_START_ANGLE = -40.0;

/**
* Creates a {@code MainWindow} with the given {@code Stage} and {@code Logic}.
*/
Expand Down Expand Up @@ -100,13 +101,10 @@ public MainWindow(Stage primaryStage, Logic logic) {
}

private void updateArcs(double height) {
// Clear previous arcs
loopParent.getChildren().clear();

// Dynamically decide how many arcs to add based on the height (as an example)
int numArcs = (int) (height / (ARC_RADIUS_Y * 2 + loopParent.getSpacing())) - 5; // You can change this logic
int numArcs = (int) (height / (ARC_RADIUS_Y * 2 + loopParent.getSpacing())) - 5;

// Add the arcs dynamically
addArcs(numArcs);
}

Expand Down

0 comments on commit 8888a5e

Please sign in to comment.