Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToolBarFlowPane does not wrap anymore in v11.1.4 #163

Open
Tracked by #527
dedeibel opened this issue Apr 24, 2020 · 4 comments
Open
Tracked by #527

ToolBarFlowPane does not wrap anymore in v11.1.4 #163

dedeibel opened this issue Apr 24, 2020 · 4 comments
Labels
bug:minor workaround possible
Milestone

Comments

@dedeibel
Copy link
Contributor

It seems like ToolBarFlowPane does not wrap plugin icons anymore if the space becomes to small. At some point the height increases but the icons remain in the first row.

It works if I remove the changed line 82 form adjustToolBarWidth in ToolBarFlowPane.java.

this.setWidth(length);

RalphSteinhagen added a commit that referenced this issue Apr 24, 2020
Bug reported by Benjamin Peters (@dedeibel) see #163
N.B. in combination with StackPane (ie not managed), the FlowPane does
not automatically wrap the children. Forced the behaviour by explicitly
setting the width, height and preferred wrapping widht of the FlowPane.
Shape does not scale consistently (some Schmidt-trigger like behaviour
... intrinsic to JavaFX layout manager???)
At least it wraps now ... so we leave it at that.
RalphSteinhagen added a commit that referenced this issue Apr 24, 2020
Bug reported by Benjamin Peters (@dedeibel) see #163
N.B. in combination with StackPane (ie not managed), the FlowPane does
not automatically wrap the children. Forced the behaviour by explicitly
setting the width, height and preferred wrapping widht of the FlowPane.
Shape does not scale consistently (some Schmidt-trigger like behaviour
... intrinsic to JavaFX layout manager???)
At least it wraps now ... so we leave it at that.
@RalphSteinhagen
Copy link
Member

@dedeibel It seems to be a JavaFX layout bug of FlowPane in a combination of being embedded in a StackPane. Removing the setWidth(length) made it worse as the toolbar unnecessarily maximized to the full chart width.

Added a workaround of forcing specific width, height and preferred wrapping width.
Not ideal... but should do for now. Will re-check once we move to a newer JavaFX version.

Fix is now in the PR #164 and will be merged as soon as it is cross-checked.

RalphSteinhagen added a commit that referenced this issue Apr 26, 2020
Bug reported by Benjamin Peters (@dedeibel) see #163
N.B. in combination with StackPane (ie not managed), the FlowPane does
not automatically wrap the children. Forced the behaviour by explicitly
setting the width, height and preferred wrapping widht of the FlowPane.
Shape does not scale consistently (some Schmidt-trigger like behaviour
... intrinsic to JavaFX layout manager???)
At least it wraps now ... so we leave it at that.
@RalphSteinhagen
Copy link
Member

@dedeibel is your problem solved with this patch?

@dedeibel
Copy link
Contributor Author

dedeibel commented May 4, 2020

@RalphSteinhagen unfortunately there seems to be a problem at some point of the wrapping – some elements are wrapped before the second line is established.

chart-fx-master-20200504-tb-pane

Not sure how critical this is but it also seems new to me.

@RalphSteinhagen
Copy link
Member

Hi @dedeibel, as mentioned above this seems to be a JavaFX feature: FlowPane inside StackPane (via JavaFX/ControlsFX Skin) that does not allow automatically managing the size of its children.

The commit a94e115 is merely workaround for one of the symptoms but leaves the known -- albeit less likely -- side-effect you also mentioned.

Unfortunately, I do not see any easy option of fixing this from an FX-user perspective w/o substantially rewriting StackPane and/or the JavaFX Skinning feature infrastructure.

@wirew0rm wirew0rm added the bug:minor workaround possible label Sep 9, 2020
@wirew0rm wirew0rm mentioned this issue Jun 28, 2022
27 tasks
@wirew0rm wirew0rm added this to the chartfx 11.3 milestone Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:minor workaround possible
Projects
None yet
Development

No branches or pull requests

3 participants