Styling: support styling for recently merged changes

This commit is contained in:
Karl Tauber
2021-07-11 01:41:52 +02:00
parent be7114d3e6
commit 943dfe0619
3 changed files with 14 additions and 3 deletions

View File

@@ -70,14 +70,14 @@ public class FlatButtonBorder
@Styleable(dot=true) protected Color defaultFocusColor = UIManager.getColor( "Button.default.focusColor" );
@Styleable(dot=true) protected Color defaultHoverBorderColor = UIManager.getColor( "Button.default.hoverBorderColor" );
/** @since 1.4 */
protected final Color toolbarFocusColor = UIManager.getColor( "Button.toolbar.focusColor" );
@Styleable(dot=true) protected Color toolbarFocusColor = UIManager.getColor( "Button.toolbar.focusColor" );
@Styleable protected int borderWidth = UIManager.getInt( "Button.borderWidth" );
@Styleable(dot=true) protected int defaultBorderWidth = UIManager.getInt( "Button.default.borderWidth" );
@Styleable(dot=true) protected Insets toolbarMargin = UIManager.getInsets( "Button.toolbar.margin" );
@Styleable(dot=true) protected Insets toolbarSpacingInsets = UIManager.getInsets( "Button.toolbar.spacingInsets" );
/** @since 1.4 */
protected final float toolbarFocusWidth = FlatUIUtils.getUIFloat( "Button.toolbar.focusWidth", 1.5f );
@Styleable(dot=true) protected float toolbarFocusWidth = FlatUIUtils.getUIFloat( "Button.toolbar.focusWidth", 1.5f );
@Styleable protected int arc = UIManager.getInt( "Button.arc" );
public FlatButtonBorder() {

View File

@@ -61,7 +61,7 @@ public class FlatToolBarUI
extends BasicToolBarUI
{
/** @since 1.4 */
protected boolean focusableButtons;
@Styleable protected boolean focusableButtons;
// for FlatToolBarBorder
@Styleable protected Insets borderMargins;
@@ -138,7 +138,12 @@ public class FlatToolBarUI
* @since TODO
*/
protected void applyStyle( Object style ) {
boolean oldFocusableButtons = focusableButtons;
oldStyleValues = FlatStyleSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
if( focusableButtons != oldFocusableButtons )
setButtonsFocusable( focusableButtons );
}
/**