Skip to content

Commit

Permalink
Add width computation methods to InnerListViewSkin
Browse files Browse the repository at this point in the history
Implemented `computeMinWidth`, `computePrefWidth`, and `computeMaxWidth` methods to calculate the width based on insets and the loading pane. This ensures consistency with height computation and improves layout handling for the skin.
  • Loading branch information
dlemmermann committed Dec 13, 2024
1 parent 6ac0996 commit 0f5c441
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions gemsfx/src/main/java/com/dlsc/gemsfx/skins/InnerListViewSkin.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,19 @@ protected double computePrefHeight(double width, double topInset, double rightIn
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
return loadingPane.maxHeight(width) + topInset + bottomInset;
}

@Override
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
return loadingPane.minWidth(height) + leftInset + rightInset;
}

@Override
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
return loadingPane.prefWidth(height) + leftInset + rightInset;
}

@Override
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
return loadingPane.maxWidth(height) + leftInset + rightInset;
}
}

0 comments on commit 0f5c441

Please sign in to comment.