{"id":22031120,"url":"https://github.com/buttercam/compose-jetbrains-theme","last_synced_at":"2025-04-09T12:07:13.587Z","repository":{"id":40665984,"uuid":"414869239","full_name":"ButterCam/compose-jetbrains-theme","owner":"ButterCam","description":"JetBrains style UI kit for Compose Desktop.","archived":false,"fork":false,"pushed_at":"2023-10-27T06:36:33.000Z","size":2762,"stargazers_count":236,"open_issues_count":3,"forks_count":10,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-02T10:12:41.907Z","etag":null,"topics":["compose-desktop","jetbrains","ui"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ButterCam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-08T06:18:41.000Z","updated_at":"2025-02-27T11:16:35.000Z","dependencies_parsed_at":"2025-01-09T01:18:14.836Z","dependency_job_id":null,"html_url":"https://github.com/ButterCam/compose-jetbrains-theme","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterCam%2Fcompose-jetbrains-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterCam%2Fcompose-jetbrains-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterCam%2Fcompose-jetbrains-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ButterCam%2Fcompose-jetbrains-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ButterCam","download_url":"https://codeload.github.com/ButterCam/compose-jetbrains-theme/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036067,"owners_count":21037092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compose-desktop","jetbrains","ui"],"created_at":"2024-11-30T08:14:29.952Z","updated_at":"2025-04-09T12:07:13.568Z","avatar_url":"https://github.com/ButterCam.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# We are planning to migrate to [JetBrains/jewel](https://github.com/JetBrains/jewel)!\n\nWe are discussing with JetBrains officials about migrating this project to [JetBrains/jewel](https://github.com/JetBrains/jewel). This will be the focus of our next work.\n\nTrack progress in this issue: JetBrains/jewel#28\n\n# JetBrains UI Kit for Compose Desktop\n\nNew JetBrains style controls and UI kits for [Compose Desktop](https://www.jetbrains.com/lp/compose/).\n\nClassic JetBrains UI kit have been moved to [here](classic).\n\n![screenshot](docs/screenshot-expui.png)\n\n## Quick Start\n\n## Requirements\n\n### JetBrains Runtime\n\nTo get the best presentation across platforms, this library requires the application to run\non [JetBrains Runtime](https://github.com/JetBrains/JetBrainsRuntime) (JBR).\n\n[JetBrains Runtime](https://github.com/JetBrains/JetBrainsRuntime) is a modified version of the JetBrains JDK\ndistribution, which is widely used across the JetBrains' IDEs such as IntelliJ, GoLand and others.\n\nIn this library we use the additional API provided by JetBrains Runtime to customise the title bar in Windows and macOS.\n\nIf the `JBWindow` component is not used, it can also be used without the JetBrains Runtime.\n\nWhen using `JBWindow` in a non-JetBrains Runtime environment, a native title bar may additionally be displayed.\n\nJBR-17 (corresponding to JDK 17) can be downloaded from [the SDK page](https://www.jetbrains.com/help/idea/sdk.html) of\nIntelliJ.\n\nMake sure that the [project SDK](https://www.jetbrains.com/help/idea/project-settings-and-structure.html#project-sdk)\nand [Gradle JVM](https://www.jetbrains.com/help/idea/gradle-jvm-selection.html) are both JBR-17.\n\n#### Project SDK settings\n\n![](docs/project-sdk.png)\n\n#### Gradle JVM settings\n\n![](docs/gradle-jvm.png)\n\n### `jdk.unsupported` module\n\nMost of the JetBrains Runtime APIs are private to JetBrains, and the class `sun.misc.Unsafe` is used to get access to\nthese APIs.\n\nYou need to add the `jdk.unsupported` module to the compose dependency as in the following code to make it work.\n\nYou can also skip this step if you don't need to use the `JBWindow` component.\n\n```kotlin\ncompose.desktop {\n    application {\n        nativeDistributions {\n            modules(\"jdk.unsupported\")\n        }\n    }\n}\n```\n\n## 1. Add dependency\n\n```kotlin\ndependencies {\n    implementation(compose.desktop.currentOs) {\n        exclude(\"org.jetbrains.compose.material\")\n    }\n    implementation(\"com.bybutter.compose:compose-jetbrains-expui-theme:2.0.0\")\n}\n```\n\n## 2. Use JBWindow DSL\n\nThe optimal display of JBWindow requires JetBrains Runtime, refer to the previous [requirements](#Requirements).\n\n```kotlin\nfun main() = application {\n    JBWindow(\n        title = \"JetBrains ExpUI Gallery\",\n        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).\n        theme = LightTheme, // Change the theme here, LightTheme and DarkTheme are provided.\n        state = rememberWindowState(size = DpSize(900.dp, 700.dp)),\n        onCloseRequest = {\n            exitApplication()\n        },\n        mainToolBar = {\n            // Render your own component in the MainToolBar (TitleBar).\n            Row(\n                Modifier.mainToolBarItem(\n                    Alignment.End,\n                    true\n                )\n            ) { // Use the mainToolBarItem modifier to change alignment of components and enable/disable window drag area on this component.\n            }\n        }) {\n        // Window content\n    }\n}\n```\n\n## 3. Use LightTheme and DarkTheme DSL\n\nSince `JBWindow` requires JetBrains Runtime, if you don't want to use the `JBWindow` component, you can also use a\nnormal `Window` with `LightTheme`/`DarkTheme` DSL.\n\n```kotlin\nfun main() = application {\n    Window({}) {\n        LightTheme {\n            // Your components here\n        }\n    }\n}\n```\n\n\n# Screenshot\n\n## MacOS\n\n\u003cimg width=\"1012\" alt=\"截屏2022-11-21 17 11 56\" src=\"https://user-images.githubusercontent.com/9367842/203010912-68f54752-a598-49ad-9e50-9217dba544be.png\"\u003e\n\u003cimg width=\"1012\" alt=\"截屏2022-11-21 17 12 18\" src=\"https://user-images.githubusercontent.com/9367842/203011027-3a835525-f44a-42e0-83f5-b1e27011b9e4.png\"\u003e\n\n## Windows  \n\n![image](https://user-images.githubusercontent.com/9367842/203374673-be0e25ab-de0c-4682-a511-bbadf0949446.png)  \n![image](https://user-images.githubusercontent.com/9367842/203374902-0b384bdd-fff4-4cbc-a8eb-93d6b58229a2.png)\n\n## Linux(Ubuntu with Gnome)\n\n![image](https://user-images.githubusercontent.com/9367842/203574847-6b6a3d4a-0da2-41f8-ac3f-9a8402f26b16.png)\n![image](https://user-images.githubusercontent.com/9367842/203574918-953092bc-b00f-455b-a43a-237c63093095.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuttercam%2Fcompose-jetbrains-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuttercam%2Fcompose-jetbrains-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuttercam%2Fcompose-jetbrains-theme/lists"}