Merge PR #1074: Recalculate geometry after styling in FlatSliderUI

This commit is contained in:
Karl Tauber
2026-01-13 20:03:54 +01:00
2 changed files with 8 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ FlatLaf Change Log
#1068)
- Popup: Fixed scrolling popup painting issue on Windows 10 when a glass pane is
visible and frame is maximized. (issue #1071)
- Slider: Styling `thumbSize` or `focusWidth` did not update slider size/layout.
(PR #1074)
- ToolBar: Grip disappeared when switching between Look and Feels. (issue #1075)
- Extras:
- UI defaults inspector: Fixed NPE if color of `FlatLineBorder` is null. Also

View File

@@ -227,7 +227,13 @@ public class FlatSliderUI
/** @since 2 */
protected void applyStyle( Object style ) {
Dimension oldThumbSize = thumbSize;
int oldFocusWidth = focusWidth;
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
if( !thumbSize.equals( oldThumbSize ) || focusWidth != oldFocusWidth )
calculateGeometry();
}
/** @since 2 */