mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 22:40:53 +03:00
Merge PR #790: Table header background is never restored after hover when the renderer background is null
This commit is contained in:
11
CHANGELOG.md
11
CHANGELOG.md
@@ -33,10 +33,13 @@ FlatLaf Change Log
|
|||||||
- Fixed background of `boolean` columns when using alternating row colors.
|
- Fixed background of `boolean` columns when using alternating row colors.
|
||||||
(issue #780)
|
(issue #780)
|
||||||
- Fixed border arc of components in complex table cell editors. (issue #786)
|
- Fixed border arc of components in complex table cell editors. (issue #786)
|
||||||
- TableHeader: No longer temporary replace header cell renderer while painting.
|
- TableHeader:
|
||||||
This avoids a `StackOverflowError` in case that custom renderer does this too.
|
- No longer temporary replace header cell renderer while painting. This avoids
|
||||||
(see [NetBeans issue #6835](https://github.com/apache/netbeans/issues/6835))
|
a `StackOverflowError` in case that custom renderer does this too. (see
|
||||||
This also improves compatibility with custom table header implementations.
|
[NetBeans issue #6835](https://github.com/apache/netbeans/issues/6835)) This
|
||||||
|
also improves compatibility with custom table header implementations.
|
||||||
|
- Header cell renderer background/foreground colors were not restored after
|
||||||
|
hover if renderer uses `null` for background/foreground. (PR #790)
|
||||||
- TabbedPane:
|
- TabbedPane:
|
||||||
- Avoid unnecessary repainting whole tabbed pane content area when layouting
|
- Avoid unnecessary repainting whole tabbed pane content area when layouting
|
||||||
leading/trailing components.
|
leading/trailing components.
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ public class FlatTableHeaderUI
|
|||||||
JLabel l = (JLabel) c;
|
JLabel l = (JLabel) c;
|
||||||
Color oldBackground = null;
|
Color oldBackground = null;
|
||||||
Color oldForeground = null;
|
Color oldForeground = null;
|
||||||
Boolean oldOpaque = null;
|
boolean oldOpaque = false;
|
||||||
Icon oldIcon = null;
|
Icon oldIcon = null;
|
||||||
int oldHorizontalTextPosition = -1;
|
int oldHorizontalTextPosition = -1;
|
||||||
|
|
||||||
@@ -415,12 +415,12 @@ public class FlatTableHeaderUI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// restore modified renderer component properties
|
// restore modified renderer component properties
|
||||||
if( oldBackground != null )
|
if( background != null ) {
|
||||||
l.setBackground( oldBackground );
|
l.setBackground( oldBackground );
|
||||||
if( oldForeground != null )
|
|
||||||
l.setForeground( oldForeground );
|
|
||||||
if( oldOpaque != null )
|
|
||||||
l.setOpaque( oldOpaque );
|
l.setOpaque( oldOpaque );
|
||||||
|
}
|
||||||
|
if( foreground != null )
|
||||||
|
l.setForeground( oldForeground );
|
||||||
if( oldIcon != null )
|
if( oldIcon != null )
|
||||||
l.setIcon( oldIcon );
|
l.setIcon( oldIcon );
|
||||||
if( oldHorizontalTextPosition >= 0 )
|
if( oldHorizontalTextPosition >= 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user