|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.fine.theme.light.ui.laf; |
|
|
|
package com.fine.theme.light.ui.laf; |
|
|
|
|
|
|
|
|
|
|
|
import com.formdev.flatlaf.FlatLaf; |
|
|
|
import com.formdev.flatlaf.FlatLaf; |
|
|
|
|
|
|
|
import com.formdev.flatlaf.util.SystemInfo; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.PopupFactory; |
|
|
|
import javax.swing.PopupFactory; |
|
|
|
|
|
|
|
|
|
|
@ -31,8 +32,19 @@ public abstract class FineLaf extends FlatLaf { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void initialize() { |
|
|
|
public void initialize() { |
|
|
|
super.initialize(); |
|
|
|
super.initialize(); |
|
|
|
|
|
|
|
resetWindowDecorations(); |
|
|
|
// flat默认使用系统弹窗,3.3 版本之前无法实现圆角弹窗。
|
|
|
|
// flat默认使用系统弹窗,3.3 版本之前无法实现圆角弹窗。
|
|
|
|
// popup弹窗不使用flat提供的工具,使用swing原生自带的
|
|
|
|
// popup弹窗不使用flat提供的工具,使用swing原生自带的
|
|
|
|
PopupFactory.setSharedInstance(new PopupFactory()); |
|
|
|
PopupFactory.setSharedInstance(new PopupFactory()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 在win10和win11下重置窗口装饰,恢复系统原生 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private static void resetWindowDecorations() { |
|
|
|
|
|
|
|
if (SystemInfo.isWindows_10_orLater) { |
|
|
|
|
|
|
|
System.setProperty("flatlaf.useWindowDecorations", "false"); |
|
|
|
|
|
|
|
System.setProperty("flatlaf.menuBarEmbedded", "false"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|