On Tue, 24 Nov 2020 00:09:03 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java >> line 1618: >> >>> 1616: } >>> 1617: } >>> 1618: g.setClip(clip); >> >> Since it is normally seen in Metal L&F, shouldn't we do the clip setting in >> MetalSliderUI.paintThumb() instead? >> If we are doing it in BasicSliderUI, can you please explain why are we not >> seeing it in other L&Fs like nimbus or motif? > > The bug in the motif was fixed by the JDK-8032219, the code in the > BasicSliderUI is never used by the Metal L&F, I tested that code by the > commented out the overridden code in the MetalSliderUI. If the code in BasicSliderUI is not used by Metal L&F, then, all the more reason to have the clip setting in MetalSliderUI.paintThumb(), no? What about nimbus? Why it is not seen in nimbus l&f? I guess only reason I can think of putting the code in BasicL&F is if it's a generic issue and it will solve multiple L&F but it seems the issue only affects MetalL&F. ------------- PR: https://git.openjdk.java.net/jdk/pull/1373