You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I previously built a classic JetBrains style UI Kit for Compose Desktop, JetBrains has recently redesigned the UI style of IDEA to make it look more streamlined, simple and efficient.
More recently I have been working on recreating the new JetBrains UI style on Compose Desktop, check the source code of it.
Also, this UI kit is NOT officially maintained by JetBrains, nor is it an official JetBrains project.
Quick Start
Requirements
JetBrains Runtime
To get the best presentation across platforms, this library requires the application to run on JetBrains Runtime (JBR).
JetBrains Runtime is a modified version of the JetBrains JDK distribution, which is widely used across the JetBrains' IDEs such as IntelliJ, GoLand and others.
In this library we use the additional API provided by JetBrains Runtime to customise the title bar in Windows and macOS.
If the JBWindow component is not used, it can also be used without the JetBrains Runtime.
When using JBWindow in a non-JetBrains Runtime environment, a native title bar may additionally be displayed.
JBR-17 (corresponding to JDK 17) can be downloaded from the SDK page of IntelliJ.
The optimal display of JBWindow requires JetBrains Runtime, refer to the previous requirements.
funmain() = application {
JBWindow(
title ="JetBrains ExpUI Gallery",
showTitle =true, // If you want to render your own component in the center of the title bar like Intellij do, disable this to hide the title of the MainToolBar (TitleBar).
theme =LightTheme, // Change the theme here, LightTheme and DarkTheme are provided.
state = rememberWindowState(size =DpSize(900.dp, 700.dp)),
onCloseRequest = {
exitApplication()
},
mainToolBar = {
// Render your own component in the MainToolBar (TitleBar).Row(
Modifier.mainToolBarItem(
Alignment.End,
true
)
) { // Use the mainToolBarItem modifier to change alignment of components and enable/disable window drag area on this component.
}
}) {
// Window content
}
}
3. Use LightTheme and DarkTheme DSL
Since JBWindow requires JetBrains Runtime, if you don't want to use the JBWindow component, you can also use a normal Window with LightTheme/DarkTheme DSL.
funmain() = application {
Window({}) {
LightTheme {
// Your components here
}
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello folks.
While I previously built a classic JetBrains style UI Kit for Compose Desktop, JetBrains has recently redesigned the UI style of IDEA to make it look more streamlined, simple and efficient.
More recently I have been working on recreating the new JetBrains UI style on Compose Desktop, check the source code of it.
Also, this UI kit is NOT officially maintained by JetBrains, nor is it an official JetBrains project.
Quick Start
Requirements
JetBrains Runtime
To get the best presentation across platforms, this library requires the application to run on JetBrains Runtime (JBR).
JetBrains Runtime is a modified version of the JetBrains JDK distribution, which is widely used across the JetBrains' IDEs such as IntelliJ, GoLand and others.
In this library we use the additional API provided by JetBrains Runtime to customise the title bar in Windows and macOS.
If the
JBWindow
component is not used, it can also be used without the JetBrains Runtime.When using
JBWindow
in a non-JetBrains Runtime environment, a native title bar may additionally be displayed.JBR-17 (corresponding to JDK 17) can be downloaded from the SDK page of IntelliJ.
Make sure that the project SDK and Gradle JVM are both JBR-17.
Project SDK settings
Gradle JVM settings
jdk.unsupported
moduleMost of the JetBrains Runtime APIs are private to JetBrains, and the class
sun.misc.Unsafe
is used to get access to these APIs.You need to add the
jdk.unsupported
module to the compose dependency as in the following code to make it work.You can also skip this step if you don't need to use the
JBWindow
component.compose.desktop { application { nativeDistributions { modules("jdk.unsupported") } } }
1. Add dependency
2. Use JBWindow DSL
The optimal display of JBWindow requires JetBrains Runtime, refer to the previous requirements.
3. Use LightTheme and DarkTheme DSL
Since
JBWindow
requires JetBrains Runtime, if you don't want to use theJBWindow
component, you can also use a normalWindow
withLightTheme
/DarkTheme
DSL.Beta Was this translation helpful? Give feedback.
All reactions