mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
Merge PR #643: Windows 11: Rounded popup windows
This commit is contained in:
@@ -5,6 +5,8 @@ FlatLaf Change Log
|
||||
|
||||
#### New features and improvements
|
||||
|
||||
- Windows 11: Popups (`JPopupMenu`, `JComboBox`, `JToolTip`, etc.) now use
|
||||
native Windows 11 rounded borders and drop shadows.
|
||||
- Fonts:
|
||||
- Added **Roboto Mono** (https://fonts.google.com/specimen/Roboto+Mono). (PR
|
||||
#639, issue #638)
|
||||
|
||||
@@ -268,6 +268,25 @@ public interface FlatClientProperties
|
||||
|
||||
//---- Popup --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Specifies the popup border corner radius if the component is shown in a popup
|
||||
* or if the component is the owner of another component that is shown in a popup.
|
||||
* <p>
|
||||
* Note that this is not available on all platforms since it requires special support.
|
||||
* Supported platforms:
|
||||
* <p>
|
||||
* <strong>Windows 11</strong> (x86 or x86_64): Only two corner radiuses are supported
|
||||
* by the OS: {@code DWMWCP_ROUND} is 8px and {@code DWMWCP_ROUNDSMALL} is 4px.
|
||||
* If this value is {@code 1 - 4}, then {@code DWMWCP_ROUNDSMALL} is used.
|
||||
* If it is {@code >= 5}, then {@code DWMWCP_ROUND} is used.
|
||||
* <p>
|
||||
* <strong>Component</strong> {@link javax.swing.JComponent}<br>
|
||||
* <strong>Value type</strong> {@link java.lang.Integer}<br>
|
||||
*
|
||||
* @since 3.1
|
||||
*/
|
||||
String POPUP_BORDER_CORNER_RADIUS = "Popup.borderCornerRadius";
|
||||
|
||||
/**
|
||||
* Specifies whether a drop shadow is painted if the component is shown in a popup
|
||||
* or if the component is the owner of another component that is shown in a popup.
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2022 FormDev Software GmbH
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.formdev.flatlaf.ui;
|
||||
|
||||
import java.awt.Window;
|
||||
|
||||
/**
|
||||
* Native methods for Windows.
|
||||
* <p>
|
||||
* <b>Note</b>: This is private API. Do not use!
|
||||
*
|
||||
* @author Karl Tauber
|
||||
* @since 3.1
|
||||
*/
|
||||
public class FlatNativeWindowsLibrary
|
||||
{
|
||||
private static long osBuildNumber = Long.MIN_VALUE;
|
||||
|
||||
public static boolean isLoaded() {
|
||||
return FlatNativeLibrary.isLoaded();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Windows operating system build number.
|
||||
* <p>
|
||||
* Invokes Win32 API method {@code GetVersionEx()} and returns {@code OSVERSIONINFO.dwBuildNumber}.
|
||||
* See https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getversionexa
|
||||
*/
|
||||
public static long getOSBuildNumber() {
|
||||
if( osBuildNumber == Long.MIN_VALUE )
|
||||
osBuildNumber = getOSBuildNumberImpl();
|
||||
return osBuildNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes Win32 API method {@code GetVersionEx()} and returns {@code OSVERSIONINFO.dwBuildNumber}.
|
||||
* See https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getversionexa
|
||||
*/
|
||||
private native static long getOSBuildNumberImpl();
|
||||
|
||||
/**
|
||||
* Gets the Windows window handle (HWND) for the given Swing window.
|
||||
* <p>
|
||||
* Note that the underlying Windows window must be already created,
|
||||
* otherwise this method returns zero. Use following to ensure this:
|
||||
* <pre>{@code
|
||||
* if( !window.isDisplayable() )
|
||||
* window.addNotify();
|
||||
* }</pre>
|
||||
* or invoke this method after packing the window. E.g.
|
||||
* <pre>{@code
|
||||
* window.pack();
|
||||
* long hwnd = getHWND( window );
|
||||
* }</pre>
|
||||
*/
|
||||
public native static long getHWND( Window window );
|
||||
|
||||
/**
|
||||
* DWM_WINDOW_CORNER_PREFERENCE
|
||||
* see https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwm_window_corner_preference
|
||||
*/
|
||||
public static final int
|
||||
DWMWCP_DEFAULT = 0,
|
||||
DWMWCP_DONOTROUND = 1,
|
||||
DWMWCP_ROUND = 2,
|
||||
DWMWCP_ROUNDSMALL = 3;
|
||||
|
||||
/**
|
||||
* Sets the rounded corner preference for the window.
|
||||
* Allowed values are {@link #DWMWCP_DEFAULT}, {@link #DWMWCP_DONOTROUND},
|
||||
* {@link #DWMWCP_ROUND} and {@link #DWMWCP_ROUNDSMALL}.
|
||||
* <p>
|
||||
* Invokes Win32 API method {@code DwmSetWindowAttribute(DWMWA_WINDOW_CORNER_PREFERENCE)}.
|
||||
* See https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute
|
||||
* <p>
|
||||
* Supported since Windows 11 Build 22000.
|
||||
*/
|
||||
public native static boolean setWindowCornerPreference( long hwnd, int cornerPreference );
|
||||
|
||||
/**
|
||||
* Sets the color of the window border.
|
||||
* The red/green/blue values must be in range {@code 0 - 255}.
|
||||
* If red is {@code -1}, then the system default border color is used (useful to reset the border color).
|
||||
* If red is {@code -2}, then no border is painted.
|
||||
* <p>
|
||||
* Invokes Win32 API method {@code DwmSetWindowAttribute(DWMWA_BORDER_COLOR)}.
|
||||
* See https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute
|
||||
* <p>
|
||||
* Supported since Windows 11 Build 22000.
|
||||
*/
|
||||
public native static boolean setWindowBorderColor( long hwnd, int red, int green, int blue );
|
||||
}
|
||||
@@ -43,6 +43,7 @@ import java.lang.reflect.Method;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLayeredPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JToolTip;
|
||||
import javax.swing.JWindow;
|
||||
import javax.swing.Popup;
|
||||
@@ -52,6 +53,9 @@ import javax.swing.SwingUtilities;
|
||||
import javax.swing.ToolTipManager;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.border.LineBorder;
|
||||
import javax.swing.plaf.basic.BasicComboPopup;
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
@@ -88,6 +92,17 @@ public class FlatPopupFactory
|
||||
if( SystemInfo.isMacOS || SystemInfo.isLinux )
|
||||
return new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, true ), contents );
|
||||
|
||||
// Windows 11 with FlatLaf native library can use rounded corners and shows drop shadow for heavy weight popups
|
||||
int borderCornerRadius;
|
||||
if( isWindows11BorderSupported() &&
|
||||
(borderCornerRadius = getBorderCornerRadius( owner, contents )) > 0 )
|
||||
{
|
||||
NonFlashingPopup popup = new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, true ), contents );
|
||||
if( popup.popupWindow != null )
|
||||
setupWindows11Border( popup.popupWindow, contents, borderCornerRadius );
|
||||
return popup;
|
||||
}
|
||||
|
||||
// create drop shadow popup
|
||||
return new DropShadowPopup( getPopupForScreenOfOwner( owner, contents, x, y, forceHeavyWeight ), owner, contents );
|
||||
}
|
||||
@@ -166,19 +181,39 @@ public class FlatPopupFactory
|
||||
}
|
||||
|
||||
private boolean isOptionEnabled( Component owner, Component contents, String clientKey, String uiKey ) {
|
||||
if( owner instanceof JComponent ) {
|
||||
Boolean b = FlatClientProperties.clientPropertyBooleanStrict( (JComponent) owner, clientKey, null );
|
||||
if( b != null )
|
||||
return b;
|
||||
Object value = getOption( owner, contents, clientKey, uiKey );
|
||||
return (value instanceof Boolean) ? (Boolean) value : false;
|
||||
}
|
||||
|
||||
private int getBorderCornerRadius( Component owner, Component contents ) {
|
||||
String uiKey =
|
||||
(contents instanceof BasicComboPopup) ? "ComboBox.borderCornerRadius" :
|
||||
(contents instanceof JPopupMenu) ? "PopupMenu.borderCornerRadius" :
|
||||
(contents instanceof JToolTip) ? "ToolTip.borderCornerRadius" :
|
||||
"Popup.borderCornerRadius";
|
||||
|
||||
Object value = getOption( owner, contents, FlatClientProperties.POPUP_BORDER_CORNER_RADIUS, uiKey );
|
||||
return (value instanceof Integer) ? (Integer) value : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get option from:
|
||||
* <ol>
|
||||
* <li>client property {@code clientKey} of {@code owner}
|
||||
* <li>client property {@code clientKey} of {@code contents}
|
||||
* <li>UI property {@code uiKey}
|
||||
* </ol>
|
||||
*/
|
||||
private Object getOption( Component owner, Component contents, String clientKey, String uiKey ) {
|
||||
for( Component c : new Component[] { owner, contents } ) {
|
||||
if( c instanceof JComponent ) {
|
||||
Object value = ((JComponent)c).getClientProperty( clientKey );
|
||||
if( value != null )
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
if( contents instanceof JComponent ) {
|
||||
Boolean b = FlatClientProperties.clientPropertyBooleanStrict( (JComponent) contents, clientKey, null );
|
||||
if( b != null )
|
||||
return b;
|
||||
}
|
||||
|
||||
return UIManager.getBoolean( uiKey );
|
||||
return UIManager.get( uiKey );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -300,6 +335,60 @@ public class FlatPopupFactory
|
||||
((JComponent)owner).getToolTipLocation( me ) != null;
|
||||
}
|
||||
|
||||
private static boolean isWindows11BorderSupported() {
|
||||
return SystemInfo.isWindows_11_orLater && FlatNativeWindowsLibrary.isLoaded();
|
||||
}
|
||||
|
||||
private static void setupWindows11Border( Window popupWindow, Component contents, int borderCornerRadius ) {
|
||||
// make sure that the Windows 11 window is created
|
||||
if( !popupWindow.isDisplayable() )
|
||||
popupWindow.addNotify();
|
||||
|
||||
// get window handle
|
||||
long hwnd = FlatNativeWindowsLibrary.getHWND( popupWindow );
|
||||
|
||||
// set corner preference
|
||||
int cornerPreference = (borderCornerRadius <= 4)
|
||||
? FlatNativeWindowsLibrary.DWMWCP_ROUNDSMALL // 4px
|
||||
: FlatNativeWindowsLibrary.DWMWCP_ROUND; // 8px
|
||||
FlatNativeWindowsLibrary.setWindowCornerPreference( hwnd, cornerPreference );
|
||||
|
||||
// set border color
|
||||
int red = -1; // use system default color
|
||||
int green = 0;
|
||||
int blue = 0;
|
||||
if( contents instanceof JComponent ) {
|
||||
Border border = ((JComponent)contents).getBorder();
|
||||
border = FlatUIUtils.unwrapNonUIResourceBorder( border );
|
||||
|
||||
// get color from border of contents (e.g. JPopupMenu or JToolTip)
|
||||
Color borderColor = null;
|
||||
if( border instanceof FlatLineBorder )
|
||||
borderColor = ((FlatLineBorder)border).getLineColor();
|
||||
else if( border instanceof LineBorder )
|
||||
borderColor = ((LineBorder)border).getLineColor();
|
||||
else if( border instanceof EmptyBorder )
|
||||
red = -2; // do not paint border
|
||||
|
||||
if( borderColor != null ) {
|
||||
red = borderColor.getRed();
|
||||
green = borderColor.getGreen();
|
||||
blue = borderColor.getBlue();
|
||||
}
|
||||
}
|
||||
FlatNativeWindowsLibrary.setWindowBorderColor( hwnd, red, green, blue );
|
||||
}
|
||||
|
||||
private static void resetWindows11Border( Window popupWindow ) {
|
||||
// get window handle
|
||||
long hwnd = FlatNativeWindowsLibrary.getHWND( popupWindow );
|
||||
if( hwnd == 0 )
|
||||
return;
|
||||
|
||||
// reset corner preference
|
||||
FlatNativeWindowsLibrary.setWindowCornerPreference( hwnd, FlatNativeWindowsLibrary.DWMWCP_DONOTROUND );
|
||||
}
|
||||
|
||||
//---- class NonFlashingPopup ---------------------------------------------
|
||||
|
||||
private class NonFlashingPopup
|
||||
@@ -431,6 +520,14 @@ public class FlatPopupFactory
|
||||
oldDropShadowWindowBackground = dropShadowWindow.getBackground();
|
||||
dropShadowWindow.setBackground( new Color( 0, true ) );
|
||||
}
|
||||
|
||||
// Windows 11: reset corner preference on reused heavy weight popups
|
||||
if( isWindows11BorderSupported() ) {
|
||||
resetWindows11Border( popupWindow );
|
||||
if( dropShadowWindow != null )
|
||||
resetWindows11Border( dropShadowWindow );
|
||||
}
|
||||
|
||||
} else {
|
||||
mediumWeightPanel = (Panel) SwingUtilities.getAncestorOfClass( Panel.class, contents );
|
||||
if( mediumWeightPanel != null ) {
|
||||
|
||||
@@ -67,6 +67,7 @@ import javax.swing.plaf.basic.BasicComboPopup;
|
||||
import javax.swing.plaf.basic.BasicMenuItemUI;
|
||||
import javax.swing.plaf.basic.BasicPopupMenuUI;
|
||||
import javax.swing.plaf.basic.DefaultMenuLayout;
|
||||
import com.formdev.flatlaf.FlatClientProperties;
|
||||
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
|
||||
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
|
||||
import com.formdev.flatlaf.util.LoggingFacade;
|
||||
@@ -297,6 +298,9 @@ public class FlatPopupMenuUI
|
||||
popup.addMenuKeyListener( this );
|
||||
|
||||
updateArrowButtons();
|
||||
|
||||
putClientProperty( FlatClientProperties.POPUP_BORDER_CORNER_RADIUS,
|
||||
UIManager.getInt( "PopupMenu.borderCornerRadius" ) );
|
||||
}
|
||||
|
||||
void scroll( int unitsToScroll ) {
|
||||
|
||||
@@ -200,6 +200,10 @@ public class FlatUIUtils
|
||||
return (border instanceof UIResource) ? new NonUIResourceBorder( border ) : border;
|
||||
}
|
||||
|
||||
static Border unwrapNonUIResourceBorder( Border border ) {
|
||||
return (border instanceof NonUIResourceBorder) ? ((NonUIResourceBorder)border).delegate : border;
|
||||
}
|
||||
|
||||
public static int minimumWidth( JComponent c, int minimumWidth ) {
|
||||
return FlatClientProperties.clientPropertyInt( c, FlatClientProperties.MINIMUM_WIDTH, minimumWidth );
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.formdev.flatlaf.util;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.StringTokenizer;
|
||||
import com.formdev.flatlaf.ui.FlatNativeWindowsLibrary;
|
||||
|
||||
/**
|
||||
* Provides information about the current system.
|
||||
@@ -34,9 +35,7 @@ public class SystemInfo
|
||||
// OS versions
|
||||
public static final long osVersion;
|
||||
public static final boolean isWindows_10_orLater;
|
||||
/** <strong>Note</strong>: This requires Java 8u321, 11.0.14, 17.0.2 or 18 (or later).
|
||||
* (see https://bugs.openjdk.java.net/browse/JDK-8274840)
|
||||
* @since 2 */ public static final boolean isWindows_11_orLater;
|
||||
/** @since 2 */ public static final boolean isWindows_11_orLater;
|
||||
public static final boolean isMacOS_10_11_ElCapitan_orLater;
|
||||
public static final boolean isMacOS_10_14_Mojave_orLater;
|
||||
public static final boolean isMacOS_10_15_Catalina_orLater;
|
||||
@@ -80,8 +79,6 @@ public class SystemInfo
|
||||
// OS versions
|
||||
osVersion = scanVersion( System.getProperty( "os.version" ) );
|
||||
isWindows_10_orLater = (isWindows && osVersion >= toVersion( 10, 0, 0, 0 ));
|
||||
isWindows_11_orLater = (isWindows_10_orLater && osName.length() > "windows ".length() &&
|
||||
scanVersion( osName.substring( "windows ".length() ) ) >= toVersion( 11, 0, 0, 0 ));
|
||||
isMacOS_10_11_ElCapitan_orLater = (isMacOS && osVersion >= toVersion( 10, 11, 0, 0 ));
|
||||
isMacOS_10_14_Mojave_orLater = (isMacOS && osVersion >= toVersion( 10, 14, 0, 0 ));
|
||||
isMacOS_10_15_Catalina_orLater = (isMacOS && osVersion >= toVersion( 10, 15, 0, 0 ));
|
||||
@@ -119,6 +116,24 @@ public class SystemInfo
|
||||
isMacFullWindowContentSupported =
|
||||
javaVersion >= toVersion( 11, 0, 8, 0 ) ||
|
||||
(javaVersion >= toVersion( 1, 8, 0, 292 ) && !isJava_9_orLater);
|
||||
|
||||
|
||||
// Note: Keep following at the end of this block because (optional) loading
|
||||
// of native library uses fields of this class. E.g. isX86_64
|
||||
|
||||
// Windows 11 detection is implemented in Java 8u321, 11.0.14, 17.0.2 and 18 (or later).
|
||||
// (see https://bugs.openjdk.java.net/browse/JDK-8274840)
|
||||
// For older Java versions, use native library to get OS build number.
|
||||
boolean isWin_11_orLater = false;
|
||||
try {
|
||||
isWin_11_orLater = (isWindows_10_orLater &&
|
||||
(scanVersion( StringUtils.removeLeading( osName, "windows " ) ) >= toVersion( 11, 0, 0, 0 )) ||
|
||||
(FlatNativeWindowsLibrary.isLoaded() && FlatNativeWindowsLibrary.getOSBuildNumber() >= 22000));
|
||||
} catch( Throwable ex ) {
|
||||
// catch to avoid that application can not start if native library is not up-to-date
|
||||
LoggingFacade.INSTANCE.logSevere( null, ex );
|
||||
}
|
||||
isWindows_11_orLater = isWin_11_orLater;
|
||||
}
|
||||
|
||||
public static long scanVersion( String version ) {
|
||||
|
||||
@@ -288,6 +288,7 @@ ComboBox.buttonPressedArrowColor = @buttonPressedArrowColor
|
||||
ComboBox.popupInsets = 0,0,0,0
|
||||
ComboBox.selectionInsets = 0,0,0,0
|
||||
ComboBox.selectionArc = 0
|
||||
ComboBox.borderCornerRadius = $Popup.borderCornerRadius
|
||||
|
||||
|
||||
#---- Component ----
|
||||
@@ -503,6 +504,7 @@ PasswordField.revealIcon = com.formdev.flatlaf.icons.FlatRevealIcon
|
||||
|
||||
#---- Popup ----
|
||||
|
||||
Popup.borderCornerRadius = 4
|
||||
Popup.dropShadowPainted = true
|
||||
Popup.dropShadowInsets = -4,-4,4,4
|
||||
|
||||
@@ -511,6 +513,7 @@ Popup.dropShadowInsets = -4,-4,4,4
|
||||
|
||||
PopupMenu.border = com.formdev.flatlaf.ui.FlatPopupMenuBorder
|
||||
PopupMenu.borderInsets = 4,1,4,1
|
||||
PopupMenu.borderCornerRadius = $Popup.borderCornerRadius
|
||||
PopupMenu.background = @menuBackground
|
||||
PopupMenu.scrollArrowColor = @buttonArrowColor
|
||||
|
||||
@@ -880,6 +883,11 @@ ToolBar.spacingBorder = $Button.toolbar.spacingInsets
|
||||
ToolTipManager.enableToolTipMode = activeApplication
|
||||
|
||||
|
||||
#---- ToolTip ----
|
||||
|
||||
ToolTip.borderCornerRadius = $Popup.borderCornerRadius
|
||||
|
||||
|
||||
#---- Tree ----
|
||||
|
||||
Tree.border = 1,1,1,1
|
||||
|
||||
@@ -149,6 +149,7 @@ ComboBox.selectionBackground = @menuSelectionBackground
|
||||
ComboBox.popupInsets = 5,0,5,0
|
||||
ComboBox.selectionInsets = 0,5,0,5
|
||||
ComboBox.selectionArc = 8
|
||||
ComboBox.borderCornerRadius = 8
|
||||
|
||||
|
||||
#---- Component ----
|
||||
@@ -205,6 +206,7 @@ PasswordField.selectionForeground = @textSelectionForeground
|
||||
#---- PopupMenu ----
|
||||
|
||||
PopupMenu.borderInsets = 6,1,6,1
|
||||
PopupMenu.borderCornerRadius = 8
|
||||
|
||||
|
||||
#---- ProgressBar ----
|
||||
|
||||
@@ -150,6 +150,7 @@ ComboBox.selectionBackground = @menuSelectionBackground
|
||||
ComboBox.popupInsets = 5,0,5,0
|
||||
ComboBox.selectionInsets = 0,5,0,5
|
||||
ComboBox.selectionArc = 8
|
||||
ComboBox.borderCornerRadius = 8
|
||||
|
||||
|
||||
#---- Component ----
|
||||
@@ -206,6 +207,7 @@ PasswordField.selectionForeground = @textSelectionForeground
|
||||
#---- PopupMenu ----
|
||||
|
||||
PopupMenu.borderInsets = 6,1,6,1
|
||||
PopupMenu.borderCornerRadius = 8
|
||||
|
||||
|
||||
#---- ProgressBar ----
|
||||
|
||||
@@ -22,6 +22,7 @@ plugins {
|
||||
|
||||
flatlafJniHeaders {
|
||||
headers = listOf(
|
||||
"com_formdev_flatlaf_ui_FlatNativeWindowsLibrary.h",
|
||||
"com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder.h",
|
||||
"com_formdev_flatlaf_ui_FlatWindowsNativeWindowBorder_WndProc.h"
|
||||
)
|
||||
@@ -74,8 +75,8 @@ tasks {
|
||||
|
||||
linkerArgs.addAll( toolChain.map {
|
||||
when( it ) {
|
||||
is Gcc, is Clang -> listOf( "-l${jawt}", "-lUser32", "-lGdi32", "-lshell32", "-lAdvAPI32", "-lKernel32" )
|
||||
is VisualCpp -> listOf( "${jawt}.lib", "User32.lib", "Gdi32.lib", "shell32.lib", "AdvAPI32.lib", "Kernel32.lib", "/NODEFAULTLIB" )
|
||||
is Gcc, is Clang -> listOf( "-l${jawt}", "-lUser32", "-lGdi32", "-lshell32", "-lAdvAPI32", "-lKernel32", "-lDwmapi" )
|
||||
is VisualCpp -> listOf( "${jawt}.lib", "User32.lib", "Gdi32.lib", "shell32.lib", "AdvAPI32.lib", "Kernel32.lib", "Dwmapi.lib", "/NODEFAULTLIB" )
|
||||
else -> emptyList()
|
||||
}
|
||||
} )
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
|
||||
HWND getWindowHandle( JNIEnv* env, jobject window );
|
||||
|
||||
//---- JNI methods ------------------------------------------------------------
|
||||
|
||||
extern "C"
|
||||
@@ -540,7 +542,7 @@ void FlatWndProc::setMenuItemState( HMENU systemMenu, int item, bool enabled ) {
|
||||
::SetMenuItemInfo( systemMenu, item, FALSE, &mii );
|
||||
}
|
||||
|
||||
HWND FlatWndProc::getWindowHandle( JNIEnv* env, jobject window ) {
|
||||
HWND getWindowHandle( JNIEnv* env, jobject window ) {
|
||||
JAWT awt;
|
||||
awt.version = JAWT_VERSION_1_4;
|
||||
if( !JAWT_GetAWT( env, &awt ) )
|
||||
|
||||
@@ -67,6 +67,4 @@ private:
|
||||
void sendMessageToClientArea( HWND hwnd, int uMsg, LPARAM lParam );
|
||||
void openSystemMenu( HWND hwnd, int x, int y );
|
||||
void setMenuItemState( HMENU systemMenu, int item, bool enabled );
|
||||
|
||||
static HWND getWindowHandle( JNIEnv* env, jobject window );
|
||||
};
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright 2022 FormDev Software GmbH
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// avoid inlining of printf()
|
||||
#define _NO_CRT_STDIO_INLINE
|
||||
|
||||
#include <windows.h>
|
||||
#include <dwmapi.h>
|
||||
#include "com_formdev_flatlaf_ui_FlatNativeWindowsLibrary.h"
|
||||
|
||||
/**
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
|
||||
// see FlatWndProc.cpp
|
||||
HWND getWindowHandle( JNIEnv* env, jobject window );
|
||||
|
||||
//---- Utility ----------------------------------------------------------------
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jlong JNICALL Java_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_getOSBuildNumberImpl
|
||||
( JNIEnv* env, jclass cls )
|
||||
{
|
||||
OSVERSIONINFO info;
|
||||
info.dwOSVersionInfoSize = sizeof( info );
|
||||
if( !::GetVersionEx( &info ) )
|
||||
return 0;
|
||||
return info.dwBuildNumber;
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jlong JNICALL Java_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_getHWND
|
||||
( JNIEnv* env, jclass cls, jobject window )
|
||||
{
|
||||
return reinterpret_cast<jlong>( getWindowHandle( env, window ) );
|
||||
}
|
||||
|
||||
//---- Desktop Window Manager (DWM) -------------------------------------------
|
||||
|
||||
// define constants that may not available in older development environments
|
||||
|
||||
#ifndef DWMWA_COLOR_DEFAULT
|
||||
|
||||
#define DWMWA_WINDOW_CORNER_PREFERENCE 33
|
||||
#define DWMWA_BORDER_COLOR 34
|
||||
|
||||
typedef enum {
|
||||
DWMWCP_DEFAULT = 0,
|
||||
DWMWCP_DONOTROUND = 1,
|
||||
DWMWCP_ROUND = 2,
|
||||
DWMWCP_ROUNDSMALL = 3
|
||||
} DWM_WINDOW_CORNER_PREFERENCE;
|
||||
|
||||
// Use this constant to reset any window part colors to the system default behavior
|
||||
#define DWMWA_COLOR_DEFAULT 0xFFFFFFFF
|
||||
|
||||
// Use this constant to specify that a window part should not be rendered
|
||||
#define DWMWA_COLOR_NONE 0xFFFFFFFE
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_setWindowCornerPreference
|
||||
( JNIEnv* env, jclass cls, jlong hwnd, jint cornerPreference )
|
||||
{
|
||||
if( hwnd == 0 )
|
||||
return FALSE;
|
||||
|
||||
DWM_WINDOW_CORNER_PREFERENCE attr = (DWM_WINDOW_CORNER_PREFERENCE) cornerPreference;
|
||||
return ::DwmSetWindowAttribute( reinterpret_cast<HWND>( hwnd ), DWMWA_WINDOW_CORNER_PREFERENCE, &attr, sizeof( attr ) ) == S_OK;
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_setWindowBorderColor
|
||||
( JNIEnv* env, jclass cls, jlong hwnd, jint red, jint green, jint blue )
|
||||
{
|
||||
if( hwnd == 0 )
|
||||
return FALSE;
|
||||
|
||||
COLORREF attr;
|
||||
if( red == -1 )
|
||||
attr = DWMWA_COLOR_DEFAULT;
|
||||
else if( red == -2 )
|
||||
attr = DWMWA_COLOR_NONE;
|
||||
else
|
||||
attr = RGB( red, green, blue );
|
||||
return ::DwmSetWindowAttribute( reinterpret_cast<HWND>( hwnd ), DWMWA_BORDER_COLOR, &attr, sizeof( attr ) ) == S_OK;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class com_formdev_flatlaf_ui_FlatNativeWindowsLibrary */
|
||||
|
||||
#ifndef _Included_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary
|
||||
#define _Included_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#undef com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_DWMWCP_DEFAULT
|
||||
#define com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_DWMWCP_DEFAULT 0L
|
||||
#undef com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_DWMWCP_DONOTROUND
|
||||
#define com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_DWMWCP_DONOTROUND 1L
|
||||
#undef com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_DWMWCP_ROUND
|
||||
#define com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_DWMWCP_ROUND 2L
|
||||
#undef com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_DWMWCP_ROUNDSMALL
|
||||
#define com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_DWMWCP_ROUNDSMALL 3L
|
||||
/*
|
||||
* Class: com_formdev_flatlaf_ui_FlatNativeWindowsLibrary
|
||||
* Method: getOSBuildNumberImpl
|
||||
* Signature: ()J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_getOSBuildNumberImpl
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: com_formdev_flatlaf_ui_FlatNativeWindowsLibrary
|
||||
* Method: getHWND
|
||||
* Signature: (Ljava/awt/Window;)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_getHWND
|
||||
(JNIEnv *, jclass, jobject);
|
||||
|
||||
/*
|
||||
* Class: com_formdev_flatlaf_ui_FlatNativeWindowsLibrary
|
||||
* Method: setWindowCornerPreference
|
||||
* Signature: (JI)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_setWindowCornerPreference
|
||||
(JNIEnv *, jclass, jlong, jint);
|
||||
|
||||
/*
|
||||
* Class: com_formdev_flatlaf_ui_FlatNativeWindowsLibrary
|
||||
* Method: setWindowBorderColor
|
||||
* Signature: (JIII)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeWindowsLibrary_setWindowBorderColor
|
||||
(JNIEnv *, jclass, jlong, jint, jint, jint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -198,6 +198,7 @@ ColumnControlButton.iconColor #a8a8a8 HSL 0 0 66 javax.swing.plaf.Colo
|
||||
|
||||
ComboBox.background #46494b HSL 204 3 28 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI]
|
||||
ComboBox.borderCornerRadius 4
|
||||
ComboBox.buttonArrowColor #9b9b9b HSL 0 0 61 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonBackground #46494b HSL 204 3 28 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonDarkShadow #7a7d7f HSL 204 2 49 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -738,6 +739,7 @@ PasswordFieldUI com.formdev.flatlaf.ui.FlatPasswordFieldUI
|
||||
|
||||
#---- Popup ----
|
||||
|
||||
Popup.borderCornerRadius 4
|
||||
Popup.dropShadowColor #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||
Popup.dropShadowInsets -4,-4,4,4 javax.swing.plaf.InsetsUIResource [UI]
|
||||
Popup.dropShadowOpacity 0.25
|
||||
@@ -749,6 +751,7 @@ Popup.dropShadowPainted true
|
||||
PopupMenu.background #303234 HSL 210 4 20 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.border [lazy] 4,1,4,1 false com.formdev.flatlaf.ui.FlatPopupMenuBorder [UI] lineColor=#5d6061 HSL 195 2 37 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
PopupMenu.borderColor #5d6061 HSL 195 2 37 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.borderCornerRadius 4
|
||||
PopupMenu.borderInsets 4,1,4,1 javax.swing.plaf.InsetsUIResource [UI]
|
||||
PopupMenu.consumeEventOnClose false
|
||||
PopupMenu.font [active] $defaultFont [UI]
|
||||
@@ -1352,6 +1355,7 @@ ToolBarUI com.formdev.flatlaf.ui.FlatToolBarUI
|
||||
|
||||
ToolTip.background #1e2021 HSL 200 5 12 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolTip.border [lazy] 4,6,4,6 false com.formdev.flatlaf.ui.FlatEmptyBorder [UI]
|
||||
ToolTip.borderCornerRadius 4
|
||||
ToolTip.font [active] $defaultFont [UI]
|
||||
ToolTip.foreground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
|
||||
@@ -202,6 +202,7 @@ ColumnControlButton.iconColor #737373 HSL 0 0 45 javax.swing.plaf.Colo
|
||||
|
||||
ComboBox.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI]
|
||||
ComboBox.borderCornerRadius 4
|
||||
ComboBox.buttonArrowColor #666666 HSL 0 0 40 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonBackground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonDarkShadow #9c9c9c HSL 0 0 61 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -743,6 +744,7 @@ PasswordFieldUI com.formdev.flatlaf.ui.FlatPasswordFieldUI
|
||||
|
||||
#---- Popup ----
|
||||
|
||||
Popup.borderCornerRadius 4
|
||||
Popup.dropShadowColor #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||
Popup.dropShadowInsets -4,-4,4,4 javax.swing.plaf.InsetsUIResource [UI]
|
||||
Popup.dropShadowOpacity 0.15
|
||||
@@ -754,6 +756,7 @@ Popup.dropShadowPainted true
|
||||
PopupMenu.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.border [lazy] 4,1,4,1 false com.formdev.flatlaf.ui.FlatPopupMenuBorder [UI] lineColor=#aeaeae HSL 0 0 68 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
PopupMenu.borderColor #aeaeae HSL 0 0 68 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.borderCornerRadius 4
|
||||
PopupMenu.borderInsets 4,1,4,1 javax.swing.plaf.InsetsUIResource [UI]
|
||||
PopupMenu.consumeEventOnClose false
|
||||
PopupMenu.font [active] $defaultFont [UI]
|
||||
@@ -1357,6 +1360,7 @@ ToolBarUI com.formdev.flatlaf.ui.FlatToolBarUI
|
||||
|
||||
ToolTip.background #fafafa HSL 0 0 98 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolTip.border [lazy] 4,6,4,6 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#919191 HSL 0 0 57 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
ToolTip.borderCornerRadius 4
|
||||
ToolTip.font [active] $defaultFont [UI]
|
||||
ToolTip.foreground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
|
||||
@@ -202,6 +202,7 @@ ColumnControlButton.iconColor #c7c7c7 HSL 0 0 78 javax.swing.plaf.Colo
|
||||
|
||||
ComboBox.background #565656 HSL 0 0 34 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.border [lazy] 3,3,3,3 false com.formdev.flatlaf.ui.FlatRoundBorder [UI]
|
||||
ComboBox.borderCornerRadius 8
|
||||
ComboBox.buttonArrowColor #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonBackground #007aff HSL 211 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonDarkShadow #ffffff19 10% HSLA 0 0 100 10 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -746,6 +747,7 @@ PasswordFieldUI com.formdev.flatlaf.ui.FlatPasswordFieldUI
|
||||
|
||||
#---- Popup ----
|
||||
|
||||
Popup.borderCornerRadius 4
|
||||
Popup.dropShadowColor #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||
Popup.dropShadowInsets -4,-4,4,4 javax.swing.plaf.InsetsUIResource [UI]
|
||||
Popup.dropShadowOpacity 0.25
|
||||
@@ -757,6 +759,7 @@ Popup.dropShadowPainted true
|
||||
PopupMenu.background #323232 HSL 0 0 20 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.border [lazy] 6,1,6,1 false com.formdev.flatlaf.ui.FlatPopupMenuBorder [UI] lineColor=#444444 HSL 0 0 27 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
PopupMenu.borderColor #444444 HSL 0 0 27 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.borderCornerRadius 8
|
||||
PopupMenu.borderInsets 6,1,6,1 javax.swing.plaf.InsetsUIResource [UI]
|
||||
PopupMenu.consumeEventOnClose false
|
||||
PopupMenu.font [active] $defaultFont [UI]
|
||||
@@ -1362,6 +1365,7 @@ ToolBarUI com.formdev.flatlaf.ui.FlatToolBarUI
|
||||
|
||||
ToolTip.background #0f0f0f HSL 0 0 6 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolTip.border [lazy] 4,6,4,6 false com.formdev.flatlaf.ui.FlatEmptyBorder [UI]
|
||||
ToolTip.borderCornerRadius 4
|
||||
ToolTip.font [active] $defaultFont [UI]
|
||||
ToolTip.foreground #dddddd HSL 0 0 87 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
|
||||
@@ -207,6 +207,7 @@ ColumnControlButton.iconColor #888888 HSL 0 0 53 javax.swing.plaf.Colo
|
||||
|
||||
ComboBox.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.border [lazy] 3,3,3,3 false com.formdev.flatlaf.ui.FlatRoundBorder [UI]
|
||||
ComboBox.borderCornerRadius 8
|
||||
ComboBox.buttonArrowColor #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonBackground #007aff HSL 211 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonDarkShadow #00000026 15% HSLA 0 0 0 15 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -750,6 +751,7 @@ PasswordFieldUI com.formdev.flatlaf.ui.FlatPasswordFieldUI
|
||||
|
||||
#---- Popup ----
|
||||
|
||||
Popup.borderCornerRadius 4
|
||||
Popup.dropShadowColor #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
|
||||
Popup.dropShadowInsets -4,-4,4,4 javax.swing.plaf.InsetsUIResource [UI]
|
||||
Popup.dropShadowOpacity 0.15
|
||||
@@ -761,6 +763,7 @@ Popup.dropShadowPainted true
|
||||
PopupMenu.background #ececec HSL 0 0 93 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.border [lazy] 6,1,6,1 false com.formdev.flatlaf.ui.FlatPopupMenuBorder [UI] lineColor=#b1b1b1 HSL 0 0 69 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
PopupMenu.borderColor #b1b1b1 HSL 0 0 69 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.borderCornerRadius 8
|
||||
PopupMenu.borderInsets 6,1,6,1 javax.swing.plaf.InsetsUIResource [UI]
|
||||
PopupMenu.consumeEventOnClose false
|
||||
PopupMenu.font [active] $defaultFont [UI]
|
||||
@@ -1366,6 +1369,7 @@ ToolBarUI com.formdev.flatlaf.ui.FlatToolBarUI
|
||||
|
||||
ToolTip.background #fefefe HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolTip.border [lazy] 4,6,4,6 false com.formdev.flatlaf.ui.FlatLineBorder [UI] lineColor=#949494 HSL 0 0 58 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
ToolTip.borderCornerRadius 4
|
||||
ToolTip.font [active] $defaultFont [UI]
|
||||
ToolTip.foreground #262626 HSL 0 0 15 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
|
||||
@@ -220,6 +220,7 @@ ColumnControlButton.actionIcon [lazy] 10,10 com.formdev.flatlaf.swingx.icons.
|
||||
|
||||
ComboBox.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.border [lazy] 1,1,1,1 false com.formdev.flatlaf.ui.FlatRoundBorder [UI]
|
||||
ComboBox.borderCornerRadius 4
|
||||
ComboBox.buttonArrowColor #666666 HSL 0 0 40 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonBackground #f0f0f0 HSL 0 0 94 javax.swing.plaf.ColorUIResource [UI]
|
||||
ComboBox.buttonDarkShadow #696969 HSL 0 0 41 javax.swing.plaf.ColorUIResource [UI]
|
||||
@@ -769,6 +770,7 @@ PasswordFieldUI com.formdev.flatlaf.ui.FlatPasswordFieldUI
|
||||
|
||||
#---- Popup ----
|
||||
|
||||
Popup.borderCornerRadius 4
|
||||
Popup.dropShadowColor #00ff00 HSL 120 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||
Popup.dropShadowInsets -6,6,6,6 javax.swing.plaf.InsetsUIResource [UI]
|
||||
Popup.dropShadowOpacity 0.5
|
||||
@@ -780,6 +782,7 @@ Popup.dropShadowPainted true
|
||||
PopupMenu.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.border [lazy] 4,1,4,1 false com.formdev.flatlaf.ui.FlatPopupMenuBorder [UI] lineColor=#0000ff HSL 240 100 50 javax.swing.plaf.ColorUIResource [UI] lineThickness=1.000000
|
||||
PopupMenu.borderColor #0000ff HSL 240 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||
PopupMenu.borderCornerRadius 4
|
||||
PopupMenu.borderInsets 4,1,4,1 javax.swing.plaf.InsetsUIResource [UI]
|
||||
PopupMenu.consumeEventOnClose false
|
||||
PopupMenu.font [active] $defaultFont [UI]
|
||||
@@ -1406,6 +1409,7 @@ ToolBarUI com.formdev.flatlaf.ui.FlatToolBarUI
|
||||
|
||||
ToolTip.background #eeeeff HSL 240 100 97 javax.swing.plaf.ColorUIResource [UI]
|
||||
ToolTip.border [lazy] line: #000000 HSL 0 0 0 java.awt.Color 1 false 1,1,1,1 true javax.swing.plaf.BorderUIResource$LineBorderUIResource [UI]
|
||||
ToolTip.borderCornerRadius 4
|
||||
ToolTip.font [active] $defaultFont [UI]
|
||||
ToolTip.foreground #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ ColumnControlButton.iconColor
|
||||
ComboBox.ancestorInputMap
|
||||
ComboBox.background
|
||||
ComboBox.border
|
||||
ComboBox.borderCornerRadius
|
||||
ComboBox.buttonArrowColor
|
||||
ComboBox.buttonBackground
|
||||
ComboBox.buttonDarkShadow
|
||||
@@ -598,6 +599,7 @@ PasswordField.selectionForeground
|
||||
PasswordField.showCapsLock
|
||||
PasswordField.showRevealButton
|
||||
PasswordFieldUI
|
||||
Popup.borderCornerRadius
|
||||
Popup.dropShadowColor
|
||||
Popup.dropShadowInsets
|
||||
Popup.dropShadowOpacity
|
||||
@@ -605,6 +607,7 @@ Popup.dropShadowPainted
|
||||
PopupMenu.background
|
||||
PopupMenu.border
|
||||
PopupMenu.borderColor
|
||||
PopupMenu.borderCornerRadius
|
||||
PopupMenu.borderInsets
|
||||
PopupMenu.consumeEventOnClose
|
||||
PopupMenu.font
|
||||
@@ -1115,6 +1118,7 @@ ToolBarSeparatorUI
|
||||
ToolBarUI
|
||||
ToolTip.background
|
||||
ToolTip.border
|
||||
ToolTip.borderCornerRadius
|
||||
ToolTip.font
|
||||
ToolTip.foreground
|
||||
ToolTipManager.enableToolTipMode
|
||||
|
||||
Reference in New Issue
Block a user