On Mon, 6 Feb 2023 08:48:01 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

>> src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableUI.java line 
>> 234:
>> 
>>> 232:         }
>>> 233:         SynthContext context = getContext(table, ENABLED);
>>> 234:         if (showHorizLines) {
>> 
>> I think we should make this condition tighter to avoid unnecessary repaints 
>> like in GTK LAF.
>> Like only when current property is false and we expect it to be true and 
>> then only call setShowHorizontal/VerticalLines()
>
> I am not sure what you meant..
> uninstallDefaults will be called only once during L&F transition from Nimbus 
> to other L&F and
>  it will set horizontal and vertical lines only if it was set in other L&F 
> before Nimbus L&F takes effect..
> If other L&F did not have those set, it will not call 
> setShowHorizontal/VerticalLines()

Will uninstallDefaults() be called for GTK -> other LAF transition?
I was thinking SynthTableUI is common for all SynthLAF's and if we are 
transitioning from GTK -> Other LAF's there is no need to call 
setShowHorizontal/VerticalLines(). Because as mentioned in description only 
Nimbus LAF will have "showGrid" as false and for GTK we will not be calling 
`table.setShowGrid(false);`

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

PR: https://git.openjdk.org/jdk/pull/12385

Reply via email to