On Wed, 24 Aug 2022 04:21:26 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> SplitPaneDivider.draggingColor UIProperty was not honoured in Nimbus L&F. >> Added support for setting SplitPane dragging color for Nimbus L&F by drawing >> a fillRect of the set color as done in BasicLookAndFeel. >> The fix relies on `continuousLayout` property being false by default which >> is enabled for Nimbus, which is set to default false now, same as in other >> L&F. I think it was set true just to have documented default value in >> JDK-6937415 >> >> closed test mentioned in JBS is used for fix check. >> All jtreg swing tests are ok along with SwingSet2 JSplitPane demo in Nimbus >> L&F. > > Prasanta Sadhukhan has updated the pull request incrementally with one > additional commit since the last revision: > > Revert default value src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java line 275: > 273: Dimension size = splitPane.getSize(); > 274: > 275: g.setColor(dividerDraggingColor); What if `dividerDraggingColor` is null? src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java line 281: > 279: g.fillRect(0, 0, size.width - 1, dividerSize - > 1); > 280: } > 281: } This piece of code is basically same as the code in `finishedPaintingChildren`. Can the duplication be eliminated by introducing a helper method? ------------- PR: https://git.openjdk.org/jdk/pull/9937