mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
Linux: rounded iconify/maximize/close buttons if using FlatLaf window decorations (issue #821)
This commit is contained in:
@@ -18,44 +18,95 @@ package com.formdev.flatlaf.icons;
|
|||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
|
import java.awt.Container;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.RenderingHints;
|
import java.awt.Insets;
|
||||||
|
import java.awt.Window;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
import com.formdev.flatlaf.ui.FlatButtonUI;
|
import com.formdev.flatlaf.ui.FlatButtonUI;
|
||||||
|
import com.formdev.flatlaf.ui.FlatTitlePane;
|
||||||
import com.formdev.flatlaf.ui.FlatUIUtils;
|
import com.formdev.flatlaf.ui.FlatUIUtils;
|
||||||
|
import com.formdev.flatlaf.util.DerivedColor;
|
||||||
import com.formdev.flatlaf.util.HiDPIUtils;
|
import com.formdev.flatlaf.util.HiDPIUtils;
|
||||||
|
import com.formdev.flatlaf.util.UIScale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for window icons.
|
* Base class for window icons.
|
||||||
*
|
*
|
||||||
* @uiDefault TitlePane.buttonSize Dimension
|
* @uiDefault TitlePane.buttonSize Dimension
|
||||||
|
* @uiDefault TitlePane.buttonInsets Insets optional
|
||||||
|
* @uiDefault TitlePane.buttonArc int optional
|
||||||
* @uiDefault TitlePane.buttonSymbolHeight int
|
* @uiDefault TitlePane.buttonSymbolHeight int
|
||||||
* @uiDefault TitlePane.buttonHoverBackground Color
|
* @uiDefault TitlePane.buttonBackground Color optional
|
||||||
* @uiDefault TitlePane.buttonPressedBackground Color
|
* @uiDefault TitlePane.buttonForeground Color optional
|
||||||
|
* @uiDefault TitlePane.buttonInactiveBackground Color optional
|
||||||
|
* @uiDefault TitlePane.buttonInactiveForeground Color optional
|
||||||
|
* @uiDefault TitlePane.buttonHoverBackground Color optional
|
||||||
|
* @uiDefault TitlePane.buttonHoverForeground Color optional
|
||||||
|
* @uiDefault TitlePane.buttonPressedBackground Color optional
|
||||||
|
* @uiDefault TitlePane.buttonPressedForeground Color optional
|
||||||
*
|
*
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
*/
|
*/
|
||||||
public abstract class FlatWindowAbstractIcon
|
public abstract class FlatWindowAbstractIcon
|
||||||
extends FlatAbstractIcon
|
extends FlatAbstractIcon
|
||||||
{
|
{
|
||||||
private final int symbolHeight;
|
/** @since 3.6 */ protected final Insets insets;
|
||||||
private final Color hoverBackground;
|
/** @since 3.6 */ protected final int arc;
|
||||||
private final Color pressedBackground;
|
/** @since 3.6 */ protected final int symbolHeight;
|
||||||
|
|
||||||
|
/** @since 3.6 */ protected final Color background;
|
||||||
|
/** @since 3.6 */ protected final Color foreground;
|
||||||
|
/** @since 3.6 */ protected final Color inactiveBackground;
|
||||||
|
/** @since 3.6 */ protected final Color inactiveForeground;
|
||||||
|
protected final Color hoverBackground;
|
||||||
|
/** @since 3.6 */ protected final Color hoverForeground;
|
||||||
|
protected final Color pressedBackground;
|
||||||
|
/** @since 3.6 */ protected final Color pressedForeground;
|
||||||
|
|
||||||
/** @since 3.2 */
|
/** @since 3.2 */
|
||||||
protected FlatWindowAbstractIcon( String windowStyle ) {
|
protected FlatWindowAbstractIcon( String windowStyle ) {
|
||||||
this( FlatUIUtils.getSubUIDimension( "TitlePane.buttonSize", windowStyle ),
|
this( windowStyle, null, null, null, null, null, null, null, null );
|
||||||
FlatUIUtils.getSubUIInt( "TitlePane.buttonSymbolHeight", windowStyle, 10 ),
|
|
||||||
FlatUIUtils.getSubUIColor( "TitlePane.buttonHoverBackground", windowStyle ),
|
|
||||||
FlatUIUtils.getSubUIColor( "TitlePane.buttonPressedBackground", windowStyle ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 3.2 */
|
/** @since 3.6 */
|
||||||
protected FlatWindowAbstractIcon( Dimension size, int symbolHeight, Color hoverBackground, Color pressedBackground ) {
|
protected FlatWindowAbstractIcon( String windowStyle,
|
||||||
|
Color background, Color foreground, Color inactiveBackground, Color inactiveForeground,
|
||||||
|
Color hoverBackground, Color hoverForeground, Color pressedBackground, Color pressedForeground )
|
||||||
|
{
|
||||||
|
this( FlatUIUtils.getSubUIDimension( "TitlePane.buttonSize", windowStyle ),
|
||||||
|
FlatUIUtils.getSubUIInsets( "TitlePane.buttonInsets", windowStyle ),
|
||||||
|
FlatUIUtils.getSubUIInt( "TitlePane.buttonArc", windowStyle, 0 ),
|
||||||
|
FlatUIUtils.getSubUIInt( "TitlePane.buttonSymbolHeight", windowStyle, 10 ),
|
||||||
|
(background != null) ? background : FlatUIUtils.getSubUIColor( "TitlePane.buttonBackground", windowStyle ),
|
||||||
|
(foreground != null) ? foreground : FlatUIUtils.getSubUIColor( "TitlePane.buttonForeground", windowStyle ),
|
||||||
|
(inactiveBackground != null) ? inactiveBackground : FlatUIUtils.getSubUIColor( "TitlePane.buttonInactiveBackground", windowStyle ),
|
||||||
|
(inactiveForeground != null) ? inactiveForeground : FlatUIUtils.getSubUIColor( "TitlePane.buttonInactiveForeground", windowStyle ),
|
||||||
|
(hoverBackground != null) ? hoverBackground : FlatUIUtils.getSubUIColor( "TitlePane.buttonHoverBackground", windowStyle ),
|
||||||
|
(hoverForeground != null) ? hoverForeground : FlatUIUtils.getSubUIColor( "TitlePane.buttonHoverForeground", windowStyle ),
|
||||||
|
(pressedBackground != null) ? pressedBackground : FlatUIUtils.getSubUIColor( "TitlePane.buttonPressedBackground", windowStyle ),
|
||||||
|
(pressedForeground != null) ? pressedForeground : FlatUIUtils.getSubUIColor( "TitlePane.buttonPressedForeground", windowStyle ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since 3.6 */
|
||||||
|
protected FlatWindowAbstractIcon( Dimension size, Insets insets, int arc, int symbolHeight,
|
||||||
|
Color background, Color foreground, Color inactiveBackground, Color inactiveForeground,
|
||||||
|
Color hoverBackground, Color hoverForeground, Color pressedBackground, Color pressedForeground )
|
||||||
|
{
|
||||||
super( size.width, size.height, null );
|
super( size.width, size.height, null );
|
||||||
|
this.insets = (insets != null) ? insets : new Insets( 0, 0, 0, 0 );
|
||||||
|
this.arc = arc;
|
||||||
this.symbolHeight = symbolHeight;
|
this.symbolHeight = symbolHeight;
|
||||||
|
|
||||||
|
this.background = background;
|
||||||
|
this.foreground = foreground;
|
||||||
|
this.inactiveBackground = inactiveBackground;
|
||||||
|
this.inactiveForeground = inactiveForeground;
|
||||||
this.hoverBackground = hoverBackground;
|
this.hoverBackground = hoverBackground;
|
||||||
|
this.hoverForeground = hoverForeground;
|
||||||
this.pressedBackground = pressedBackground;
|
this.pressedBackground = pressedBackground;
|
||||||
|
this.pressedForeground = pressedForeground;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,26 +120,39 @@ public abstract class FlatWindowAbstractIcon
|
|||||||
/** @since 3.5.2 */
|
/** @since 3.5.2 */
|
||||||
@Override
|
@Override
|
||||||
protected void paintBackground( Component c, Graphics2D g, int x, int y ) {
|
protected void paintBackground( Component c, Graphics2D g, int x, int y ) {
|
||||||
Color background = FlatButtonUI.buttonStateColor( c, null, null, null, hoverBackground, pressedBackground );
|
Color bg = null;
|
||||||
|
if( background != null || inactiveBackground != null ) {
|
||||||
|
Window window = SwingUtilities.windowForComponent( c );
|
||||||
|
bg = (window == null || window.isActive()) ? background : inactiveBackground;
|
||||||
|
}
|
||||||
|
|
||||||
|
Color background = FlatButtonUI.buttonStateColor( c, bg, null, null, hoverBackground, pressedBackground );
|
||||||
if( background != null ) {
|
if( background != null ) {
|
||||||
// disable antialiasing for background rectangle painting to avoid blurry edges when scaled (e.g. at 125% or 175%)
|
Insets insets = UIScale.scale( this.insets );
|
||||||
Object oldHint = g.getRenderingHint( RenderingHints.KEY_ANTIALIASING );
|
float arc = UIScale.scale( (float) this.arc );
|
||||||
g.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );
|
|
||||||
|
|
||||||
// fill background of whole component
|
// derive color from title pane background
|
||||||
g.setColor( FlatUIUtils.deriveColor( background, c.getBackground() ) );
|
if( background instanceof DerivedColor ) {
|
||||||
g.fillRect( 0, 0, c.getWidth(), c.getHeight() );
|
Container titlePane = SwingUtilities.getAncestorOfClass( FlatTitlePane.class, c );
|
||||||
|
Component baseComp = (titlePane != null) ? titlePane : c;
|
||||||
|
background = FlatUIUtils.deriveColor( background, baseComp.getBackground() );
|
||||||
|
}
|
||||||
|
|
||||||
g.setRenderingHint( RenderingHints.KEY_ANTIALIASING, oldHint );
|
g.setColor( background );
|
||||||
|
FlatUIUtils.paintComponentBackground( g, insets.left, insets.top,
|
||||||
|
c.getWidth() - insets.left - insets.right,
|
||||||
|
c.getHeight() - insets.top - insets.bottom,
|
||||||
|
0, arc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Color getForeground( Component c ) {
|
protected Color getForeground( Component c ) {
|
||||||
return c.getForeground();
|
Color fg = null;
|
||||||
|
if( foreground != null || inactiveForeground != null ) {
|
||||||
|
Window window = SwingUtilities.windowForComponent( c );
|
||||||
|
fg = (window == null || window.isActive()) ? foreground : inactiveForeground;
|
||||||
}
|
}
|
||||||
|
return FlatButtonUI.buttonStateColor( c, (fg != null) ? fg : c.getForeground(),
|
||||||
/** @since 3.2 */
|
null, null, hoverForeground, pressedForeground );
|
||||||
protected int getSymbolHeight() {
|
|
||||||
return symbolHeight;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,53 +17,54 @@
|
|||||||
package com.formdev.flatlaf.icons;
|
package com.formdev.flatlaf.icons;
|
||||||
|
|
||||||
import java.awt.BasicStroke;
|
import java.awt.BasicStroke;
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Component;
|
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.geom.Path2D;
|
import java.awt.geom.Path2D;
|
||||||
import com.formdev.flatlaf.ui.FlatButtonUI;
|
|
||||||
import com.formdev.flatlaf.ui.FlatUIUtils;
|
import com.formdev.flatlaf.ui.FlatUIUtils;
|
||||||
import com.formdev.flatlaf.util.SystemInfo;
|
import com.formdev.flatlaf.util.SystemInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "close" icon for windows (frames and dialogs).
|
* "close" icon for windows (frames and dialogs).
|
||||||
*
|
*
|
||||||
* @uiDefault TitlePane.closeHoverBackground Color
|
* @uiDefault TitlePane.closeBackground Color optional
|
||||||
* @uiDefault TitlePane.closePressedBackground Color
|
* @uiDefault TitlePane.closeForeground Color optional
|
||||||
* @uiDefault TitlePane.closeHoverForeground Color
|
* @uiDefault TitlePane.closeInactiveBackground Color optional
|
||||||
* @uiDefault TitlePane.closePressedForeground Color
|
* @uiDefault TitlePane.closeInactiveForeground Color optional
|
||||||
|
* @uiDefault TitlePane.closeHoverBackground Color optional
|
||||||
|
* @uiDefault TitlePane.closeHoverForeground Color optional
|
||||||
|
* @uiDefault TitlePane.closePressedBackground Color optional
|
||||||
|
* @uiDefault TitlePane.closePressedForeground Color optional
|
||||||
*
|
*
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
*/
|
*/
|
||||||
public class FlatWindowCloseIcon
|
public class FlatWindowCloseIcon
|
||||||
extends FlatWindowAbstractIcon
|
extends FlatWindowAbstractIcon
|
||||||
{
|
{
|
||||||
private final Color hoverForeground;
|
|
||||||
private final Color pressedForeground;
|
|
||||||
|
|
||||||
public FlatWindowCloseIcon() {
|
public FlatWindowCloseIcon() {
|
||||||
this( null );
|
this( null );
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 3.2 */
|
/** @since 3.2 */
|
||||||
public FlatWindowCloseIcon( String windowStyle ) {
|
public FlatWindowCloseIcon( String windowStyle ) {
|
||||||
super( FlatUIUtils.getSubUIDimension( "TitlePane.buttonSize", windowStyle ),
|
super( windowStyle,
|
||||||
FlatUIUtils.getSubUIInt( "TitlePane.buttonSymbolHeight", windowStyle, 10 ),
|
FlatUIUtils.getSubUIColor( "TitlePane.closeBackground", windowStyle ),
|
||||||
|
FlatUIUtils.getSubUIColor( "TitlePane.closeForeground", windowStyle ),
|
||||||
|
FlatUIUtils.getSubUIColor( "TitlePane.closeInactiveBackground", windowStyle ),
|
||||||
|
FlatUIUtils.getSubUIColor( "TitlePane.closeInactiveForeground", windowStyle ),
|
||||||
FlatUIUtils.getSubUIColor( "TitlePane.closeHoverBackground", windowStyle ),
|
FlatUIUtils.getSubUIColor( "TitlePane.closeHoverBackground", windowStyle ),
|
||||||
FlatUIUtils.getSubUIColor( "TitlePane.closePressedBackground", windowStyle ) );
|
FlatUIUtils.getSubUIColor( "TitlePane.closeHoverForeground", windowStyle ),
|
||||||
|
FlatUIUtils.getSubUIColor( "TitlePane.closePressedBackground", windowStyle ),
|
||||||
hoverForeground = FlatUIUtils.getSubUIColor( "TitlePane.closeHoverForeground", windowStyle );
|
FlatUIUtils.getSubUIColor( "TitlePane.closePressedForeground", windowStyle ) );
|
||||||
pressedForeground = FlatUIUtils.getSubUIColor( "TitlePane.closePressedForeground", windowStyle );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void paintIconAt1x( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
protected void paintIconAt1x( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
||||||
int iwh = (int) (getSymbolHeight() * scaleFactor);
|
int iwh = (int) (symbolHeight * scaleFactor);
|
||||||
int ix = x + ((width - iwh) / 2);
|
int ix = x + ((width - iwh) / 2);
|
||||||
int iy = y + ((height - iwh) / 2);
|
int iy = y + ((height - iwh) / 2);
|
||||||
int ix2 = ix + iwh - 1;
|
int ix2 = ix + iwh - 1;
|
||||||
int iy2 = iy + iwh - 1;
|
int iy2 = iy + iwh - 1;
|
||||||
float thickness = Math.max( SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (int) scaleFactor, 1 );
|
boolean isWindows10 = SystemInfo.isWindows_10_orLater && !SystemInfo.isWindows_11_orLater;
|
||||||
|
float thickness = Math.max( isWindows10 ? (int) scaleFactor : (float) scaleFactor, 1 );
|
||||||
|
|
||||||
Path2D path = new Path2D.Float( Path2D.WIND_EVEN_ODD, 4 );
|
Path2D path = new Path2D.Float( Path2D.WIND_EVEN_ODD, 4 );
|
||||||
path.moveTo( ix, iy );
|
path.moveTo( ix, iy );
|
||||||
@@ -73,9 +74,4 @@ public class FlatWindowCloseIcon
|
|||||||
g.setStroke( new BasicStroke( thickness ) );
|
g.setStroke( new BasicStroke( thickness ) );
|
||||||
g.draw( path );
|
g.draw( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Color getForeground( Component c ) {
|
|
||||||
return FlatButtonUI.buttonStateColor( c, c.getForeground(), null, null, hoverForeground, pressedForeground );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class FlatWindowIconifyIcon
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void paintIconAt1x( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
protected void paintIconAt1x( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
||||||
int iw = (int) (getSymbolHeight() * scaleFactor);
|
int iw = (int) (symbolHeight * scaleFactor);
|
||||||
int ih = Math.max( (int) scaleFactor, 1 );
|
int ih = Math.max( (int) scaleFactor, 1 );
|
||||||
int ix = x + ((width - iw) / 2);
|
int ix = x + ((width - iw) / 2);
|
||||||
int iy = y + ((height - ih) / 2);
|
int iy = y + ((height - ih) / 2);
|
||||||
|
|||||||
@@ -39,10 +39,11 @@ public class FlatWindowMaximizeIcon
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void paintIconAt1x( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
protected void paintIconAt1x( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
||||||
int iwh = (int) (getSymbolHeight() * scaleFactor);
|
int iwh = (int) (symbolHeight * scaleFactor);
|
||||||
int ix = x + ((width - iwh) / 2);
|
int ix = x + ((width - iwh) / 2);
|
||||||
int iy = y + ((height - iwh) / 2);
|
int iy = y + ((height - iwh) / 2);
|
||||||
float thickness = Math.max( SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (int) scaleFactor, 1 );
|
boolean isWindows10 = SystemInfo.isWindows_10_orLater && !SystemInfo.isWindows_11_orLater;
|
||||||
|
float thickness = Math.max( isWindows10 ? (int) scaleFactor : (float) scaleFactor, 1 );
|
||||||
int arc = Math.max( (int) (1.5 * scaleFactor), 2 );
|
int arc = Math.max( (int) (1.5 * scaleFactor), 2 );
|
||||||
|
|
||||||
g.fill( SystemInfo.isWindows_11_orLater
|
g.fill( SystemInfo.isWindows_11_orLater
|
||||||
|
|||||||
@@ -42,14 +42,15 @@ public class FlatWindowRestoreIcon
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void paintIconAt1x( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
protected void paintIconAt1x( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
||||||
int iwh = (int) (getSymbolHeight() * scaleFactor);
|
int iwh = (int) (symbolHeight * scaleFactor);
|
||||||
int ix = x + ((width - iwh) / 2);
|
int ix = x + ((width - iwh) / 2);
|
||||||
int iy = y + ((height - iwh) / 2);
|
int iy = y + ((height - iwh) / 2);
|
||||||
float thickness = Math.max( SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (int) scaleFactor, 1 );
|
boolean isWindows10 = SystemInfo.isWindows_10_orLater && !SystemInfo.isWindows_11_orLater;
|
||||||
|
float thickness = Math.max( isWindows10 ? (int) scaleFactor : (float) scaleFactor, 1 );
|
||||||
int arc = Math.max( (int) (1.5 * scaleFactor), 2 );
|
int arc = Math.max( (int) (1.5 * scaleFactor), 2 );
|
||||||
int arcOuter = (int) (arc + (1.5 * scaleFactor));
|
int arcOuter = (int) (arc + (1.5 * scaleFactor));
|
||||||
|
|
||||||
int rwh = (int) ((getSymbolHeight() - 2) * scaleFactor);
|
int rwh = (int) ((symbolHeight - 2) * scaleFactor);
|
||||||
int ro2 = iwh - rwh;
|
int ro2 = iwh - rwh;
|
||||||
|
|
||||||
// upper-right rectangle
|
// upper-right rectangle
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import java.awt.Window;
|
|||||||
import java.awt.event.ComponentListener;
|
import java.awt.event.ComponentListener;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JDialog;
|
import javax.swing.JDialog;
|
||||||
@@ -485,8 +486,12 @@ public class FlatRootPaneUI
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "ancestor":
|
case "ancestor":
|
||||||
if( e.getNewValue() instanceof Window )
|
if( e.getNewValue() instanceof Window ) {
|
||||||
|
if( titlePane != null && !Objects.equals( titlePane.windowStyle, FlatTitlePane.getWindowStyle( rootPane ) ) )
|
||||||
|
setTitlePane( createTitlePane() );
|
||||||
|
|
||||||
macClearBackgroundForTranslucentWindow( rootPane );
|
macClearBackgroundForTranslucentWindow( rootPane );
|
||||||
|
}
|
||||||
|
|
||||||
macUninstallWindowBackgroundListener( rootPane );
|
macUninstallWindowBackgroundListener( rootPane );
|
||||||
macInstallWindowBackgroundListener( rootPane );
|
macInstallWindowBackgroundListener( rootPane );
|
||||||
|
|||||||
@@ -89,13 +89,16 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
* @uiDefault TitlePane.iconSize Dimension
|
* @uiDefault TitlePane.iconSize Dimension
|
||||||
* @uiDefault TitlePane.iconMargins Insets
|
* @uiDefault TitlePane.iconMargins Insets
|
||||||
* @uiDefault TitlePane.titleMargins Insets
|
* @uiDefault TitlePane.titleMargins Insets
|
||||||
* @uiDefault TitlePane.menuBarEmbedded boolean
|
|
||||||
* @uiDefault TitlePane.titleMinimumWidth int
|
* @uiDefault TitlePane.titleMinimumWidth int
|
||||||
* @uiDefault TitlePane.buttonMinimumWidth int
|
* @uiDefault TitlePane.buttonMinimumWidth int
|
||||||
* @uiDefault TitlePane.buttonMaximizedHeight int
|
* @uiDefault TitlePane.buttonMaximizedHeight int
|
||||||
|
* @uiDefault TitlePane.buttonsGap int
|
||||||
|
* @uiDefault TitlePane.buttonsMargins Insets
|
||||||
|
* @uiDefault TitlePane.buttonsFillVertically boolean
|
||||||
* @uiDefault TitlePane.centerTitle boolean
|
* @uiDefault TitlePane.centerTitle boolean
|
||||||
* @uiDefault TitlePane.centerTitleIfMenuBarEmbedded boolean
|
* @uiDefault TitlePane.centerTitleIfMenuBarEmbedded boolean
|
||||||
* @uiDefault TitlePane.showIconBesideTitle boolean
|
* @uiDefault TitlePane.showIconBesideTitle boolean
|
||||||
|
* @uiDefault TitlePane.menuBarEmbedded boolean
|
||||||
* @uiDefault TitlePane.menuBarTitleGap int
|
* @uiDefault TitlePane.menuBarTitleGap int
|
||||||
* @uiDefault TitlePane.menuBarTitleMinimumGap int
|
* @uiDefault TitlePane.menuBarTitleMinimumGap int
|
||||||
* @uiDefault TitlePane.closeIcon Icon
|
* @uiDefault TitlePane.closeIcon Icon
|
||||||
@@ -123,9 +126,14 @@ public class FlatTitlePane
|
|||||||
/** @since 2.5 */ protected final boolean showIconInDialogs;
|
/** @since 2.5 */ protected final boolean showIconInDialogs;
|
||||||
/** @since 2 */ protected final int noIconLeftGap;
|
/** @since 2 */ protected final int noIconLeftGap;
|
||||||
protected final Dimension iconSize;
|
protected final Dimension iconSize;
|
||||||
|
/** @since 3.6 */ protected final Insets iconMargins;
|
||||||
|
/** @since 3.6 */ protected final Insets titleMargins;
|
||||||
/** @since 2.4 */ protected final int titleMinimumWidth;
|
/** @since 2.4 */ protected final int titleMinimumWidth;
|
||||||
/** @since 2.4 */ protected final int buttonMinimumWidth;
|
/** @since 2.4 */ protected final int buttonMinimumWidth;
|
||||||
protected final int buttonMaximizedHeight;
|
protected final int buttonMaximizedHeight;
|
||||||
|
/** @since 3.6 */ protected final int buttonsGap;
|
||||||
|
/** @since 3.6 */ protected final Insets buttonsMargins;
|
||||||
|
/** @since 3.6 */ protected final boolean buttonsFillVertically;
|
||||||
protected final boolean centerTitle;
|
protected final boolean centerTitle;
|
||||||
protected final boolean centerTitleIfMenuBarEmbedded;
|
protected final boolean centerTitleIfMenuBarEmbedded;
|
||||||
/** @since 2.4 */ protected final boolean showIconBesideTitle;
|
/** @since 2.4 */ protected final boolean showIconBesideTitle;
|
||||||
@@ -145,6 +153,9 @@ public class FlatTitlePane
|
|||||||
protected JButton restoreButton;
|
protected JButton restoreButton;
|
||||||
protected JButton closeButton;
|
protected JButton closeButton;
|
||||||
|
|
||||||
|
private JComponent iconifyMaximizeGapComp;
|
||||||
|
private JComponent maximizeCloseGapComp;
|
||||||
|
|
||||||
protected Window window;
|
protected Window window;
|
||||||
|
|
||||||
private final Handler handler;
|
private final Handler handler;
|
||||||
@@ -179,9 +190,7 @@ public class FlatTitlePane
|
|||||||
public FlatTitlePane( JRootPane rootPane ) {
|
public FlatTitlePane( JRootPane rootPane ) {
|
||||||
this.rootPane = rootPane;
|
this.rootPane = rootPane;
|
||||||
|
|
||||||
Window w = SwingUtilities.getWindowAncestor( rootPane );
|
windowStyle = getWindowStyle( rootPane );
|
||||||
String defaultWindowStyle = (w != null && w.getType() == Window.Type.UTILITY) ? WINDOW_STYLE_SMALL : null;
|
|
||||||
windowStyle = clientProperty( rootPane, WINDOW_STYLE, defaultWindowStyle, String.class );
|
|
||||||
|
|
||||||
titleFont = FlatUIUtils.getSubUIFont( "TitlePane.font", windowStyle );
|
titleFont = FlatUIUtils.getSubUIFont( "TitlePane.font", windowStyle );
|
||||||
activeBackground = FlatUIUtils.getSubUIColor( "TitlePane.background", windowStyle );
|
activeBackground = FlatUIUtils.getSubUIColor( "TitlePane.background", windowStyle );
|
||||||
@@ -196,9 +205,14 @@ public class FlatTitlePane
|
|||||||
showIconInDialogs = FlatUIUtils.getSubUIBoolean( "TitlePane.showIconInDialogs", windowStyle, true );
|
showIconInDialogs = FlatUIUtils.getSubUIBoolean( "TitlePane.showIconInDialogs", windowStyle, true );
|
||||||
noIconLeftGap = FlatUIUtils.getSubUIInt( "TitlePane.noIconLeftGap", windowStyle, 8 );
|
noIconLeftGap = FlatUIUtils.getSubUIInt( "TitlePane.noIconLeftGap", windowStyle, 8 );
|
||||||
iconSize = FlatUIUtils.getSubUIDimension( "TitlePane.iconSize", windowStyle );
|
iconSize = FlatUIUtils.getSubUIDimension( "TitlePane.iconSize", windowStyle );
|
||||||
|
iconMargins = FlatUIUtils.getSubUIInsets( "TitlePane.iconMargins", windowStyle );
|
||||||
|
titleMargins = FlatUIUtils.getSubUIInsets( "TitlePane.titleMargins", windowStyle );
|
||||||
titleMinimumWidth = FlatUIUtils.getSubUIInt( "TitlePane.titleMinimumWidth", windowStyle, 60 );
|
titleMinimumWidth = FlatUIUtils.getSubUIInt( "TitlePane.titleMinimumWidth", windowStyle, 60 );
|
||||||
buttonMinimumWidth = FlatUIUtils.getSubUIInt( "TitlePane.buttonMinimumWidth", windowStyle, 30 );
|
buttonMinimumWidth = FlatUIUtils.getSubUIInt( "TitlePane.buttonMinimumWidth", windowStyle, 30 );
|
||||||
buttonMaximizedHeight = FlatUIUtils.getSubUIInt( "TitlePane.buttonMaximizedHeight", windowStyle, 0 );
|
buttonMaximizedHeight = FlatUIUtils.getSubUIInt( "TitlePane.buttonMaximizedHeight", windowStyle, 0 );
|
||||||
|
buttonsGap = FlatUIUtils.getSubUIInt( "TitlePane.buttonsGap", windowStyle, 0 );
|
||||||
|
buttonsMargins = FlatUIUtils.getSubUIInsets( "TitlePane.buttonsMargins", windowStyle );
|
||||||
|
buttonsFillVertically = FlatUIUtils.getSubUIBoolean( "TitlePane.buttonsFillVertically", windowStyle, true );
|
||||||
centerTitle = FlatUIUtils.getSubUIBoolean( "TitlePane.centerTitle", windowStyle, false );
|
centerTitle = FlatUIUtils.getSubUIBoolean( "TitlePane.centerTitle", windowStyle, false );
|
||||||
centerTitleIfMenuBarEmbedded = FlatUIUtils.getSubUIBoolean( "TitlePane.centerTitleIfMenuBarEmbedded", windowStyle, true );
|
centerTitleIfMenuBarEmbedded = FlatUIUtils.getSubUIBoolean( "TitlePane.centerTitleIfMenuBarEmbedded", windowStyle, true );
|
||||||
showIconBesideTitle = FlatUIUtils.getSubUIBoolean( "TitlePane.showIconBesideTitle", windowStyle, false );
|
showIconBesideTitle = FlatUIUtils.getSubUIBoolean( "TitlePane.showIconBesideTitle", windowStyle, false );
|
||||||
@@ -228,6 +242,12 @@ public class FlatTitlePane
|
|||||||
applyComponentOrientation( rootPane.getComponentOrientation() );
|
applyComponentOrientation( rootPane.getComponentOrientation() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static String getWindowStyle( JRootPane rootPane ) {
|
||||||
|
Window w = SwingUtilities.getWindowAncestor( rootPane );
|
||||||
|
String defaultWindowStyle = (w != null && w.getType() == Window.Type.UTILITY) ? WINDOW_STYLE_SMALL : null;
|
||||||
|
return clientProperty( rootPane, WINDOW_STYLE, defaultWindowStyle, String.class );
|
||||||
|
}
|
||||||
|
|
||||||
protected FlatTitlePaneBorder createTitlePaneBorder() {
|
protected FlatTitlePaneBorder createTitlePaneBorder() {
|
||||||
return new FlatTitlePaneBorder();
|
return new FlatTitlePaneBorder();
|
||||||
}
|
}
|
||||||
@@ -245,8 +265,8 @@ public class FlatTitlePane
|
|||||||
setUI( new FlatTitleLabelUI() );
|
setUI( new FlatTitleLabelUI() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
iconLabel.setBorder( new FlatEmptyBorder( FlatUIUtils.getSubUIInsets( "TitlePane.iconMargins", windowStyle ) ) );
|
iconLabel.setBorder( new FlatEmptyBorder( iconMargins ) );
|
||||||
titleLabel.setBorder( new FlatEmptyBorder( FlatUIUtils.getSubUIInsets( "TitlePane.titleMargins", windowStyle ) ) );
|
titleLabel.setBorder( new FlatEmptyBorder( titleMargins ) );
|
||||||
|
|
||||||
leftPanel.setLayout( new BoxLayout( leftPanel, BoxLayout.LINE_AXIS ) );
|
leftPanel.setLayout( new BoxLayout( leftPanel, BoxLayout.LINE_AXIS ) );
|
||||||
leftPanel.setOpaque( false );
|
leftPanel.setOpaque( false );
|
||||||
@@ -349,10 +369,15 @@ public class FlatTitlePane
|
|||||||
restoreButton = createButton( "TitlePane.restoreIcon", "Restore", e -> restore() );
|
restoreButton = createButton( "TitlePane.restoreIcon", "Restore", e -> restore() );
|
||||||
closeButton = createButton( "TitlePane.closeIcon", "Close", e -> close() );
|
closeButton = createButton( "TitlePane.closeIcon", "Close", e -> close() );
|
||||||
|
|
||||||
|
iconifyMaximizeGapComp = createButtonsGapComp();
|
||||||
|
maximizeCloseGapComp = createButtonsGapComp();
|
||||||
|
|
||||||
// initially hide buttons that are only supported in frames
|
// initially hide buttons that are only supported in frames
|
||||||
iconifyButton.setVisible( false );
|
iconifyButton.setVisible( false );
|
||||||
maximizeButton.setVisible( false );
|
maximizeButton.setVisible( false );
|
||||||
restoreButton.setVisible( false );
|
restoreButton.setVisible( false );
|
||||||
|
iconifyMaximizeGapComp.setVisible( false );
|
||||||
|
maximizeCloseGapComp.setVisible( false );
|
||||||
|
|
||||||
buttonPanel = new JPanel() {
|
buttonPanel = new JPanel() {
|
||||||
@Override
|
@Override
|
||||||
@@ -364,12 +389,13 @@ public class FlatTitlePane
|
|||||||
|
|
||||||
if( buttonMaximizedHeight > 0 && isWindowMaximized() && !hasVisibleEmbeddedMenuBar( rootPane.getJMenuBar() ) ) {
|
if( buttonMaximizedHeight > 0 && isWindowMaximized() && !hasVisibleEmbeddedMenuBar( rootPane.getJMenuBar() ) ) {
|
||||||
// make title pane height smaller when frame is maximized
|
// make title pane height smaller when frame is maximized
|
||||||
size = new Dimension( size.width, Math.min( size.height, UIScale.scale( buttonMaximizedHeight ) ) );
|
size = new Dimension( size.width, Math.min( size.height, UIScale.scale( buttonMaximizedHeight + buttonsMargins.top + buttonsMargins.bottom ) ) );
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
buttonPanel.setOpaque( false );
|
buttonPanel.setOpaque( false );
|
||||||
|
buttonPanel.setBorder( FlatUIUtils.nonUIResource( new FlatEmptyBorder( buttonsMargins ) ) );
|
||||||
buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.LINE_AXIS ) );
|
buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.LINE_AXIS ) );
|
||||||
if( rootPane.getWindowDecorationStyle() == JRootPane.FRAME ) {
|
if( rootPane.getWindowDecorationStyle() == JRootPane.FRAME ) {
|
||||||
// JRootPane.FRAME works only for frames (and not for dialogs)
|
// JRootPane.FRAME works only for frames (and not for dialogs)
|
||||||
@@ -378,8 +404,10 @@ public class FlatTitlePane
|
|||||||
// later in frameStateChanged(), which is invoked from addNotify()
|
// later in frameStateChanged(), which is invoked from addNotify()
|
||||||
|
|
||||||
buttonPanel.add( iconifyButton );
|
buttonPanel.add( iconifyButton );
|
||||||
|
buttonPanel.add( iconifyMaximizeGapComp );
|
||||||
buttonPanel.add( maximizeButton );
|
buttonPanel.add( maximizeButton );
|
||||||
buttonPanel.add( restoreButton );
|
buttonPanel.add( restoreButton );
|
||||||
|
buttonPanel.add( maximizeCloseGapComp );
|
||||||
}
|
}
|
||||||
buttonPanel.add( closeButton );
|
buttonPanel.add( closeButton );
|
||||||
|
|
||||||
@@ -396,13 +424,17 @@ public class FlatTitlePane
|
|||||||
@Override
|
@Override
|
||||||
public Dimension getMinimumSize() {
|
public Dimension getMinimumSize() {
|
||||||
// allow the button to shrink if space is rare
|
// allow the button to shrink if space is rare
|
||||||
return new Dimension( UIScale.scale( buttonMinimumWidth ), super.getMinimumSize().height );
|
return new Dimension(
|
||||||
|
Math.min( UIScale.scale( buttonMinimumWidth ), super.getPreferredSize().width ),
|
||||||
|
super.getMinimumSize().height );
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Dimension getMaximumSize() {
|
public Dimension getMaximumSize() {
|
||||||
// allow the button to fill whole button area height
|
// allow the button to fill whole button area height
|
||||||
// see also BasicMenuUI.getMaximumSize()
|
// see also BasicMenuUI.getMaximumSize()
|
||||||
return new Dimension( super.getMaximumSize().width, Short.MAX_VALUE );
|
return buttonsFillVertically
|
||||||
|
? new Dimension( super.getMaximumSize().width, Short.MAX_VALUE )
|
||||||
|
: super.getMaximumSize();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
button.setFocusable( false );
|
button.setFocusable( false );
|
||||||
@@ -413,6 +445,14 @@ public class FlatTitlePane
|
|||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private JComponent createButtonsGapComp() {
|
||||||
|
JComponent gapComp = new JPanel();
|
||||||
|
gapComp.setOpaque( false );
|
||||||
|
gapComp.setMinimumSize( new Dimension( 0, 0 ) );
|
||||||
|
gapComp.setPreferredSize( new Dimension( UIScale.scale( buttonsGap ), 0 ) );
|
||||||
|
return gapComp;
|
||||||
|
}
|
||||||
|
|
||||||
protected void activeChanged( boolean active ) {
|
protected void activeChanged( boolean active ) {
|
||||||
Color background = clientPropertyColor( rootPane, TITLE_BAR_BACKGROUND, null );
|
Color background = clientPropertyColor( rootPane, TITLE_BAR_BACKGROUND, null );
|
||||||
Color foreground = clientPropertyColor( rootPane, TITLE_BAR_FOREGROUND, null );
|
Color foreground = clientPropertyColor( rootPane, TITLE_BAR_FOREGROUND, null );
|
||||||
@@ -434,6 +474,9 @@ public class FlatTitlePane
|
|||||||
closeButton.setForeground( foreground );
|
closeButton.setForeground( foreground );
|
||||||
|
|
||||||
// this is necessary because hover/pressed colors are derived from background color
|
// this is necessary because hover/pressed colors are derived from background color
|
||||||
|
// (since FlatWindowAbstractIcon now invokes FlatTitlePane.getBackground()
|
||||||
|
// to get base color, this is no longer necessary, but keep it for compatibility;
|
||||||
|
// e.g. for custom window icons)
|
||||||
iconifyButton.setBackground( background );
|
iconifyButton.setBackground( background );
|
||||||
maximizeButton.setBackground( background );
|
maximizeButton.setBackground( background );
|
||||||
restoreButton.setBackground( background );
|
restoreButton.setBackground( background );
|
||||||
@@ -493,6 +536,13 @@ public class FlatTitlePane
|
|||||||
maximizeButton.setVisible( false );
|
maximizeButton.setVisible( false );
|
||||||
restoreButton.setVisible( false );
|
restoreButton.setVisible( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean iconifyVisible = iconifyButton.isVisible();
|
||||||
|
boolean maximizeVisible = maximizeButton.isVisible();
|
||||||
|
boolean restoreVisible = restoreButton.isVisible();
|
||||||
|
boolean closeVisible = closeButton.isVisible();
|
||||||
|
iconifyMaximizeGapComp.setVisible( iconifyVisible && (maximizeVisible || restoreVisible || closeVisible) );
|
||||||
|
maximizeCloseGapComp.setVisible( closeVisible && (maximizeVisible || restoreVisible) );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updateIcon() {
|
protected void updateIcon() {
|
||||||
@@ -746,12 +796,17 @@ public class FlatTitlePane
|
|||||||
if( isFullWindowContent() )
|
if( isFullWindowContent() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
g.setColor( getBackground() );
|
||||||
|
g.fillRect( 0, 0, getWidth(), getHeight() );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Color getBackground() {
|
||||||
// not storing value of "TitlePane.unifiedBackground" in class to allow changing at runtime
|
// not storing value of "TitlePane.unifiedBackground" in class to allow changing at runtime
|
||||||
g.setColor( (UIManager.getBoolean( "TitlePane.unifiedBackground" ) &&
|
return (UIManager.getBoolean( "TitlePane.unifiedBackground" ) &&
|
||||||
clientPropertyColor( rootPane, TITLE_BAR_BACKGROUND, null ) == null)
|
clientPropertyColor( rootPane, TITLE_BAR_BACKGROUND, null ) == null)
|
||||||
? FlatUIUtils.getParentBackground( this )
|
? FlatUIUtils.getParentBackground( this )
|
||||||
: getBackground() );
|
: super.getBackground();
|
||||||
g.fillRect( 0, 0, getWidth(), getHeight() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1093,6 +1148,7 @@ public class FlatTitlePane
|
|||||||
if( !c.isDisplayable() || !c.isVisible() || !contains( c, x, y ) || c == mouseLayer )
|
if( !c.isDisplayable() || !c.isVisible() || !contains( c, x, y ) || c == mouseLayer )
|
||||||
return true; // continue checking with next component
|
return true; // continue checking with next component
|
||||||
|
|
||||||
|
// check enabled component that has mouse listeners
|
||||||
if( c.isEnabled() &&
|
if( c.isEnabled() &&
|
||||||
(c.getMouseListeners().length > 0 ||
|
(c.getMouseListeners().length > 0 ||
|
||||||
c.getMouseMotionListeners().length > 0) )
|
c.getMouseMotionListeners().length > 0) )
|
||||||
|
|||||||
@@ -341,8 +341,13 @@ TableHeader.bottomSeparatorColor = $TableHeader.separatorColor
|
|||||||
#---- TitlePane ----
|
#---- TitlePane ----
|
||||||
|
|
||||||
TitlePane.embeddedForeground = darken($TitlePane.foreground,15%)
|
TitlePane.embeddedForeground = darken($TitlePane.foreground,15%)
|
||||||
TitlePane.buttonHoverBackground = lighten($TitlePane.background,15%,derived)
|
TitlePane.buttonHoverBackground = lighten($TitlePane.background,10%,derived)
|
||||||
TitlePane.buttonPressedBackground = lighten($TitlePane.background,10%,derived)
|
TitlePane.buttonPressedBackground = lighten($TitlePane.background,6%,derived)
|
||||||
|
|
||||||
|
# Linux
|
||||||
|
[linux]TitlePane.buttonBackground = lighten($TitlePane.background,5%,derived)
|
||||||
|
[linux]TitlePane.buttonHoverBackground = lighten($TitlePane.background,10%,derived)
|
||||||
|
[linux]TitlePane.buttonPressedBackground = lighten($TitlePane.background,15%,derived)
|
||||||
|
|
||||||
|
|
||||||
#---- ToggleButton ----
|
#---- ToggleButton ----
|
||||||
|
|||||||
@@ -823,9 +823,14 @@ TitlePane.iconMargins = 3,8,3,8
|
|||||||
TitlePane.titleMargins = 3,0,3,0
|
TitlePane.titleMargins = 3,0,3,0
|
||||||
TitlePane.titleMinimumWidth = 60
|
TitlePane.titleMinimumWidth = 60
|
||||||
TitlePane.buttonSize = 44,30
|
TitlePane.buttonSize = 44,30
|
||||||
|
TitlePane.buttonInsets = 0,0,0,0
|
||||||
|
TitlePane.buttonArc = 0
|
||||||
TitlePane.buttonMinimumWidth = 30
|
TitlePane.buttonMinimumWidth = 30
|
||||||
TitlePane.buttonMaximizedHeight = 22
|
TitlePane.buttonMaximizedHeight = 22
|
||||||
TitlePane.buttonSymbolHeight = 10
|
TitlePane.buttonSymbolHeight = 10
|
||||||
|
TitlePane.buttonsGap = 0
|
||||||
|
TitlePane.buttonsMargins = 0,0,0,0
|
||||||
|
TitlePane.buttonsFillVertically = true
|
||||||
TitlePane.centerTitle = false
|
TitlePane.centerTitle = false
|
||||||
TitlePane.centerTitleIfMenuBarEmbedded = true
|
TitlePane.centerTitleIfMenuBarEmbedded = true
|
||||||
TitlePane.showIconBesideTitle = false
|
TitlePane.showIconBesideTitle = false
|
||||||
@@ -856,6 +861,27 @@ TitlePane.small.iconifyIcon = com.formdev.flatlaf.icons.FlatWindowIconifyIcon, s
|
|||||||
TitlePane.small.maximizeIcon = com.formdev.flatlaf.icons.FlatWindowMaximizeIcon, small
|
TitlePane.small.maximizeIcon = com.formdev.flatlaf.icons.FlatWindowMaximizeIcon, small
|
||||||
TitlePane.small.restoreIcon = com.formdev.flatlaf.icons.FlatWindowRestoreIcon, small
|
TitlePane.small.restoreIcon = com.formdev.flatlaf.icons.FlatWindowRestoreIcon, small
|
||||||
|
|
||||||
|
# Linux
|
||||||
|
[linux]TitlePane.buttonSize = 26,26
|
||||||
|
[linux]TitlePane.buttonInsets = 2,2,2,2
|
||||||
|
[linux]TitlePane.buttonArc = 999
|
||||||
|
[linux]TitlePane.buttonMaximizedHeight = -1
|
||||||
|
[linux]TitlePane.buttonSymbolHeight = 8
|
||||||
|
[linux]TitlePane.buttonsGap = 8
|
||||||
|
[linux]TitlePane.buttonsMargins = 4,4,4,4
|
||||||
|
[linux]TitlePane.buttonsFillVertically = false
|
||||||
|
[linux]TitlePane.small.buttonSize = 20,20
|
||||||
|
[linux]TitlePane.small.buttonInsets = 1,1,1,1
|
||||||
|
[linux]TitlePane.small.buttonSymbolHeight = 6
|
||||||
|
[linux]TitlePane.small.buttonsGap = 4
|
||||||
|
[linux]TitlePane.small.buttonsMargins = 2,2,2,2
|
||||||
|
[linux]TitlePane.closeBackground = $?TitlePane.buttonBackground
|
||||||
|
[linux]TitlePane.closeInactiveBackground = $?TitlePane.buttonInactiveBackground
|
||||||
|
[linux]TitlePane.closeHoverBackground = $?TitlePane.buttonHoverBackground
|
||||||
|
[linux]TitlePane.closePressedBackground = $?TitlePane.buttonPressedBackground
|
||||||
|
[linux]TitlePane.closeHoverForeground = $?TitlePane.foreground
|
||||||
|
[linux]TitlePane.closePressedForeground = $?TitlePane.foreground
|
||||||
|
|
||||||
|
|
||||||
#---- ToggleButton ----
|
#---- ToggleButton ----
|
||||||
|
|
||||||
|
|||||||
@@ -347,8 +347,13 @@ TableHeader.bottomSeparatorColor = $TableHeader.separatorColor
|
|||||||
#---- TitlePane ----
|
#---- TitlePane ----
|
||||||
|
|
||||||
TitlePane.embeddedForeground = lighten($TitlePane.foreground,35%)
|
TitlePane.embeddedForeground = lighten($TitlePane.foreground,35%)
|
||||||
TitlePane.buttonHoverBackground = darken($TitlePane.background,10%,derived)
|
TitlePane.buttonHoverBackground = darken($TitlePane.background,5%,derived)
|
||||||
TitlePane.buttonPressedBackground = darken($TitlePane.background,8%,derived)
|
TitlePane.buttonPressedBackground = darken($TitlePane.background,3%,derived)
|
||||||
|
|
||||||
|
# Linux
|
||||||
|
[linux]TitlePane.buttonBackground = darken($TitlePane.background,5%,derived)
|
||||||
|
[linux]TitlePane.buttonHoverBackground = darken($TitlePane.background,10%,derived)
|
||||||
|
[linux]TitlePane.buttonPressedBackground = darken($TitlePane.background,15%,derived)
|
||||||
|
|
||||||
|
|
||||||
#---- ToggleButton ----
|
#---- ToggleButton ----
|
||||||
|
|||||||
@@ -215,8 +215,14 @@ TableHeader.pressedForeground = TableHeader.foreground
|
|||||||
|
|
||||||
#---- TitlePane ----
|
#---- TitlePane ----
|
||||||
|
|
||||||
|
TitlePane.buttonBackground = TitlePane.background
|
||||||
|
TitlePane.buttonInactiveBackground = TitlePane.background
|
||||||
TitlePane.buttonHoverBackground = TitlePane.background
|
TitlePane.buttonHoverBackground = TitlePane.background
|
||||||
TitlePane.buttonPressedBackground = TitlePane.background
|
TitlePane.buttonPressedBackground = TitlePane.background
|
||||||
|
TitlePane.closeBackground = TitlePane.background
|
||||||
|
TitlePane.closeInactiveBackground = TitlePane.background
|
||||||
|
TitlePane.closeHoverBackground = TitlePane.background
|
||||||
|
TitlePane.closePressedBackground = TitlePane.background
|
||||||
|
|
||||||
|
|
||||||
#---- ToggleButton ----
|
#---- ToggleButton ----
|
||||||
|
|||||||
@@ -45,8 +45,86 @@
|
|||||||
|
|
||||||
#---- TitlePane ----
|
#---- TitlePane ----
|
||||||
|
|
||||||
|
- TitlePane.buttonArc 0
|
||||||
|
+ TitlePane.buttonArc 999
|
||||||
|
|
||||||
|
+ TitlePane.buttonBackground #3c3f41 HSL 204 4 25 com.formdev.flatlaf.util.DerivedColor [UI] lighten(5% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
+ TitlePane.buttonInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.buttonMaximizedHeight 22
|
||||||
|
+ TitlePane.buttonMaximizedHeight -1
|
||||||
|
|
||||||
|
- TitlePane.buttonPressedBackground #3f4144 HSL 216 4 26 com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse)
|
||||||
|
+ TitlePane.buttonPressedBackground #55585c HSL 214 4 35 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
|
+ TitlePane.buttonSize 26,26 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.buttonSymbolHeight 10
|
||||||
|
+ TitlePane.buttonSymbolHeight 8
|
||||||
|
|
||||||
|
- TitlePane.buttonsFillVertically true
|
||||||
|
+ TitlePane.buttonsFillVertically false
|
||||||
|
|
||||||
|
- TitlePane.buttonsGap 0
|
||||||
|
+ TitlePane.buttonsGap 8
|
||||||
|
|
||||||
|
- TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
+ TitlePane.buttonsMargins 4,4,4,4 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
|
||||||
|
+ TitlePane.closeBackground #3c3f41 HSL 204 4 25 com.formdev.flatlaf.util.DerivedColor [UI] lighten(5% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
+ TitlePane.closeHoverBackground #484c4f HSL 206 5 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.closeHoverForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
+ TitlePane.closeHoverForeground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
||||||
|
+ TitlePane.closeIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.closePressedBackground #c42b1ce6 90% HSLA 5 75 44 90 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
+ TitlePane.closePressedBackground #55585c HSL 214 4 35 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.closePressedForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
+ TitlePane.closePressedForeground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.iconifyIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
|
||||||
|
+ TitlePane.iconifyIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.maximizeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
|
||||||
|
+ TitlePane.maximizeIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.restoreIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
|
||||||
|
+ TitlePane.restoreIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
|
||||||
|
|
||||||
|
+ TitlePane.small.buttonInsets 1,1,1,1 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.buttonSize 30,20 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
|
+ TitlePane.small.buttonSize 20,20 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.buttonSymbolHeight 8
|
||||||
|
+ TitlePane.small.buttonSymbolHeight 6
|
||||||
|
|
||||||
|
+ TitlePane.small.buttonsGap 4
|
||||||
|
+ TitlePane.small.buttonsMargins 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.closeIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
||||||
|
+ TitlePane.small.closeIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
||||||
|
|
||||||
- TitlePane.small.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
|
- TitlePane.small.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
|
||||||
+ TitlePane.small.font [active] Liberation Sans plain 14 javax.swing.plaf.FontUIResource [UI]
|
+ TitlePane.small.font [active] Liberation Sans plain 14 javax.swing.plaf.FontUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.iconifyIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
|
||||||
|
+ TitlePane.small.iconifyIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.maximizeIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
|
||||||
|
+ TitlePane.small.maximizeIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.restoreIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
|
||||||
|
+ TitlePane.small.restoreIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
|
||||||
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||||
+ defaultFont Liberation Sans plain 15 javax.swing.plaf.FontUIResource [UI]
|
+ defaultFont Liberation Sans plain 15 javax.swing.plaf.FontUIResource [UI]
|
||||||
|
|
||||||
|
|||||||
@@ -1242,12 +1242,17 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
|||||||
#---- TitlePane ----
|
#---- TitlePane ----
|
||||||
|
|
||||||
TitlePane.background #303234 HSL 210 4 20 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.background #303234 HSL 210 4 20 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.buttonHoverBackground #55585c HSL 214 4 35 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse)
|
TitlePane.buttonArc 0
|
||||||
|
TitlePane.buttonHoverBackground #484c4f HSL 206 5 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
|
||||||
|
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.buttonMaximizedHeight 22
|
TitlePane.buttonMaximizedHeight 22
|
||||||
TitlePane.buttonMinimumWidth 30
|
TitlePane.buttonMinimumWidth 30
|
||||||
TitlePane.buttonPressedBackground #484c4f HSL 206 5 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
|
TitlePane.buttonPressedBackground #3f4144 HSL 216 4 26 com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse)
|
||||||
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
TitlePane.buttonSymbolHeight 10
|
TitlePane.buttonSymbolHeight 10
|
||||||
|
TitlePane.buttonsFillVertically true
|
||||||
|
TitlePane.buttonsGap 0
|
||||||
|
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.centerTitle false
|
TitlePane.centerTitle false
|
||||||
TitlePane.centerTitleIfMenuBarEmbedded true
|
TitlePane.centerTitleIfMenuBarEmbedded true
|
||||||
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
|||||||
@@ -45,8 +45,89 @@
|
|||||||
|
|
||||||
#---- TitlePane ----
|
#---- TitlePane ----
|
||||||
|
|
||||||
|
- TitlePane.buttonArc 0
|
||||||
|
+ TitlePane.buttonArc 999
|
||||||
|
|
||||||
|
+ TitlePane.buttonBackground #f2f2f2 HSL 0 0 95 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.buttonHoverBackground #f2f2f2 HSL 0 0 95 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
|
||||||
|
+ TitlePane.buttonHoverBackground #e6e6e6 HSL 0 0 90 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
+ TitlePane.buttonInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.buttonMaximizedHeight 22
|
||||||
|
+ TitlePane.buttonMaximizedHeight -1
|
||||||
|
|
||||||
|
- TitlePane.buttonPressedBackground #f7f7f7 HSL 0 0 97 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse)
|
||||||
|
+ TitlePane.buttonPressedBackground #d9d9d9 HSL 0 0 85 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
|
+ TitlePane.buttonSize 26,26 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.buttonSymbolHeight 10
|
||||||
|
+ TitlePane.buttonSymbolHeight 8
|
||||||
|
|
||||||
|
- TitlePane.buttonsFillVertically true
|
||||||
|
+ TitlePane.buttonsFillVertically false
|
||||||
|
|
||||||
|
- TitlePane.buttonsGap 0
|
||||||
|
+ TitlePane.buttonsGap 8
|
||||||
|
|
||||||
|
- TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
+ TitlePane.buttonsMargins 4,4,4,4 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
|
||||||
|
+ TitlePane.closeBackground #f2f2f2 HSL 0 0 95 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
+ TitlePane.closeHoverBackground #e6e6e6 HSL 0 0 90 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.closeHoverForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
+ TitlePane.closeHoverForeground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
||||||
|
+ TitlePane.closeIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.closePressedBackground #c42b1ce6 90% HSLA 5 75 44 90 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
+ TitlePane.closePressedBackground #d9d9d9 HSL 0 0 85 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse)
|
||||||
|
|
||||||
|
- TitlePane.closePressedForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
+ TitlePane.closePressedForeground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.iconifyIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
|
||||||
|
+ TitlePane.iconifyIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.maximizeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
|
||||||
|
+ TitlePane.maximizeIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.restoreIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
|
||||||
|
+ TitlePane.restoreIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
|
||||||
|
|
||||||
|
+ TitlePane.small.buttonInsets 1,1,1,1 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.buttonSize 30,20 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
|
+ TitlePane.small.buttonSize 20,20 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.buttonSymbolHeight 8
|
||||||
|
+ TitlePane.small.buttonSymbolHeight 6
|
||||||
|
|
||||||
|
+ TitlePane.small.buttonsGap 4
|
||||||
|
+ TitlePane.small.buttonsMargins 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.closeIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
||||||
|
+ TitlePane.small.closeIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
||||||
|
|
||||||
- TitlePane.small.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
|
- TitlePane.small.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
|
||||||
+ TitlePane.small.font [active] Liberation Sans plain 14 javax.swing.plaf.FontUIResource [UI]
|
+ TitlePane.small.font [active] Liberation Sans plain 14 javax.swing.plaf.FontUIResource [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.iconifyIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
|
||||||
|
+ TitlePane.small.iconifyIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.maximizeIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
|
||||||
|
+ TitlePane.small.maximizeIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
|
||||||
|
|
||||||
|
- TitlePane.small.restoreIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
|
||||||
|
+ TitlePane.small.restoreIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
|
||||||
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
|
||||||
+ defaultFont Liberation Sans plain 15 javax.swing.plaf.FontUIResource [UI]
|
+ defaultFont Liberation Sans plain 15 javax.swing.plaf.FontUIResource [UI]
|
||||||
|
|
||||||
|
|||||||
@@ -1247,12 +1247,17 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
|||||||
#---- TitlePane ----
|
#---- TitlePane ----
|
||||||
|
|
||||||
TitlePane.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.buttonHoverBackground #e6e6e6 HSL 0 0 90 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
|
TitlePane.buttonArc 0
|
||||||
|
TitlePane.buttonHoverBackground #f2f2f2 HSL 0 0 95 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
|
||||||
|
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.buttonMaximizedHeight 22
|
TitlePane.buttonMaximizedHeight 22
|
||||||
TitlePane.buttonMinimumWidth 30
|
TitlePane.buttonMinimumWidth 30
|
||||||
TitlePane.buttonPressedBackground #ebebeb HSL 0 0 92 com.formdev.flatlaf.util.DerivedColor [UI] darken(8% autoInverse)
|
TitlePane.buttonPressedBackground #f7f7f7 HSL 0 0 97 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse)
|
||||||
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
TitlePane.buttonSymbolHeight 10
|
TitlePane.buttonSymbolHeight 10
|
||||||
|
TitlePane.buttonsFillVertically true
|
||||||
|
TitlePane.buttonsGap 0
|
||||||
|
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.centerTitle false
|
TitlePane.centerTitle false
|
||||||
TitlePane.centerTitleIfMenuBarEmbedded true
|
TitlePane.centerTitleIfMenuBarEmbedded true
|
||||||
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
|||||||
@@ -1252,12 +1252,17 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
|||||||
#---- TitlePane ----
|
#---- TitlePane ----
|
||||||
|
|
||||||
TitlePane.background #323232 HSL 0 0 20 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.background #323232 HSL 0 0 20 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.buttonHoverBackground #585858 HSL 0 0 35 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse)
|
TitlePane.buttonArc 0
|
||||||
|
TitlePane.buttonHoverBackground #4c4c4c HSL 0 0 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
|
||||||
|
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.buttonMaximizedHeight 22
|
TitlePane.buttonMaximizedHeight 22
|
||||||
TitlePane.buttonMinimumWidth 30
|
TitlePane.buttonMinimumWidth 30
|
||||||
TitlePane.buttonPressedBackground #4c4c4c HSL 0 0 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
|
TitlePane.buttonPressedBackground #414141 HSL 0 0 25 com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse)
|
||||||
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
TitlePane.buttonSymbolHeight 10
|
TitlePane.buttonSymbolHeight 10
|
||||||
|
TitlePane.buttonsFillVertically true
|
||||||
|
TitlePane.buttonsGap 0
|
||||||
|
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.centerTitle false
|
TitlePane.centerTitle false
|
||||||
TitlePane.centerTitleIfMenuBarEmbedded true
|
TitlePane.centerTitleIfMenuBarEmbedded true
|
||||||
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
|||||||
@@ -1256,12 +1256,17 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
|||||||
#---- TitlePane ----
|
#---- TitlePane ----
|
||||||
|
|
||||||
TitlePane.background #ececec HSL 0 0 93 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.background #ececec HSL 0 0 93 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.buttonHoverBackground #d3d3d3 HSL 0 0 83 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
|
TitlePane.buttonArc 0
|
||||||
|
TitlePane.buttonHoverBackground #dfdfdf HSL 0 0 87 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
|
||||||
|
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.buttonMaximizedHeight 22
|
TitlePane.buttonMaximizedHeight 22
|
||||||
TitlePane.buttonMinimumWidth 30
|
TitlePane.buttonMinimumWidth 30
|
||||||
TitlePane.buttonPressedBackground #d8d8d8 HSL 0 0 85 com.formdev.flatlaf.util.DerivedColor [UI] darken(8% autoInverse)
|
TitlePane.buttonPressedBackground #e4e4e4 HSL 0 0 89 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse)
|
||||||
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
TitlePane.buttonSymbolHeight 10
|
TitlePane.buttonSymbolHeight 10
|
||||||
|
TitlePane.buttonsFillVertically true
|
||||||
|
TitlePane.buttonsGap 0
|
||||||
|
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.centerTitle false
|
TitlePane.centerTitle false
|
||||||
TitlePane.centerTitleIfMenuBarEmbedded true
|
TitlePane.centerTitleIfMenuBarEmbedded true
|
||||||
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
|||||||
@@ -1293,17 +1293,34 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
|
|||||||
|
|
||||||
TitlePane.background #00ff00 HSL 120 100 50 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.background #00ff00 HSL 120 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.borderColor #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.borderColor #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.buttonArc 0
|
||||||
|
TitlePane.buttonBackground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.buttonForeground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.buttonHoverBackground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.buttonHoverForeground #00ff00 HSL 120 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.buttonInactiveBackground #dddddd HSL 0 0 87 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.buttonInactiveForeground #0000ff HSL 240 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.buttonMaximizedHeight 22
|
TitlePane.buttonMaximizedHeight 22
|
||||||
TitlePane.buttonMinimumWidth 30
|
TitlePane.buttonMinimumWidth 30
|
||||||
|
TitlePane.buttonPressedBackground #999999 HSL 0 0 60 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.buttonPressedForeground #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
|
||||||
TitlePane.buttonSymbolHeight 10
|
TitlePane.buttonSymbolHeight 10
|
||||||
|
TitlePane.buttonsFillVertically true
|
||||||
|
TitlePane.buttonsGap 0
|
||||||
|
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
|
||||||
TitlePane.centerTitle false
|
TitlePane.centerTitle false
|
||||||
TitlePane.centerTitleIfMenuBarEmbedded true
|
TitlePane.centerTitleIfMenuBarEmbedded true
|
||||||
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.closeBackground #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.closeHoverForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.closeForeground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.closeHoverBackground #bb0000 HSL 0 100 37 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.closeHoverForeground #ff00ff HSL 300 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
TitlePane.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
|
||||||
TitlePane.closePressedBackground #c42b1ce6 90% HSLA 5 75 44 90 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.closeInactiveBackground #dd0000 HSL 0 100 43 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.closePressedForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.closeInactiveForeground #00ffff HSL 180 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.closePressedBackground #990000 HSL 0 100 30 javax.swing.plaf.ColorUIResource [UI]
|
||||||
|
TitlePane.closePressedForeground #00ff00 HSL 120 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.font [active] $defaultFont [UI]
|
TitlePane.font [active] $defaultFont [UI]
|
||||||
TitlePane.foreground #0000ff HSL 240 100 50 javax.swing.plaf.ColorUIResource [UI]
|
TitlePane.foreground #0000ff HSL 240 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||||
TitlePane.icon [lazy] 16,16 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
|
TitlePane.icon [lazy] 16,16 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)
|
||||||
|
|||||||
@@ -102,9 +102,9 @@ public class UIDefaultsDump
|
|||||||
|
|
||||||
dump( FlatMacLightLaf.class.getName(), dir, false );
|
dump( FlatMacLightLaf.class.getName(), dir, false );
|
||||||
dump( FlatMacDarkLaf.class.getName(), dir, false );
|
dump( FlatMacDarkLaf.class.getName(), dir, false );
|
||||||
}
|
|
||||||
|
|
||||||
dump( FlatTestLaf.class.getName(), dir, false );
|
dump( FlatTestLaf.class.getName(), dir, false );
|
||||||
|
}
|
||||||
|
|
||||||
// dump( MyBasicLookAndFeel.class.getName(), dir, false );
|
// dump( MyBasicLookAndFeel.class.getName(), dir, false );
|
||||||
// dump( MetalLookAndFeel.class.getName(), dir, false );
|
// dump( MetalLookAndFeel.class.getName(), dir, false );
|
||||||
@@ -184,7 +184,10 @@ public class UIDefaultsDump
|
|||||||
dump( dir, "", lookAndFeel, defaults, key -> !key.contains( "InputMap" ) );
|
dump( dir, "", lookAndFeel, defaults, key -> !key.contains( "InputMap" ) );
|
||||||
|
|
||||||
if( lookAndFeel.getClass() == FlatLightLaf.class || !(lookAndFeel instanceof FlatLaf) ) {
|
if( lookAndFeel.getClass() == FlatLightLaf.class || !(lookAndFeel instanceof FlatLaf) ) {
|
||||||
|
if( SystemInfo.isWindows || SystemInfo.isMacOS )
|
||||||
dump( dir, "_InputMap", lookAndFeel, defaults, key -> key.contains( "InputMap" ) );
|
dump( dir, "_InputMap", lookAndFeel, defaults, key -> key.contains( "InputMap" ) );
|
||||||
|
|
||||||
|
if( SystemInfo.isWindows )
|
||||||
dumpActionMaps( dir, "_ActionMap", lookAndFeel, defaults );
|
dumpActionMaps( dir, "_ActionMap", lookAndFeel, defaults );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -463,6 +463,24 @@ TitlePane.foreground = #00f
|
|||||||
TitlePane.inactiveForeground = #fff
|
TitlePane.inactiveForeground = #fff
|
||||||
TitlePane.borderColor = #f00
|
TitlePane.borderColor = #f00
|
||||||
|
|
||||||
|
TitlePane.buttonBackground = #fff
|
||||||
|
TitlePane.buttonForeground = #000
|
||||||
|
TitlePane.buttonInactiveBackground = #ddd
|
||||||
|
TitlePane.buttonInactiveForeground = #00f
|
||||||
|
TitlePane.buttonHoverBackground = #bbb
|
||||||
|
TitlePane.buttonHoverForeground = #0f0
|
||||||
|
TitlePane.buttonPressedBackground = #999
|
||||||
|
TitlePane.buttonPressedForeground = #f00
|
||||||
|
|
||||||
|
TitlePane.closeBackground = #f00
|
||||||
|
TitlePane.closeForeground = #000
|
||||||
|
TitlePane.closeInactiveBackground = #d00
|
||||||
|
TitlePane.closeInactiveForeground = #0ff
|
||||||
|
TitlePane.closeHoverBackground = #b00
|
||||||
|
TitlePane.closeHoverForeground = #f0f
|
||||||
|
TitlePane.closePressedBackground = #900
|
||||||
|
TitlePane.closePressedForeground = #0f0
|
||||||
|
|
||||||
|
|
||||||
#---- ToggleButton ----
|
#---- ToggleButton ----
|
||||||
|
|
||||||
|
|||||||
@@ -1057,17 +1057,32 @@ TextPane.selectionForeground
|
|||||||
TextPaneUI
|
TextPaneUI
|
||||||
TitlePane.background
|
TitlePane.background
|
||||||
TitlePane.borderColor
|
TitlePane.borderColor
|
||||||
|
TitlePane.buttonArc
|
||||||
|
TitlePane.buttonBackground
|
||||||
|
TitlePane.buttonForeground
|
||||||
TitlePane.buttonHoverBackground
|
TitlePane.buttonHoverBackground
|
||||||
|
TitlePane.buttonHoverForeground
|
||||||
|
TitlePane.buttonInactiveBackground
|
||||||
|
TitlePane.buttonInactiveForeground
|
||||||
|
TitlePane.buttonInsets
|
||||||
TitlePane.buttonMaximizedHeight
|
TitlePane.buttonMaximizedHeight
|
||||||
TitlePane.buttonMinimumWidth
|
TitlePane.buttonMinimumWidth
|
||||||
TitlePane.buttonPressedBackground
|
TitlePane.buttonPressedBackground
|
||||||
|
TitlePane.buttonPressedForeground
|
||||||
TitlePane.buttonSize
|
TitlePane.buttonSize
|
||||||
TitlePane.buttonSymbolHeight
|
TitlePane.buttonSymbolHeight
|
||||||
|
TitlePane.buttonsFillVertically
|
||||||
|
TitlePane.buttonsGap
|
||||||
|
TitlePane.buttonsMargins
|
||||||
TitlePane.centerTitle
|
TitlePane.centerTitle
|
||||||
TitlePane.centerTitleIfMenuBarEmbedded
|
TitlePane.centerTitleIfMenuBarEmbedded
|
||||||
|
TitlePane.closeBackground
|
||||||
|
TitlePane.closeForeground
|
||||||
TitlePane.closeHoverBackground
|
TitlePane.closeHoverBackground
|
||||||
TitlePane.closeHoverForeground
|
TitlePane.closeHoverForeground
|
||||||
TitlePane.closeIcon
|
TitlePane.closeIcon
|
||||||
|
TitlePane.closeInactiveBackground
|
||||||
|
TitlePane.closeInactiveForeground
|
||||||
TitlePane.closePressedBackground
|
TitlePane.closePressedBackground
|
||||||
TitlePane.closePressedForeground
|
TitlePane.closePressedForeground
|
||||||
TitlePane.embeddedForeground
|
TitlePane.embeddedForeground
|
||||||
@@ -1089,17 +1104,32 @@ TitlePane.showIcon
|
|||||||
TitlePane.showIconBesideTitle
|
TitlePane.showIconBesideTitle
|
||||||
TitlePane.showIconInDialogs
|
TitlePane.showIconInDialogs
|
||||||
TitlePane.small.background
|
TitlePane.small.background
|
||||||
|
TitlePane.small.buttonArc
|
||||||
|
TitlePane.small.buttonBackground
|
||||||
|
TitlePane.small.buttonForeground
|
||||||
TitlePane.small.buttonHoverBackground
|
TitlePane.small.buttonHoverBackground
|
||||||
|
TitlePane.small.buttonHoverForeground
|
||||||
|
TitlePane.small.buttonInactiveBackground
|
||||||
|
TitlePane.small.buttonInactiveForeground
|
||||||
|
TitlePane.small.buttonInsets
|
||||||
TitlePane.small.buttonMaximizedHeight
|
TitlePane.small.buttonMaximizedHeight
|
||||||
TitlePane.small.buttonMinimumWidth
|
TitlePane.small.buttonMinimumWidth
|
||||||
TitlePane.small.buttonPressedBackground
|
TitlePane.small.buttonPressedBackground
|
||||||
|
TitlePane.small.buttonPressedForeground
|
||||||
TitlePane.small.buttonSize
|
TitlePane.small.buttonSize
|
||||||
TitlePane.small.buttonSymbolHeight
|
TitlePane.small.buttonSymbolHeight
|
||||||
|
TitlePane.small.buttonsFillVertically
|
||||||
|
TitlePane.small.buttonsGap
|
||||||
|
TitlePane.small.buttonsMargins
|
||||||
TitlePane.small.centerTitle
|
TitlePane.small.centerTitle
|
||||||
TitlePane.small.centerTitleIfMenuBarEmbedded
|
TitlePane.small.centerTitleIfMenuBarEmbedded
|
||||||
|
TitlePane.small.closeBackground
|
||||||
|
TitlePane.small.closeForeground
|
||||||
TitlePane.small.closeHoverBackground
|
TitlePane.small.closeHoverBackground
|
||||||
TitlePane.small.closeHoverForeground
|
TitlePane.small.closeHoverForeground
|
||||||
TitlePane.small.closeIcon
|
TitlePane.small.closeIcon
|
||||||
|
TitlePane.small.closeInactiveBackground
|
||||||
|
TitlePane.small.closeInactiveForeground
|
||||||
TitlePane.small.closePressedBackground
|
TitlePane.small.closePressedBackground
|
||||||
TitlePane.small.closePressedForeground
|
TitlePane.small.closePressedForeground
|
||||||
TitlePane.small.embeddedForeground
|
TitlePane.small.embeddedForeground
|
||||||
|
|||||||
Reference in New Issue
Block a user