diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5fbb62eb..2da83094 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java
index 6bbd3afe..ee16de4c 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java
@@ -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.
+ *
+ * Note that this is not available on all platforms since it requires special support.
+ * Supported platforms:
+ *
+ * Windows 11 (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.
+ *
+ * Component {@link javax.swing.JComponent}
+ * Value type {@link java.lang.Integer}
+ *
+ * @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.
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowsLibrary.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowsLibrary.java
new file mode 100644
index 00000000..9df5ae23
--- /dev/null
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowsLibrary.java
@@ -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.
+ *
+ * Note: 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.
+ *
+ * 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.
+ *
+ * Note that the underlying Windows window must be already created,
+ * otherwise this method returns zero. Use following to ensure this:
+ *
{@code
+ * if( !window.isDisplayable() )
+ * window.addNotify();
+ * }
+ * or invoke this method after packing the window. E.g.
+ * {@code
+ * window.pack();
+ * long hwnd = getHWND( window );
+ * }
+ */
+ 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}.
+ *
+ * Invokes Win32 API method {@code DwmSetWindowAttribute(DWMWA_WINDOW_CORNER_PREFERENCE)}.
+ * See https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute
+ *
+ * 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.
+ *
+ * Invokes Win32 API method {@code DwmSetWindowAttribute(DWMWA_BORDER_COLOR)}.
+ * See https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute
+ *
+ * Supported since Windows 11 Build 22000.
+ */
+ public native static boolean setWindowBorderColor( long hwnd, int red, int green, int blue );
+}
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java
index c58b72eb..cb0f4f3d 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java
@@ -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:
+ *
+ * - client property {@code clientKey} of {@code owner}
+ *
- client property {@code clientKey} of {@code contents}
+ *
- UI property {@code uiKey}
+ *
+ */
+ 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 ) {
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupMenuUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupMenuUI.java
index 7e24ea32..1ade7a7a 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupMenuUI.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupMenuUI.java
@@ -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 ) {
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
index 2378eefa..c43df699 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java
@@ -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 );
}
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/SystemInfo.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/SystemInfo.java
index 8678afcd..6be6e98f 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/SystemInfo.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/SystemInfo.java
@@ -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;
- /** Note: 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 ) {
diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
index 76334d80..358c3cec 100644
--- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
+++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
@@ -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
diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/themes/FlatMacDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/themes/FlatMacDarkLaf.properties
index 53374035..6dc08502 100644
--- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/themes/FlatMacDarkLaf.properties
+++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/themes/FlatMacDarkLaf.properties
@@ -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 ----
diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/themes/FlatMacLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/themes/FlatMacLightLaf.properties
index 5a411a85..fd9c1ef4 100644
--- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/themes/FlatMacLightLaf.properties
+++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/themes/FlatMacLightLaf.properties
@@ -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 ----
diff --git a/flatlaf-natives/flatlaf-natives-windows/build.gradle.kts b/flatlaf-natives/flatlaf-natives-windows/build.gradle.kts
index 99acaf2a..69490664 100644
--- a/flatlaf-natives/flatlaf-natives-windows/build.gradle.kts
+++ b/flatlaf-natives/flatlaf-natives-windows/build.gradle.kts
@@ -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()
}
} )
diff --git a/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.cpp b/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.cpp
index 77b8006d..45d6b850 100644
--- a/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.cpp
+++ b/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.cpp
@@ -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 ) )
diff --git a/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.h b/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.h
index 768b7779..96e255d1 100644
--- a/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.h
+++ b/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/FlatWndProc.h
@@ -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 );
};
diff --git a/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/WinWrapper.cpp b/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/WinWrapper.cpp
new file mode 100644
index 00000000..37fc9e84
--- /dev/null
+++ b/flatlaf-natives/flatlaf-natives-windows/src/main/cpp/WinWrapper.cpp
@@ -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
+#include
+#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( 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 ), 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 ), DWMWA_BORDER_COLOR, &attr, sizeof( attr ) ) == S_OK;
+}
diff --git a/flatlaf-natives/flatlaf-natives-windows/src/main/headers/com_formdev_flatlaf_ui_FlatNativeWindowsLibrary.h b/flatlaf-natives/flatlaf-natives-windows/src/main/headers/com_formdev_flatlaf_ui_FlatNativeWindowsLibrary.h
new file mode 100644
index 00000000..921c7a99
--- /dev/null
+++ b/flatlaf-natives/flatlaf-natives-windows/src/main/headers/com_formdev_flatlaf_ui_FlatNativeWindowsLibrary.h
@@ -0,0 +1,53 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include
+/* 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
diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt
index 59a64eaa..48e3f64e 100644
--- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt
+++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt
@@ -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]
diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt
index c4afe118..c6cf0547 100644
--- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt
+++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt
@@ -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]
diff --git a/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt
index 8b51c3a4..28a06498 100644
--- a/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt
+++ b/flatlaf-testing/dumps/uidefaults/FlatMacDarkLaf_1.8.0.txt
@@ -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]
diff --git a/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt
index 4892650f..dd6f173a 100644
--- a/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt
+++ b/flatlaf-testing/dumps/uidefaults/FlatMacLightLaf_1.8.0.txt
@@ -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]
diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt
index e3e853db..164661ef 100644
--- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt
+++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt
@@ -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]
diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt
index c42da0c1..3071f5a1 100644
--- a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt
+++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt
@@ -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