Build desktop applications with JetBrains New UI style #2484
Unanswered
devkanro
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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