SomeSourceCode / SomeGuiApi

A Paper API to create interactable GUIs using Minecraft Inventories, ...
MIT License
1 stars 0 forks source link

FlowPane wraps too early with padding #1

Closed SomeSourceCode closed 3 months ago

SomeSourceCode commented 3 months ago

Description

When using the FlowPane layout with padding set, it wraps elements too early in following scenarios:

  1. The left padding of a horizontal FlowPane's is set.
  2. The top padding of a vertical FlowPane's is set.

The results in unintended wrapping behavior and affects the layout of elements within the FlowPane.

Potential Fix

The issue is probably that the x / y value is added to the run length when compared with the wrap length: https://github.com/SomeSourceCode/SomeGuiApi/blob/85cfe6f6bf5c3212781217712936c0a4514f28c7/src/main/java/io/github/somesourcecode/someguiapi/scene/pane/FlowPane.java#L202