mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
support running on WinPE (issue #279)
This commit is contained in:
@@ -8,6 +8,7 @@ FlatLaf Change Log
|
||||
- Native window decorations: Support disabling native window decorations per
|
||||
window. (set client property `JRootPane.useWindowDecorations` to `false` on
|
||||
root pane).
|
||||
- Support running on WinPE. (issue #279)
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ public abstract class FlatLaf
|
||||
*/
|
||||
@Override
|
||||
public boolean getSupportsWindowDecorations() {
|
||||
if( SystemInfo.isProjector )
|
||||
if( SystemInfo.isProjector || SystemInfo.isWinPE )
|
||||
return false;
|
||||
|
||||
if( SystemInfo.isWindows_10_orLater &&
|
||||
@@ -443,7 +443,10 @@ public abstract class FlatLaf
|
||||
FontUIResource uiFont = null;
|
||||
|
||||
if( SystemInfo.isWindows ) {
|
||||
Font winFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty( "win.messagebox.font" );
|
||||
// on WinPE use "win.defaultGUI.font", which is usually Tahoma,
|
||||
// because Segoe UI font is not available on WinPE
|
||||
Font winFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty(
|
||||
SystemInfo.isWinPE ? "win.defaultGUI.font" : "win.messagebox.font" );
|
||||
if( winFont != null )
|
||||
uiFont = createCompositeFont( winFont.getFamily(), winFont.getStyle(), winFont.getSize() );
|
||||
|
||||
|
||||
@@ -242,8 +242,8 @@ public class FlatNativeWindowBorder
|
||||
if( !SystemInfo.isWindows_10_orLater )
|
||||
return;
|
||||
|
||||
// do not use when running in JetBrains Projector
|
||||
if( SystemInfo.isProjector )
|
||||
// do not use when running in JetBrains Projector or WinPE
|
||||
if( SystemInfo.isProjector || SystemInfo.isWinPE )
|
||||
return;
|
||||
|
||||
// check whether disabled via system property
|
||||
|
||||
@@ -56,6 +56,7 @@ public class SystemInfo
|
||||
|
||||
// other
|
||||
/** @since 1.1 */ public static final boolean isProjector;
|
||||
/** @since 1.1.1 */ public static final boolean isWinPE;
|
||||
|
||||
static {
|
||||
// platforms
|
||||
@@ -91,6 +92,7 @@ public class SystemInfo
|
||||
|
||||
// other
|
||||
isProjector = Boolean.getBoolean( "org.jetbrains.projector.server.enable" );
|
||||
isWinPE = isWindows && "X:\\Windows\\System32".equalsIgnoreCase( System.getProperty( "user.dir" ) );
|
||||
}
|
||||
|
||||
public static long scanVersion( String version ) {
|
||||
|
||||
Reference in New Issue
Block a user