mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
Support running in JetBrains Projector (https://jetbrains.com/projector/)
This commit is contained in:
@@ -20,6 +20,7 @@ FlatLaf Change Log
|
||||
"TitlePane.unifiedBackground", true );` then window title bar and menu bar
|
||||
use same background color as main content. (PR #268; issue #254)
|
||||
- JIDE Common Layer: Support `JideButton`, `JideLabel` and `JideToggleButton`.
|
||||
- Support running in [JetBrains Projector](https://jetbrains.com/projector/).
|
||||
|
||||
#### Fixed bugs
|
||||
|
||||
|
||||
@@ -157,6 +157,9 @@ public abstract class FlatLaf
|
||||
*/
|
||||
@Override
|
||||
public boolean getSupportsWindowDecorations() {
|
||||
if( SystemInfo.isProjector )
|
||||
return false;
|
||||
|
||||
if( SystemInfo.isWindows_10_orLater &&
|
||||
FlatNativeWindowBorder.isSupported() )
|
||||
return false;
|
||||
|
||||
@@ -225,6 +225,10 @@ public class FlatNativeWindowBorder
|
||||
if( !SystemInfo.isWindows_10_orLater )
|
||||
return;
|
||||
|
||||
// do not use when running in JetBrains Projector
|
||||
if( SystemInfo.isProjector )
|
||||
return;
|
||||
|
||||
// check whether disabled via system property
|
||||
if( !FlatSystemProperties.getBoolean( FlatSystemProperties.USE_WINDOW_DECORATIONS, true ) )
|
||||
return;
|
||||
|
||||
@@ -70,7 +70,7 @@ public class FlatPopupFactory
|
||||
|
||||
boolean forceHeavyWeight = isOptionEnabled( owner, contents, FlatClientProperties.POPUP_FORCE_HEAVY_WEIGHT, "Popup.forceHeavyWeight" );
|
||||
|
||||
if( !isOptionEnabled( owner, contents, FlatClientProperties.POPUP_DROP_SHADOW_PAINTED, "Popup.dropShadowPainted" ) )
|
||||
if( !isOptionEnabled( owner, contents, FlatClientProperties.POPUP_DROP_SHADOW_PAINTED, "Popup.dropShadowPainted" ) || SystemInfo.isProjector )
|
||||
return new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, forceHeavyWeight ), contents );
|
||||
|
||||
// macOS and Linux adds drop shadow to heavy weight popups
|
||||
|
||||
@@ -54,6 +54,9 @@ public class SystemInfo
|
||||
// UI toolkits
|
||||
public static final boolean isKDE;
|
||||
|
||||
// other
|
||||
public static final boolean isProjector;
|
||||
|
||||
static {
|
||||
// platforms
|
||||
String osName = System.getProperty( "os.name" ).toLowerCase( Locale.ENGLISH );
|
||||
@@ -85,6 +88,9 @@ public class SystemInfo
|
||||
|
||||
// UI toolkits
|
||||
isKDE = (isLinux && System.getenv( "KDE_FULL_SESSION" ) != null);
|
||||
|
||||
// other
|
||||
isProjector = Boolean.getBoolean( "org.jetbrains.projector.server.enable" );
|
||||
}
|
||||
|
||||
public static long scanVersion( String version ) {
|
||||
|
||||
Reference in New Issue
Block a user