On Thu, 15 Jan 2026 21:02:04 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.
>
> Florian Kirmaier has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   JDK-8375444
>   Removed unnecessary newline

modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/LabeledImpl.java
 line 110:

> 108:                 //System.out.println("Text Model");
> 109:                 labeledImpl.setText(labeled.getText());
> 110:                 //System.out.println(" is truncated: " + 
> labeled.isTextTruncated());

Please remove all of the commented-out code here.

modules/javafx.controls/src/test/java/test/javafx/scene/control/LabeledTruncatedTest.java
 line 49:

> 47: import java.util.function.Supplier;
> 48: 
> 49: import javafx.stage.Stage;

I know that we don't specify import order, but keeping similar imports grouped 
is easier on the eyes...

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/2040#discussion_r2701328458
PR Review Comment: https://git.openjdk.org/jfx/pull/2040#discussion_r2701329404

Reply via email to