On Thu, 15 Jan 2026 15:04:13 GMT, Florian Kirmaier <[email protected]> wrote:
> For MenuButton and SplitMenuButton the textTruncated Property is always false > - but the text is correctly rendered truncated if it is to long. > > This PR fixes it, by extending the logic in LabeledImpl - to always forward > this property. > I've also extended the existing tests for the truncated property. > > It would be great, to get some feedback on how i fixes the bug. Behaves as expected, the implementation looks good (thanks to `Subscription`). Minor comments, will re-approve if you make changes. For reviewers: added "text truncated" indicator to all controls that extend Labeled, grab the latest here: https://github.com/andy-goryachev-oracle/MonkeyTest modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/LabeledImpl.java line 64: > 62: }); > 63: > 64: extra newline? modules/javafx.controls/src/test/java/test/javafx/scene/control/LabeledTruncatedTest.java line 29: > 27: import static org.junit.jupiter.api.Assertions.assertFalse; > 28: import static org.junit.jupiter.api.Assertions.assertTrue; > 29: please change the copyright year * Copyright (c) 2024, 2026, Oracle and/or its affiliates. All rights reserved. modules/javafx.controls/src/test/java/test/javafx/scene/control/LabeledTruncatedTest.java line 100: > 98: testTextProperty(fun.get()); > 99: } > 100: extra newline? modules/javafx.controls/src/test/java/test/javafx/scene/control/LabeledTruncatedTest.java line 177: > 175: > 176: assertFalse(control.isTextTruncated()); > 177: extra newline? ------------- Marked as reviewed by angorya (Reviewer). PR Review: https://git.openjdk.org/jfx/pull/2040#pullrequestreview-3666580782 PR Review Comment: https://git.openjdk.org/jfx/pull/2040#discussion_r2695193713 PR Review Comment: https://git.openjdk.org/jfx/pull/2040#discussion_r2695156919 PR Review Comment: https://git.openjdk.org/jfx/pull/2040#discussion_r2695154196 PR Review Comment: https://git.openjdk.org/jfx/pull/2040#discussion_r2695153262
