On Thu, 15 Jan 2026 15:23:14 GMT, Andy Goryachev <[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.
>
> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/LabeledImpl.java
> line 61:
>
>> 59:
>> 60: labeledImpl.textTruncatedProperty().subscribe(v -> {
>> 61: LabeledHelper.setTextTruncated(labeled, v);
>
> should the property be bound instead?
This is going through the Accessor pattern of Labeled.
I could extend it, to return the BooleanProperty and use it.
Should i?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2040#discussion_r2694851765