RFR: 8328577: Toolbar's overflow button overlaps the items [v6]

Andy Goryachev angorya at openjdk.org
Mon Apr 15 15:57:00 UTC 2024


On Mon, 15 Apr 2024 15:41:19 GMT, eduardsdv <duke at openjdk.org> wrote:

>> This change fixes the calculation of which nodes go to the toolbar and which go to the overflow menu.
>> It is now determined before the nodes are removed from the scene graph.
>> This is important because the values returned by ``Node.prefWidth(..)``/``Node.prefHeight(..)`` may depend on whether the node is added to the scene graph.
>> 
>> Furthermore I corrected the ``hasOveflow`` value passed to the ``organizeOverflow(double, boolean)`` in ``correctOverflow(double)``.
>
> eduardsdv has updated the pull request incrementally with one additional commit since the last revision:
> 
>   JDK-8328577: Refactor and fix binding of style related properties

modules/javafx.controls/src/main/java/javafx/scene/control/skin/ToolBarSkin.java line 575:

> 573:         Bindings.bindContent(overflowBox.getStyleClass(), box.getStyleClass());
> 574:         Bindings.bindContent(overflowBox.getStylesheets(), box.getStylesheets());
> 575:         box.getPseudoClassStates().addListener((SetChangeListener<? super PseudoClass>) change -> {

you can also use Bindings.bindContent(Set,ObservableSet)

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1434#discussion_r1566011508


More information about the openjfx-dev mailing list