diff --git a/.idea/runConfigurations/Stand_alone_sample.xml b/.idea/runConfigurations/Stand_alone_sample.xml deleted file mode 100644 index b3e90b2b3d..0000000000 --- a/.idea/runConfigurations/Stand_alone_sample.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - true - true - false - - - \ No newline at end of file diff --git a/README.md b/README.md index da6bc9cf45..f3aa404906 100644 --- a/README.md +++ b/README.md @@ -1,364 +1,7 @@ -[![JetBrains incubator](https://img.shields.io/badge/JetBrains-incubator-yellow?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzIuMDAwMDEiIHZpZXdCb3g9IjAgMCAzMiAzMi4wMDAwMSIgd2lkdGg9IjMyIj48c2NyaXB0IHhtbG5zPSIiLz48cGF0aCBkPSJtMCAwaDMydjMyLjAwMDAxaC0zMnoiLz48cGF0aCBkPSJtNCAyNi4wMDAwMWgxMnYyaC0xMnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)](https://github.com/JetBrains#jetbrains-on-github) [![CI checks](https://img.shields.io/github/actions/workflow/status/JetBrains/jewel/build.yml?logo=github)](https://github.com/JetBrains/jewel/actions/workflows/build.yml) [![Licensed under Apache 2.0](https://img.shields.io/github/license/JetBrains/jewel?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0ZGRiIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIgZD0ibTMgNiAzIDFtMCAwLTMgOWE1LjAwMiA1LjAwMiAwIDAgMCA2LjAwMSAwTTYgN2wzIDlNNiA3bDYtMm02IDIgMy0xbS0zIDEtMyA5YTUuMDAyIDUuMDAyIDAgMCAwIDYuMDAxIDBNMTggN2wzIDltLTMtOS02LTJtMC0ydjJtMCAxNlY1bTAgMTZIOW0zIDBoMyIvPjwvc3ZnPg==)](https://github.com/JetBrains/jewel/blob/main/LICENSE) [![Latest release](https://img.shields.io/github/v/release/JetBrains/jewel?include_prereleases&label=Latest%20Release&logo=github)](https://github.com/JetBrains/jewel/releases/latest) ![Compose for Desktop version](https://img.shields.io/badge/Compose%20for%20Desktop-1.6.0-dev1369?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB2aWV3Qm94PSIwIDAgNjcgNzQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI%2BPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zNS45OTkgMi42NjNhNS4wMSA1LjAxIDAgMCAwLTQuOTk4IDBsLTI2LjUgMTUuMjUzYTQuOTk0IDQuOTk0IDAgMCAwLTEuMTk4Ljk2MmwxMS4xMDggNi4zNjZjLjI2OC0uMjkuNTgtLjU0LjkzMS0uNzQ0bDE2LjE1Ni05LjM0MmE0IDQgMCAwIDEgNC4wMDQgMEw1MS42NTcgMjQuNWMuMzUxLjIwMy42NjQuNDU1LjkzMi43NDRsMTEuMTA4LTYuMzY2YTQuOTkxIDQuOTkxIDAgMCAwLTEuMTk4LS45NjJsLTI2LjUtMTUuMjUzWm0yOC43MjMgMTcuOTMzLTExLjE4MyA2LjQwOGMuMDc2LjMxLjExNi42MzIuMTE2Ljk1OXYxNy43OTRhNCA0IDAgMCAxLTEuOTU4IDMuNDRsLTE2LjIzNSA5LjYzOGEzLjk5OCAzLjk5OCAwIDAgMS0uOTYyLjQxMnYxMi42M2E1LjAwNSA1LjAwNSAwIDAgMCAxLjQyOC0uNTY5bDI2LjYyLTE1LjczQTQuOTg2IDQuOTg2IDAgMCAwIDY1IDUxLjI4NFYyMi4yMzdjMC0uNTY3LS4wOTctMS4xMi0uMjc4LTEuNjRaTTIgMjIuMjM3YzAtLjU2Ny4wOTctMS4xMi4yNzgtMS42NGwxMS4xODMgNi40MDdjLS4wNzYuMzEtLjExNi42MzItLjExNi45NTl2MTguNjMzYTQgNCAwIDAgMCAyLjA4IDMuNTA5bDE2LjA3NCA4LjhjLjMyLjE3NC42NTYuMzAyIDEuMDAxLjM4NHYxMi42MzhhNS4wMDUgNS4wMDUgMCAwIDEtMS41MTctLjUzM0w0LjYwMyA1Ny4wMkE0Ljk4NyA0Ljk4NyAwIDAgMSAyIDUyLjY0MlYyMi4yMzdaTTMwLjAwMi45MzVhNy4wMTQgNy4wMTQgMCAwIDEgNi45OTYgMGwyNi41IDE1LjI1M0E2Ljk4IDYuOTggMCAwIDEgNjcgMjIuMjM4djI5LjA0N2E2Ljk4IDYuOTggMCAwIDEtMy40MzMgNi4wMDlsLTI2LjYyIDE1LjczMWE3LjAxNCA3LjAxNCAwIDAgMS02LjkyMy4xMkwzLjY0NCA1OC43NzFBNi45ODEgNi45ODEgMCAwIDEgMCA1Mi42NDFWMjIuMjM4YTYuOTggNi45OCAwIDAgMSAzLjUwMi02LjA1TDMwLjAwMi45MzZabS04LjYwNCAyNy41NTIgMTAuNTgyLTYuMTFjLjk0LS41NDIgMi4xLS41NDIgMy4wNCAwbDEwLjU4MiA2LjExYTIuOTk2IDIuOTk2IDAgMCAxIDEuNTAzIDIuNTkzdjExLjY1M2MwIDEuMDU2LS41NiAyLjAzNC0xLjQ3MyAyLjU3NmwtMTAuNjQzIDYuMzA4YTMuMDQ0IDMuMDQ0IDAgMCAxLTMuMDA5LjA1MmwtMTAuNTItNS43NWEyLjk5NiAyLjk5NiAwIDAgMS0xLjU2NS0yLjYyN1YzMS4wOGMwLTEuMDY4LjU3My0yLjA1NiAxLjUwMy0yLjU5M1oiIGZpbGw9IiNmZmYiLz48L3N2Zz4%3D) - # Jewel: a Compose for Desktop theme Jewel logo -Jewel aims at recreating the IntelliJ Platform's _New UI_ Swing Look and Feel in Compose for Desktop, providing a -desktop-optimized theme and set of components. - -> [!WARNING] -> -> This project is in active development, and caution is advised when considering it for production uses. You _can_ use -> it, but you should expect APIs to change often, things to move around and/or break, and all that jazz. Binary -> compatibility is not guaranteed across releases, and APIs are still in flux and subject to change. -> -> Writing 3rd party IntelliJ Plugins in Compose for Desktop is currently **not officially supported** by the IntelliJ -> Platform. It should work, but your mileage may vary, and if things break you're on your own. -> -> Use at your own risk! - -Jewel provides an implementation of the IntelliJ Platform themes that can be used in any Compose for Desktop -application. Additionally, it has a Swing LaF Bridge that only works in the IntelliJ Platform (i.e., used to create IDE -plugins), but automatically mirrors the current Swing LaF into Compose for a native-looking, consistent UI. - -## Getting started - -To use Jewel in your app, you only need to add the relevant dependency. There are two scenarios: standalone Compose for -Desktop app, and IntelliJ Platform plugin. - -For now, Jewel artifacts aren't available on Maven Central. You need to add a custom Maven repository to your build: - -```kotlin -repositories { - maven("https://packages.jetbrains.team/maven/p/kpm/public/") - // Any other repositories you need (e.g., mavenCentral()) -} -``` - -If you're writing a **standalone app**, then you should depend on the `int-ui-standalone` artifact: - -```kotlin -dependencies { - implementation("org.jetbrains.jewel:jewel-int-ui-standalone:[jewel version]") - - // Optional, for custom decorated windows: - implementation("org.jetbrains.jewel:jewel-int-ui-decorated-window:[jewel version]") -} -``` - -For an **IntelliJ Platform plugin**, then you should depend on the appropriate `ide-laf-bridge` artifact: - -```kotlin -dependencies { - // The platform version is a supported major IJP version (e.g., 232 or 233 for 2023.2 and 2023.3 respectively) - implementation("org.jetbrains.jewel:jewel-ide-laf-bridge-[platform version]:[jewel version]") -} -``` - -
- -> [!TIP] -> -> -> -> -> If you want to learn more about Jewel and Compose for Desktop and why they're a great, modern solution for your -> desktop -> UI needs, check out [this talk](https://www.droidcon.com/2023/11/15/meet-jewelcreate-ide-plugins-in-compose/) by Jewel -> contributors Sebastiano and Chris. -> -> It covers why Compose is a viable choice, and an overview of the Jewel project, plus -> some real-life use cases.
- -
- -## Project structure - -The project is split in modules: - -1. `buildSrc` contains the build logic, including: - * The `jewel` and `jewel-publish` configuration plugins - * The `jewel-check-public-api` and `jewel-linting` configuration plugins - * The Theme Palette generator plugin - * The Studio Releases generator plugin -2. `foundation` contains the foundational Jewel functionality: - * Basic components without strong styling (e.g., `SelectableLazyColumn`, `BasicLazyTree`) - * The `JewelTheme` interface with a few basic composition locals - * The state management primitives - * The Jewel annotations - * A few other primitives -3. `ui` contains all the styled components and custom painters logic -4. `decorated-window` contains basic, unstyled functionality to have custom window decoration on the JetBrains Runtime -5. `int-ui` contains two modules: - * `int-ui-standalone` has a standalone version of the Int UI styling values that can be used in any Compose for - Desktop app - * `int-ui-decorated-window` has a standalone version of the Int UI styling values for the custom window decoration - that can be used in any Compose for Desktop app -6. `ide-laf-bridge` contains the Swing LaF bridge to use in IntelliJ Platform plugins (see more below) -7. `samples` contains the example apps, which showcase the available components: - * `standalone` is a regular CfD app, using the standalone theme definitions and custom window decoration - * `ide-plugin` is an IntelliJ plugin that showcases the use of the Swing Bridge - -## Branching strategy and IJ Platforms - -Code on the main branch is developed and tested against the current latest IntelliJ Platform version. - -When the EAP for a new major version starts, we cut a `releases/xxx` release branch, where `xxx` is the tracked major -IJP version. At that point, the main branch starts tracking the latest available major IJP version, and changes are -cherry-picked into each release branch as needed. All active release branches have the same functionality (where -supported by the corresponding IJP version), but might differ in platform version-specific fixes and internals. - -The standalone Int UI theme will always work the same way as the latest major IJP version; release branches will not -include the `int-ui` module, which is always released from the main branch. - -Releases of Jewel are always cut from a tag on the main branch; the HEAD of each `releases/xxx` branch is then tagged -as `[mainTag]-xxx`, and used to publish the artifacts for that major IJP version. - -> ![IMPORTANT] -> We only support the latest build of IJP for each major IJP version. If the latest 233 version is 2023.3.3, for -> example, we will only guarantee that Jewel works on that. Versions 2023.3.0–2023.3.2 might or might not work. - -### Int UI Standalone theme - -The standalone theme can be used in any Compose for Desktop app. You use it as a normal theme, and you can customise it -to your heart's content. By default, it matches the official Int UI specs. - -For an example on how to set up a standalone app, you can refer to -the [`standalone` sample](samples/standalone/build.gradle.kts). - -> [!WARNING] -> Note that Jewel **requires** the JetBrains Runtime to work correctly. Some features like font loading depend on it, -> as it has extra features and patches for UI functionalities that aren't available in other JDKs. -> We **do not support** running Jewel on any other JDK. - -To use Jewel components in a non-IntelliJ Platform environment, you need to wrap your UI hierarchy in a `IntUiTheme` -composable: - -```kotlin -IntUiTheme(isDark = false) { - // ... -} -``` - -If you want more control over the theming, you can use other `IntUiTheme` overloads, like the standalone sample does. - -#### Custom window decoration - -The JetBrains Runtime allows windows to have a custom decoration instead of the regular title bar. - -![A screenshot of the custom window decoration in the standalone sample](art/docs/custom-chrome.png) - -The standalone sample app shows how to easily get something that looks like a JetBrains IDE; if you want to go _very_ -custom, you only need to depend on the `decorated-window` module, which contains all the required primitives, but not -the Int UI styling. - -To get an IntelliJ-like custom title bar, you need to pass the window decoration styling to your theme call, and add the -`DecoratedWindow` composable at the top level of the theme: - -```kotlin -IntUiTheme( - themeDefinition, - componentStyling = { - themeDefinition.decoratedWindowComponentStyling( - titleBarStyle = TitleBarStyle.light() - ) - }, -) { - DecoratedWindow( - onCloseRequest = { exitApplication() }, - ) { - // ... - } -} -``` - -### Running on the IntelliJ Platform: the Swing bridge - -Jewel includes a crucial element for proper integration with the IDE: a bridge between the Swing components — theme -and LaF — and the Compose world. - -This bridge ensures that we pick up the colours, typography, metrics, and images as defined in the current IntelliJ -theme, and apply them to the Compose components as well. This means Jewel will automatically adapt to IntelliJ Platform -themes that use the [standard theming](https://plugins.jetbrains.com/docs/intellij/themes-getting-started.html) -mechanisms. - -> [!NOTE] -> IntelliJ themes that use non-standard mechanisms (such as providing custom UI implementations for Swing components) -> are not, and can never, be supported. - -If you're writing an IntelliJ Platform plugin, you should use the `SwingBridgeTheme` instead of the standalone theme: - -```kotlin -SwingBridgeTheme { - // ... -} -``` - -#### Supported IntelliJ Platform versions - -To use Jewel in the IntelliJ Platform, you should depend on the appropriate `jewel-ide-laf-bridge-*` artifact, which -will bring in the necessary transitive dependencies. These are the currently supported versions of the IntelliJ Platform -and the branch on which the corresponding bridge code lives: - -| IntelliJ Platform version(s) | Branch to use | - |------------------------------|-------------------| -| 2024.1 (EAP 3+) | `main` | -| 2023.3 | `releases/233` | -| 2023.2 | `releases/232` | -| 2023.1 or older | **Not supported** | - -For an example on how to set up an IntelliJ Plugin, you can refer to -the [`ide-plugin` sample](samples/ide-plugin/build.gradle.kts). - -#### Accessing icons - -When you want to draw an icon from the resources, you can either use the `Icon` composable and pass it the resource path -and the corresponding class to look up the classpath from, or go one lever deeper and use the lower level, -`Painter`-based API. - -The `Icon` approach looks like this: - -```kotlin -// Load the "close" icon from the IDE's AllIcons class -Icon( - "actions/close.svg", - iconClass = AllIcons::class.java, - contentDescription = "Close", -) -``` - -To obtain a `Painter`, instead, you'd use: - -```kotlin -val painterProvider = rememberResourcePainterProvider( - path = "actions/close.svg", - iconClass = AllIcons::class.java -) -val painter by painterProvider.getPainter() -``` - -#### Icon runtime patching - -Jewel emulates the under-the-hood machinations that happen in the IntelliJ Platform when loading icons. Specifically, -the resource will be subject to some transformations before being loaded. - -For example, in the IDE, if New UI is active, the icon path may be replaced with a different one. Some key colors in SVG -icons will also be replaced based on the current theme. See -[the docs](https://plugins.jetbrains.com/docs/intellij/work-with-icons-and-images.html#new-ui-icons). - -Beyond that, even in standalone, Jewel will pick up icons with the appropriate dark/light variant for the current theme, -and for bitmap icons it will try to pick the 2x variants based on the `LocalDensity`. - -If you have a _stateful_ icon, that is if you need to display different icons based on some state, you can use the -`PainterProvider.getPainter(PainterHint...)` overload. You can then use one of the state-mapping `PainterHint` to let -Jewel load the appropriate icon automatically: - -```kotlin -// myState implements SelectableComponentState and has a ToggleableState property -val myPainter by myPainterProvider.getPainter( - if (myState.toggleableState == ToggleableState.Indeterminate) { - IndeterminateHint - } else { - PainterHint.None - }, - Selected(myState), - Stateful(myState), -) -``` - -Where the `IndeterminateHint` looks like this: - -```kotlin -private object IndeterminateHint : PainterSuffixHint() { - override fun suffix(): String = "Indeterminate" -} -``` - -Assuming the PainterProvider has a base path of `components/myIcon.svg`, Jewel will automatically translate it to the -right path based on the state. If you want to learn more about this system, look at the `PainterHint` interface and its -implementations. - -### Fonts - -To load a system font, you can obtain it by its family name: - -```kotlin -val myFamily = FontFamily("My Family") -``` - -If you want to use a font embedded in the JetBrains Runtime, you can use the `EmbeddedFontFamily` API instead: - -```kotlin -import javax.swing.text.StyledEditorKit.FontFamilyAction - -// Will return null if no matching font family exists in the JBR -val myEmbeddedFamily = EmbeddedFontFamily("Embedded family") - -// It's recommended to load a fallback family when dealing with embedded familes -val myFamily = myEmbeddedFamily ?: FontFamily("Fallback family") -``` - -You can obtain a `FontFamily` from any `java.awt.Font` — including from `JBFont`s — by using the `asComposeFontFamily()` -API: - -```kotlin -val myAwtFamily = myFont.asComposeFontFamily() - -// This will attempt to resolve the logical AWT font -val myLogicalFamily = Font("Dialog").asComposeFontFamily() - -// This only works in the IntelliJ Platform, -// since JBFont is only available there -val myLabelFamily = JBFont.label().asComposeFontFamily() -``` - -### Swing interoperability - -As this is Compose for Desktop, you get a good degree of interoperability with Swing. To avoid glitches and z-order -issues, you should enable the -[experimental Swing rendering pipeline](https://blog.jetbrains.com/kotlin/2023/08/compose-multiplatform-1-5-0-release/#enhanced-swing-interop) -before you initialize Compose content. - -The `ToolWindow.addComposeTab()` extension function provided by the `ide-laf-bridge` module will take care of that for -you. However, if you want to also enable it in other scenarios and in standalone applications, you can call the -`enableNewSwingCompositing()` function in your Compose entry points (that is, right before creating a `ComposePanel`). - -> [!NOTE] -> The new Swing rendering pipeline is experimental and may have performance repercussions when using infinitely -> repeating animations. This is a known issue by the Compose Multiplatform team, that requires changes in the Java -> runtime to fix. Once the required changes are made in the JetBrains Runtime, we'll remove this notice. - -## Written with Jewel - -Here is a small selection of projects that use Compose for Desktop and Jewel: - -* [Package Search](https://github.com/JetBrains/package-search-intellij-plugin) (IntelliJ Platform plugin) -* [Kotlin Explorer](https://github.com/romainguy/kotlin-explorer) (standalone app) -* ...and more to come! - -## Need help? - -You can find help on the [`#jewel`](https://app.slack.com/client/T09229ZC6/C05T8U2C31T) channel on the Kotlin Slack. -If you don't already have access to the Kotlin Slack, you can request it -[here](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up). - -## License - -Jewel is licensed under the [Apache 2.0 license](https://github.com/JetBrains/jewel/blob/main/LICENSE). - -``` -Copyright 2022–4 JetBrains s.r.o. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Please refer to the readme file on the `main` branch for further information. -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -``` +**This is the build for the IntelliJ Platform 23.2** diff --git a/build.gradle.kts b/build.gradle.kts index d698907af1..1db96e8c93 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,13 +4,9 @@ plugins { } dependencies { - sarif(projects.decoratedWindow) sarif(projects.foundation) sarif(projects.ideLafBridge) - sarif(projects.intUi.intUiDecoratedWindow) - sarif(projects.intUi.intUiStandalone) sarif(projects.samples.idePlugin) - sarif(projects.samples.standalone) sarif(projects.ui) } diff --git a/decorated-window/api/decorated-window.api b/decorated-window/api/decorated-window.api deleted file mode 100644 index 7e0cdd28f9..0000000000 --- a/decorated-window/api/decorated-window.api +++ /dev/null @@ -1,252 +0,0 @@ -public abstract interface class com/jetbrains/DesktopActions { - public abstract fun setHandler (Lcom/jetbrains/DesktopActions$Handler;)V -} - -public abstract interface class com/jetbrains/DesktopActions$Handler { - public fun browse (Ljava/net/URI;)V - public fun edit (Ljava/io/File;)V - public fun mail (Ljava/net/URI;)V - public fun open (Ljava/io/File;)V - public fun print (Ljava/io/File;)V -} - -public class com/jetbrains/JBR { - public static fun getApiVersion ()Ljava/lang/String; - public static fun getDesktopActions ()Lcom/jetbrains/DesktopActions; - public static fun getRoundedCornersManager ()Lcom/jetbrains/RoundedCornersManager; - public static fun getWindowDecorations ()Lcom/jetbrains/WindowDecorations; - public static fun getWindowMove ()Lcom/jetbrains/WindowMove; - public static fun isAvailable ()Z - public static fun isDesktopActionsSupported ()Z - public static fun isRoundedCornersManagerSupported ()Z - public static fun isWindowDecorationsSupported ()Z - public static fun isWindowMoveSupported ()Z -} - -public abstract interface class com/jetbrains/RoundedCornersManager { - public abstract fun setRoundedCorners (Ljava/awt/Window;Ljava/lang/Object;)V -} - -public abstract interface class com/jetbrains/WindowDecorations { - public abstract fun createCustomTitleBar ()Lcom/jetbrains/WindowDecorations$CustomTitleBar; - public abstract fun setCustomTitleBar (Ljava/awt/Dialog;Lcom/jetbrains/WindowDecorations$CustomTitleBar;)V - public abstract fun setCustomTitleBar (Ljava/awt/Frame;Lcom/jetbrains/WindowDecorations$CustomTitleBar;)V -} - -public abstract interface class com/jetbrains/WindowDecorations$CustomTitleBar { - public abstract fun forceHitTest (Z)V - public abstract fun getContainingWindow ()Ljava/awt/Window; - public abstract fun getHeight ()F - public abstract fun getLeftInset ()F - public abstract fun getProperties ()Ljava/util/Map; - public abstract fun getRightInset ()F - public abstract fun putProperties (Ljava/util/Map;)V - public abstract fun putProperty (Ljava/lang/String;Ljava/lang/Object;)V - public abstract fun setHeight (F)V -} - -public abstract interface class com/jetbrains/WindowMove { - public abstract fun startMovingTogetherWithMouse (Ljava/awt/Window;I)V -} - -public final class org/jetbrains/jewel/window/DecoratedWindowKt { - public static final fun DecoratedWindow (Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/window/WindowState;ZLjava/lang/String;Landroidx/compose/ui/graphics/painter/Painter;ZZZZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;III)V -} - -public abstract interface class org/jetbrains/jewel/window/DecoratedWindowScope : androidx/compose/ui/window/FrameWindowScope { - public abstract fun getState-VA8cQZQ ()J - public abstract fun getWindow ()Landroidx/compose/ui/awt/ComposeWindow; -} - -public final class org/jetbrains/jewel/window/DecoratedWindowState { - public static final field Companion Lorg/jetbrains/jewel/window/DecoratedWindowState$Companion; - public static final synthetic fun box-impl (J)Lorg/jetbrains/jewel/window/DecoratedWindowState; - public static fun constructor-impl (J)J - public static final fun copy-zAQEbgo (JZZZZ)J - public static synthetic fun copy-zAQEbgo$default (JZZZZILjava/lang/Object;)J - public fun equals (Ljava/lang/Object;)Z - public static fun equals-impl (JLjava/lang/Object;)Z - public static final fun equals-impl0 (JJ)Z - public final fun getState-s-VKNKU ()J - public fun hashCode ()I - public static fun hashCode-impl (J)I - public static final fun isActive-impl (J)Z - public static final fun isFullscreen-impl (J)Z - public static final fun isMaximized-impl (J)Z - public static final fun isMinimized-impl (J)Z - public fun toString ()Ljava/lang/String; - public static fun toString-impl (J)Ljava/lang/String; - public final synthetic fun unbox-impl ()J -} - -public final class org/jetbrains/jewel/window/DecoratedWindowState$Companion { - public final fun getActive-s-VKNKU ()J - public final fun getFullscreen-s-VKNKU ()J - public final fun getMaximize-s-VKNKU ()J - public final fun getMinimize-s-VKNKU ()J - public final fun of-LPCgXDc (Landroidx/compose/ui/awt/ComposeWindow;)J - public final fun of-zAQEbgo (ZZZZ)J - public static synthetic fun of-zAQEbgo$default (Lorg/jetbrains/jewel/window/DecoratedWindowState$Companion;ZZZZILjava/lang/Object;)J -} - -public final class org/jetbrains/jewel/window/ThemeKt { - public static final fun getDefaultDecoratedWindowStyle (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle; - public static final fun getDefaultTitleBarStyle (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/window/styling/TitleBarStyle; -} - -public final class org/jetbrains/jewel/window/TitleBarKt { - public static final fun TitleBar-T042LqI (Lorg/jetbrains/jewel/window/DecoratedWindowScope;Landroidx/compose/ui/Modifier;JLorg/jetbrains/jewel/window/styling/TitleBarStyle;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V -} - -public abstract interface class org/jetbrains/jewel/window/TitleBarScope { - public abstract fun align (Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Alignment$Horizontal;)Landroidx/compose/ui/Modifier; - public abstract fun getIcon ()Landroidx/compose/ui/graphics/painter/Painter; - public abstract fun getTitle ()Ljava/lang/String; -} - -public final class org/jetbrains/jewel/window/TitleBar_MacOSKt { - public static final fun newFullscreenControls (Landroidx/compose/ui/Modifier;Z)Landroidx/compose/ui/Modifier; - public static synthetic fun newFullscreenControls$default (Landroidx/compose/ui/Modifier;ZILjava/lang/Object;)Landroidx/compose/ui/Modifier; -} - -public final class org/jetbrains/jewel/window/styling/DecoratedWindowColors { - public static final field $stable I - public static final field Companion Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors$Companion; - public synthetic fun (JJLkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun borderFor-3hEOMOc (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State; - public fun equals (Ljava/lang/Object;)Z - public final fun getBorder-0d7_KjU ()J - public final fun getBorderInactive-0d7_KjU ()J - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class org/jetbrains/jewel/window/styling/DecoratedWindowColors$Companion { -} - -public final class org/jetbrains/jewel/window/styling/DecoratedWindowMetrics { - public static final field $stable I - public static final field Companion Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics$Companion; - public synthetic fun (FLkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun equals (Ljava/lang/Object;)Z - public final fun getBorderWidth-D9Ej5fM ()F - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class org/jetbrains/jewel/window/styling/DecoratedWindowMetrics$Companion { -} - -public final class org/jetbrains/jewel/window/styling/DecoratedWindowStyle { - public static final field $stable I - public static final field Companion Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle$Companion; - public fun (Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors;Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics;)V - public fun equals (Ljava/lang/Object;)Z - public final fun getColors ()Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors; - public final fun getMetrics ()Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class org/jetbrains/jewel/window/styling/DecoratedWindowStyle$Companion { -} - -public final class org/jetbrains/jewel/window/styling/DecoratedWindowStylingKt { - public static final fun getLocalDecoratedWindowStyle ()Landroidx/compose/runtime/ProvidableCompositionLocal; -} - -public final class org/jetbrains/jewel/window/styling/TitleBarColors { - public static final field $stable I - public static final field Companion Lorg/jetbrains/jewel/window/styling/TitleBarColors$Companion; - public synthetic fun (JJJJJJJJJJJJJLkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun backgroundFor-3hEOMOc (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State; - public fun equals (Ljava/lang/Object;)Z - public final fun getBackground-0d7_KjU ()J - public final fun getBorder-0d7_KjU ()J - public final fun getContent-0d7_KjU ()J - public final fun getDropdownHoveredBackground-0d7_KjU ()J - public final fun getDropdownPressedBackground-0d7_KjU ()J - public final fun getFullscreenControlButtonsBackground-0d7_KjU ()J - public final fun getIconButtonHoveredBackground-0d7_KjU ()J - public final fun getIconButtonPressedBackground-0d7_KjU ()J - public final fun getInactiveBackground-0d7_KjU ()J - public final fun getTitlePaneButtonHoveredBackground-0d7_KjU ()J - public final fun getTitlePaneButtonPressedBackground-0d7_KjU ()J - public final fun getTitlePaneCloseButtonHoveredBackground-0d7_KjU ()J - public final fun getTitlePaneCloseButtonPressedBackground-0d7_KjU ()J - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class org/jetbrains/jewel/window/styling/TitleBarColors$Companion { -} - -public final class org/jetbrains/jewel/window/styling/TitleBarIcons { - public static final field $stable I - public static final field Companion Lorg/jetbrains/jewel/window/styling/TitleBarIcons$Companion; - public fun (Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)V - public fun equals (Ljava/lang/Object;)Z - public final fun getCloseButton ()Lorg/jetbrains/jewel/ui/painter/PainterProvider; - public final fun getMaximizeButton ()Lorg/jetbrains/jewel/ui/painter/PainterProvider; - public final fun getMinimizeButton ()Lorg/jetbrains/jewel/ui/painter/PainterProvider; - public final fun getRestoreButton ()Lorg/jetbrains/jewel/ui/painter/PainterProvider; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class org/jetbrains/jewel/window/styling/TitleBarIcons$Companion { -} - -public final class org/jetbrains/jewel/window/styling/TitleBarMetrics { - public static final field $stable I - public static final field Companion Lorg/jetbrains/jewel/window/styling/TitleBarMetrics$Companion; - public synthetic fun (FFFJLkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun equals (Ljava/lang/Object;)Z - public final fun getGradientEndX-D9Ej5fM ()F - public final fun getGradientStartX-D9Ej5fM ()F - public final fun getHeight-D9Ej5fM ()F - public final fun getTitlePaneButtonSize-MYxV2XQ ()J - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class org/jetbrains/jewel/window/styling/TitleBarMetrics$Companion { -} - -public final class org/jetbrains/jewel/window/styling/TitleBarStyle { - public static final field $stable I - public static final field Companion Lorg/jetbrains/jewel/window/styling/TitleBarStyle$Companion; - public fun (Lorg/jetbrains/jewel/window/styling/TitleBarColors;Lorg/jetbrains/jewel/window/styling/TitleBarMetrics;Lorg/jetbrains/jewel/window/styling/TitleBarIcons;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;)V - public fun equals (Ljava/lang/Object;)Z - public final fun getColors ()Lorg/jetbrains/jewel/window/styling/TitleBarColors; - public final fun getDropdownStyle ()Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle; - public final fun getIconButtonStyle ()Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle; - public final fun getIcons ()Lorg/jetbrains/jewel/window/styling/TitleBarIcons; - public final fun getMetrics ()Lorg/jetbrains/jewel/window/styling/TitleBarMetrics; - public final fun getPaneButtonStyle ()Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle; - public final fun getPaneCloseButtonStyle ()Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class org/jetbrains/jewel/window/styling/TitleBarStyle$Companion { -} - -public final class org/jetbrains/jewel/window/styling/TitleBarStylingKt { - public static final fun getLocalTitleBarStyle ()Landroidx/compose/runtime/ProvidableCompositionLocal; -} - -public final class org/jetbrains/jewel/window/utils/DesktopPlatform : java/lang/Enum { - public static final field Companion Lorg/jetbrains/jewel/window/utils/DesktopPlatform$Companion; - public static final field Linux Lorg/jetbrains/jewel/window/utils/DesktopPlatform; - public static final field MacOS Lorg/jetbrains/jewel/window/utils/DesktopPlatform; - public static final field Unknown Lorg/jetbrains/jewel/window/utils/DesktopPlatform; - public static final field Windows Lorg/jetbrains/jewel/window/utils/DesktopPlatform; - public static fun valueOf (Ljava/lang/String;)Lorg/jetbrains/jewel/window/utils/DesktopPlatform; - public static fun values ()[Lorg/jetbrains/jewel/window/utils/DesktopPlatform; -} - -public final class org/jetbrains/jewel/window/utils/DesktopPlatform$Companion { - public final fun getCurrent ()Lorg/jetbrains/jewel/window/utils/DesktopPlatform; -} - diff --git a/decorated-window/build.gradle.kts b/decorated-window/build.gradle.kts deleted file mode 100644 index 02e83d703a..0000000000 --- a/decorated-window/build.gradle.kts +++ /dev/null @@ -1,17 +0,0 @@ -import org.jetbrains.compose.ComposeBuildConfig - -plugins { - jewel - `jewel-publish` - `jewel-check-public-api` - alias(libs.plugins.composeDesktop) -} - -private val composeVersion - get() = ComposeBuildConfig.composeVersion - -dependencies { - api("org.jetbrains.compose.foundation:foundation-desktop:$composeVersion") - api(projects.ui) - implementation(libs.jna.core) -} diff --git a/decorated-window/src/main/java/com/jetbrains/DesktopActions.java b/decorated-window/src/main/java/com/jetbrains/DesktopActions.java deleted file mode 100644 index f2efcb477a..0000000000 --- a/decorated-window/src/main/java/com/jetbrains/DesktopActions.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2000-2022 JetBrains s.r.o. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.jetbrains; - -import java.io.File; -import java.io.IOException; -import java.net.URI; - -public interface DesktopActions { - - void setHandler(Handler handler); - - interface Handler { - default void open(File file) throws IOException { throw new UnsupportedOperationException(); } - default void edit(File file) throws IOException { throw new UnsupportedOperationException(); } - default void print(File file) throws IOException { throw new UnsupportedOperationException(); } - default void mail(URI mailtoURL) throws IOException { throw new UnsupportedOperationException(); } - default void browse(URI uri) throws IOException { throw new UnsupportedOperationException(); } - } - -} diff --git a/decorated-window/src/main/java/com/jetbrains/JBR.java b/decorated-window/src/main/java/com/jetbrains/JBR.java deleted file mode 100644 index 0f5f04505e..0000000000 --- a/decorated-window/src/main/java/com/jetbrains/JBR.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright 2000-2023 JetBrains s.r.o. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.jetbrains; - -import java.lang.invoke.MethodHandles; -import java.lang.reflect.InvocationTargetException; - -/** - * This class is an entry point into JBR API. - * JBR API is a collection of services, classes, interfaces, etc., - * which require tight interaction with JRE and therefore are implemented inside JBR. - *
JBR API consists of two parts:
- *
    - *
  • Client side - {@code jetbrains.api} module, mostly containing interfaces
  • - *
  • JBR side - actual implementation code inside JBR
  • - *
- * Client and JBR side are linked dynamically at runtime and do not have to be of the same version. - * In some cases (e.g. running on different JRE or old JBR) system will not be able to find - * implementation for some services, so you'll need a fallback behavior for that case. - *

Simple usage example:

- *
{@code
- * if (JBR.isSomeServiceSupported()) {
- *     JBR.getSomeService().doSomething();
- * } else {
- *     planB();
- * }
- * }
- * - * @implNote JBR API is initialized on first access to this class (in static initializer). - * Actual implementation is linked on demand, when corresponding service is requested by client. - */ -public class JBR { - - private static final ServiceApi api; - private static final Exception bootstrapException; - - static { - ServiceApi a = null; - Exception exception = null; - try { - a = (ServiceApi) Class.forName("com.jetbrains.bootstrap.JBRApiBootstrap") - .getMethod("bootstrap", MethodHandles.Lookup.class) - .invoke(null, MethodHandles.lookup()); - } catch (InvocationTargetException e) { - Throwable t = e.getCause(); - if (t instanceof Error error) throw error; - else throw new Error(t); - } catch (IllegalAccessException | NoSuchMethodException | ClassNotFoundException e) { - exception = e; - } - api = a; - bootstrapException = exception; - } - - private JBR() { - } - - private static T getService(Class interFace, FallbackSupplier fallback) { - T service = getService(interFace); - try { - return service != null ? service : fallback != null ? fallback.get() : null; - } catch (Throwable ignore) { - return null; - } - } - - static T getService(Class interFace) { - return api == null ? null : api.getService(interFace); - } - - /** - * @return true when running on JBR which implements JBR API - */ - public static boolean isAvailable() { - return api != null; - } - - /** - * @return JBR API version in form {@code JBR.MAJOR.MINOR.PATCH} - * @implNote This is an API version, which comes with client application, - * it has nothing to do with JRE it runs on. - */ - public static String getApiVersion() { - return "17.0.8.1b1070.2.1.9.0"; - } - - /** - * Internal API interface, contains most basic methods for communication between client and JBR. - */ - private interface ServiceApi { - - T getService(Class interFace); - } - - @FunctionalInterface - private interface FallbackSupplier { - T get() throws Throwable; - } - - // ========================== Generated metadata ========================== - - /** - * Generated client-side metadata, needed by JBR when linking the implementation. - */ - private static final class Metadata { - private static final String[] KNOWN_SERVICES = {"com.jetbrains.ExtendedGlyphCache", "com.jetbrains.DesktopActions", "com.jetbrains.CustomWindowDecoration", "com.jetbrains.ProjectorUtils", "com.jetbrains.FontExtensions", "com.jetbrains.RoundedCornersManager", "com.jetbrains.GraphicsUtils", "com.jetbrains.WindowDecorations", "com.jetbrains.JBRFileDialogService", "com.jetbrains.AccessibleAnnouncer", "com.jetbrains.JBR$ServiceApi", "com.jetbrains.Jstack", "com.jetbrains.WindowMove"}; - private static final String[] KNOWN_PROXIES = {"com.jetbrains.JBRFileDialog", "com.jetbrains.WindowDecorations$CustomTitleBar"}; - } - - // ======================= Generated static methods ======================= - - private static class DesktopActions__Holder { - private static final DesktopActions INSTANCE = getService(DesktopActions.class, null); - } - - /** - * @return true if current runtime has implementation for all methods in {@link DesktopActions} - * and its dependencies (can fully implement given service). - * @see #getDesktopActions() - */ - public static boolean isDesktopActionsSupported() { - return DesktopActions__Holder.INSTANCE != null; - } - - /** - * @return full implementation of {@link DesktopActions} service if any, or {@code null} otherwise - */ - public static DesktopActions getDesktopActions() { - return DesktopActions__Holder.INSTANCE; - } - - private static class RoundedCornersManager__Holder { - private static final RoundedCornersManager INSTANCE = getService(RoundedCornersManager.class, null); - } - - /** - * @return true if current runtime has implementation for all methods in {@link RoundedCornersManager} - * and its dependencies (can fully implement given service). - * @see #getRoundedCornersManager() - */ - public static boolean isRoundedCornersManagerSupported() { - return RoundedCornersManager__Holder.INSTANCE != null; - } - - /** - * This manager allows decorate awt Window with rounded corners. - * Appearance depends from operating system. - * - * @return full implementation of {@link RoundedCornersManager} service if any, or {@code null} otherwise - */ - public static RoundedCornersManager getRoundedCornersManager() { - return RoundedCornersManager__Holder.INSTANCE; - } - - private static class WindowDecorations__Holder { - private static final WindowDecorations INSTANCE = getService(WindowDecorations.class, null); - } - - /** - * @return true if current runtime has implementation for all methods in {@link WindowDecorations} - * and its dependencies (can fully implement given service). - * @see #getWindowDecorations() - */ - public static boolean isWindowDecorationsSupported() { - return WindowDecorations__Holder.INSTANCE != null; - } - - /** - * Window decorations consist of title bar, window controls and border. - * - * @return full implementation of {@link WindowDecorations} service if any, or {@code null} otherwise - * @see WindowDecorations.CustomTitleBar - */ - public static WindowDecorations getWindowDecorations() { - return WindowDecorations__Holder.INSTANCE; - } - - private static class WindowMove__Holder { - private static final WindowMove INSTANCE = getService(WindowMove.class, null); - } - - /** - * @return true if current runtime has implementation for all methods in {@link WindowMove} - * and its dependencies (can fully implement given service). - * @see #getWindowMove() - */ - public static boolean isWindowMoveSupported() { - return WindowMove__Holder.INSTANCE != null; - } - - /** - * @return full implementation of {@link WindowMove} service if any, or {@code null} otherwise - */ - public static WindowMove getWindowMove() { - return WindowMove__Holder.INSTANCE; - } -} diff --git a/decorated-window/src/main/java/com/jetbrains/RoundedCornersManager.java b/decorated-window/src/main/java/com/jetbrains/RoundedCornersManager.java deleted file mode 100644 index 424e03feda..0000000000 --- a/decorated-window/src/main/java/com/jetbrains/RoundedCornersManager.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2000-2023 JetBrains s.r.o. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.jetbrains; - -import java.awt.*; - -/** - * This manager allows decorate awt Window with rounded corners. - * Appearance depends from operating system. - */ -public interface RoundedCornersManager { - /** - * @param params for macOS is Float object with radius or - * Array with {Float for radius, Integer for border width, java.awt.Color for border color}. - * - * @param params for Windows 11 is String with values: - * "default" - let the system decide whether or not to round window corners, - * "none" - never round window corners, - * "full" - round the corners if appropriate, - * "small" - round the corners if appropriate, with a small radius. - */ - void setRoundedCorners(Window window, Object params); -} diff --git a/decorated-window/src/main/java/com/jetbrains/WindowDecorations.java b/decorated-window/src/main/java/com/jetbrains/WindowDecorations.java deleted file mode 100644 index fc0144fa7c..0000000000 --- a/decorated-window/src/main/java/com/jetbrains/WindowDecorations.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright 2023 JetBrains s.r.o. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.jetbrains; - -import java.awt.*; -import java.util.Map; - -/** - * Window decorations consist of title bar, window controls and border. - * @see CustomTitleBar - */ -public interface WindowDecorations { - - /** - * If {@code customTitleBar} is not null, system-provided title bar is removed and client area is extended to the - * top of the frame with window controls painted over the client area. - * {@code customTitleBar=null} resets to the default appearance with system-provided title bar. - * @see CustomTitleBar - * @see #createCustomTitleBar() - */ - void setCustomTitleBar(Frame frame, CustomTitleBar customTitleBar); - - /** - * If {@code customTitleBar} is not null, system-provided title bar is removed and client area is extended to the - * top of the dialog with window controls painted over the client area. - * {@code customTitleBar=null} resets to the default appearance with system-provided title bar. - * @see CustomTitleBar - * @see #createCustomTitleBar() - */ - void setCustomTitleBar(Dialog dialog, CustomTitleBar customTitleBar); - - /** - * You must {@linkplain CustomTitleBar#setHeight(float) set title bar height} before adding it to a window. - * @see CustomTitleBar - * @see #setCustomTitleBar(Frame, CustomTitleBar) - * @see #setCustomTitleBar(Dialog, CustomTitleBar) - */ - CustomTitleBar createCustomTitleBar(); - - /** - * Custom title bar allows merging of window content with native title bar, - * which is done by treating title bar as part of client area, but with some - * special behavior like dragging or maximizing on double click. - * Custom title bar has {@linkplain CustomTitleBar#getHeight() height} and controls. - * @implNote Behavior is platform-dependent, only macOS and Windows are supported. - * @see #setCustomTitleBar(Frame, CustomTitleBar) - */ - interface CustomTitleBar { - - /** - * @return title bar height, measured in pixels from the top of client area, i.e. excluding top frame border. - */ - float getHeight(); - - /** - * @param height title bar height, measured in pixels from the top of client area, - * i.e. excluding top frame border. Must be > 0. - */ - void setHeight(float height); - - /** - * @see #putProperty(String, Object) - */ - Map getProperties(); - - /** - * @see #putProperty(String, Object) - */ - void putProperties(Map m); - - /** - * Windows & macOS properties: - *
    - *
  • {@code controls.visible} : {@link Boolean} - whether title bar controls - * (minimize/maximize/close buttons) are visible, default = true.
  • - *
- * Windows properties: - *
    - *
  • {@code controls.width} : {@link Number} - width of block of buttons (not individual buttons). - * Note that dialogs have only one button, while frames usually have 3 of them.
  • - *
  • {@code controls.dark} : {@link Boolean} - whether to use dark or light color theme - * (light or dark icons respectively).
  • - *
  • {@code controls..} : {@link Color} - precise control over button colors, - * where {@code } is one of: - *
    • {@code foreground}
    • {@code background}
    - * and {@code } is one of: - *
      - *
    • {@code normal}
    • - *
    • {@code hovered}
    • - *
    • {@code pressed}
    • - *
    • {@code disabled}
    • - *
    • {@code inactive}
    • - *
    - *
- */ - void putProperty(String key, Object value); - - /** - * @return space occupied by title bar controls on the left (px) - */ - float getLeftInset(); - /** - * @return space occupied by title bar controls on the right (px) - */ - float getRightInset(); - - /** - * By default, any component which has no cursor or mouse event listeners set is considered transparent for - * native title bar actions. That is, dragging simple JPanel in title bar area will drag the - * window, but dragging a JButton will not. Adding mouse listener to a component will prevent any native actions - * inside bounds of that component. - *

- * This method gives you precise control of whether to allow native title bar actions or not. - *

    - *
  • {@code client=true} means that mouse is currently over a client area. Native title bar behavior is disabled.
  • - *
  • {@code client=false} means that mouse is currently over a non-client area. Native title bar behavior is enabled.
  • - *
- * Intended usage: - *
    - *
  • This method must be called in response to all {@linkplain java.awt.event.MouseEvent mouse events} - * except {@link java.awt.event.MouseEvent#MOUSE_EXITED} and {@link java.awt.event.MouseEvent#MOUSE_WHEEL}.
  • - *
  • This method is called per-event, i.e. when component has multiple listeners, you only need to call it once.
  • - *
  • If this method hadn't been called, title bar behavior is reverted back to default upon processing the event.
  • - *
- * Note that hit test value is relevant only for title bar area, e.g. calling - * {@code forceHitTest(false)} will not make window draggable via non-title bar area. - * - *

Example:

- * Suppose you have a {@code JPanel} in the title bar area. You want it to respond to right-click for - * some popup menu, but also retain native drag and double-click behavior. - *
-         *     CustomTitleBar titlebar = ...;
-         *     JPanel panel = ...;
-         *     MouseAdapter adapter = new MouseAdapter() {
-         *         private void hit() { titlebar.forceHitTest(false); }
-         *         public void mouseClicked(MouseEvent e) {
-         *             hit();
-         *             if (e.getButton() == MouseEvent.BUTTON3) ...;
-         *         }
-         *         public void mousePressed(MouseEvent e) { hit(); }
-         *         public void mouseReleased(MouseEvent e) { hit(); }
-         *         public void mouseEntered(MouseEvent e) { hit(); }
-         *         public void mouseDragged(MouseEvent e) { hit(); }
-         *         public void mouseMoved(MouseEvent e) { hit(); }
-         *     };
-         *     panel.addMouseListener(adapter);
-         *     panel.addMouseMotionListener(adapter);
-         * 
- */ - void forceHitTest(boolean client); - - Window getContainingWindow(); - } -} diff --git a/decorated-window/src/main/java/com/jetbrains/WindowMove.java b/decorated-window/src/main/java/com/jetbrains/WindowMove.java deleted file mode 100644 index 5f241303c0..0000000000 --- a/decorated-window/src/main/java/com/jetbrains/WindowMove.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2000-2023 JetBrains s.r.o. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.jetbrains; - -import java.awt.*; - -public interface WindowMove { - /** - * Starts moving the top-level parent window of the given window together with the mouse pointer. - * The intended use is to facilitate the implementation of window management similar to the way - * it is done natively on the platform. - * - * Preconditions for calling this method: - *
    - *
  • WM supports _NET_WM_MOVE_RESIZE (this is checked automatically when an implementation - * of this interface is obtained).
  • - *
  • Mouse pointer is within this window's bounds.
  • - *
  • The mouse button specified by {@code mouseButton} is pressed.
  • - *
- * - * Calling this method will make the window start moving together with the mouse pointer until - * the specified mouse button is released or Esc is pressed. The conditions for cancelling - * the move may differ between WMs. - * - * @param mouseButton indicates the mouse button that was pressed to start moving the window; - * must be one of {@code MouseEvent.BUTTON1}, {@code MouseEvent.BUTTON2}, - * or {@code MouseEvent.BUTTON3}. - */ - void startMovingTogetherWithMouse(Window window, int mouseButton); -} diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/DecoratedWindow.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/DecoratedWindow.kt deleted file mode 100644 index 6abc043863..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/DecoratedWindow.kt +++ /dev/null @@ -1,289 +0,0 @@ -package org.jetbrains.jewel.window - -import androidx.compose.foundation.layout.padding -import androidx.compose.runtime.Composable -import androidx.compose.runtime.CompositionLocalProvider -import androidx.compose.runtime.DisposableEffect -import androidx.compose.runtime.Immutable -import androidx.compose.runtime.ProvidableCompositionLocal -import androidx.compose.runtime.Stable -import androidx.compose.runtime.compositionLocalOf -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Modifier -import androidx.compose.ui.awt.ComposeWindow -import androidx.compose.ui.graphics.RectangleShape -import androidx.compose.ui.graphics.painter.Painter -import androidx.compose.ui.input.key.KeyEvent -import androidx.compose.ui.layout.Layout -import androidx.compose.ui.layout.Measurable -import androidx.compose.ui.layout.MeasurePolicy -import androidx.compose.ui.layout.MeasureResult -import androidx.compose.ui.layout.MeasureScope -import androidx.compose.ui.layout.Placeable -import androidx.compose.ui.layout.layoutId -import androidx.compose.ui.unit.Constraints -import androidx.compose.ui.unit.offset -import androidx.compose.ui.window.FrameWindowScope -import androidx.compose.ui.window.Window -import androidx.compose.ui.window.WindowPlacement -import androidx.compose.ui.window.WindowState -import androidx.compose.ui.window.rememberWindowState -import com.jetbrains.JBR -import org.jetbrains.jewel.foundation.Stroke -import org.jetbrains.jewel.foundation.modifier.border -import org.jetbrains.jewel.foundation.modifier.trackWindowActivation -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.window.styling.DecoratedWindowStyle -import org.jetbrains.jewel.window.utils.DesktopPlatform -import java.awt.event.ComponentEvent -import java.awt.event.ComponentListener -import java.awt.event.WindowAdapter -import java.awt.event.WindowEvent - -@Composable -public fun DecoratedWindow( - onCloseRequest: () -> Unit, - state: WindowState = rememberWindowState(), - visible: Boolean = true, - title: String = "", - icon: Painter? = null, - resizable: Boolean = true, - enabled: Boolean = true, - focusable: Boolean = true, - alwaysOnTop: Boolean = false, - onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, - onKeyEvent: (KeyEvent) -> Boolean = { false }, - style: DecoratedWindowStyle = JewelTheme.defaultDecoratedWindowStyle, - content: @Composable DecoratedWindowScope.() -> Unit, -) { - remember { - if (!JBR.isAvailable()) { - error( - "DecoratedWindow can only be used on JetBrainsRuntime(JBR) platform, " + - "please check the document https://github.com/JetBrains/jewel#int-ui-standalone-theme", - ) - } - } - - // Using undecorated window for linux - val undecorated = DesktopPlatform.Linux == DesktopPlatform.Current - - Window( - onCloseRequest, - state, - visible, - title, - icon, - undecorated, - transparent = false, - resizable, - enabled, - focusable, - alwaysOnTop, - onPreviewKeyEvent, - onKeyEvent, - ) { - var decoratedWindowState by remember { mutableStateOf(DecoratedWindowState.of(window)) } - - DisposableEffect(window) { - val adapter = object : WindowAdapter(), ComponentListener { - override fun windowActivated(e: WindowEvent?) { - decoratedWindowState = DecoratedWindowState.of(window) - } - - override fun windowDeactivated(e: WindowEvent?) { - decoratedWindowState = DecoratedWindowState.of(window) - } - - override fun windowIconified(e: WindowEvent?) { - decoratedWindowState = DecoratedWindowState.of(window) - } - - override fun windowDeiconified(e: WindowEvent?) { - decoratedWindowState = DecoratedWindowState.of(window) - } - - override fun windowStateChanged(e: WindowEvent) { - decoratedWindowState = DecoratedWindowState.of(window) - } - - override fun componentResized(e: ComponentEvent?) { - decoratedWindowState = DecoratedWindowState.of(window) - } - - override fun componentMoved(e: ComponentEvent?) { - // Empty - } - - override fun componentShown(e: ComponentEvent?) { - // Empty - } - - override fun componentHidden(e: ComponentEvent?) { - // Empty - } - } - - window.addWindowListener(adapter) - window.addWindowStateListener(adapter) - window.addComponentListener(adapter) - - onDispose { - window.removeWindowListener(adapter) - window.removeWindowStateListener(adapter) - window.removeComponentListener(adapter) - } - } - - val undecoratedWindowBorder = - if (undecorated && !decoratedWindowState.isMaximized) { - Modifier.border( - Stroke.Alignment.Inside, - style.metrics.borderWidth, - style.colors.borderFor(decoratedWindowState).value, - RectangleShape, - ).padding(style.metrics.borderWidth) - } else { - Modifier - } - - CompositionLocalProvider( - LocalTitleBarInfo provides TitleBarInfo(title, icon), - ) { - Layout( - content = { - val scope = object : DecoratedWindowScope { - override val state: DecoratedWindowState - get() = decoratedWindowState - - override val window: ComposeWindow - get() = this@Window.window - } - scope.content() - }, - modifier = undecoratedWindowBorder.trackWindowActivation(window), - measurePolicy = DecoratedWindowMeasurePolicy, - ) - } - } -} - -@Stable -public interface DecoratedWindowScope : FrameWindowScope { - - override val window: ComposeWindow - - public val state: DecoratedWindowState -} - -private object DecoratedWindowMeasurePolicy : MeasurePolicy { - - override fun MeasureScope.measure(measurables: List, constraints: Constraints): MeasureResult { - if (measurables.isEmpty()) { - return layout(width = constraints.minWidth, height = constraints.minHeight) {} - } - - val titleBars = measurables.filter { it.layoutId == TITLE_BAR_LAYOUT_ID } - if (titleBars.size > 1) { - error("Window just can have only one title bar") - } - val titleBar = titleBars.firstOrNull() - val titleBarBorder = measurables.firstOrNull { it.layoutId == TITLE_BAR_BORDER_LAYOUT_ID } - - val contentConstraints = constraints.copy(minWidth = 0, minHeight = 0) - - val titleBarPlaceable = titleBar?.measure(contentConstraints) - val titleBarHeight = titleBarPlaceable?.height ?: 0 - - val titleBarBorderPlaceable = titleBarBorder?.measure(contentConstraints) - val titleBarBorderHeight = titleBarBorderPlaceable?.height ?: 0 - - val measuredPlaceable = mutableListOf() - - for (it in measurables) { - if (it.layoutId.toString().startsWith(TITLE_BAR_COMPONENT_LAYOUT_ID_PREFIX)) continue - val offsetConstraints = contentConstraints.offset(vertical = -titleBarHeight - titleBarBorderHeight) - val placeable = it.measure(offsetConstraints) - measuredPlaceable += placeable - } - - return layout(constraints.maxWidth, constraints.maxHeight) { - titleBarPlaceable?.placeRelative(0, 0) - titleBarBorderPlaceable?.placeRelative(0, titleBarHeight) - - measuredPlaceable.forEach { it.placeRelative(0, titleBarHeight + titleBarBorderHeight) } - } - } -} - -@Immutable -@JvmInline -public value class DecoratedWindowState(public val state: ULong) { - - public val isActive: Boolean - get() = state and Active != 0UL - - public val isFullscreen: Boolean - get() = state and Fullscreen != 0UL - - public val isMinimized: Boolean - get() = state and Minimize != 0UL - - public val isMaximized: Boolean - get() = state and Maximize != 0UL - - public fun copy( - fullscreen: Boolean = isFullscreen, - minimized: Boolean = isMinimized, - maximized: Boolean = isMaximized, - active: Boolean = isActive, - ): DecoratedWindowState = - of( - fullscreen = fullscreen, - minimized = minimized, - maximized = maximized, - active = active, - ) - - override fun toString(): String = - "${javaClass.simpleName}(isFullscreen=$isFullscreen, isActive=$isActive)" - - public companion object { - - public val Active: ULong = 1UL shl 0 - public val Fullscreen: ULong = 1UL shl 1 - public val Minimize: ULong = 1UL shl 2 - public val Maximize: ULong = 1UL shl 3 - - public fun of( - fullscreen: Boolean = false, - minimized: Boolean = false, - maximized: Boolean = false, - active: Boolean = true, - ): DecoratedWindowState = - DecoratedWindowState( - (if (fullscreen) Fullscreen else 0UL) or - (if (minimized) Minimize else 0UL) or - (if (maximized) Maximize else 0UL) or - (if (active) Active else 0UL), - ) - - public fun of(window: ComposeWindow): DecoratedWindowState = - of( - fullscreen = window.placement == WindowPlacement.Fullscreen, - minimized = window.isMinimized, - maximized = window.placement == WindowPlacement.Maximized, - active = window.isActive, - ) - } -} - -internal data class TitleBarInfo(val title: String, val icon: Painter?) - -internal val LocalTitleBarInfo: ProvidableCompositionLocal = - compositionLocalOf { - error("LocalTitleBarInfo not provided, TitleBar must be used in DecoratedWindow") - } diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/Theme.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/Theme.kt deleted file mode 100644 index 93d672e515..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/Theme.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.jetbrains.jewel.window - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.ReadOnlyComposable -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.window.styling.DecoratedWindowStyle -import org.jetbrains.jewel.window.styling.LocalDecoratedWindowStyle -import org.jetbrains.jewel.window.styling.LocalTitleBarStyle -import org.jetbrains.jewel.window.styling.TitleBarStyle - -public val JewelTheme.Companion.defaultTitleBarStyle: TitleBarStyle - @Composable @ReadOnlyComposable - get() = LocalTitleBarStyle.current - -public val JewelTheme.Companion.defaultDecoratedWindowStyle: DecoratedWindowStyle - @Composable @ReadOnlyComposable - get() = LocalDecoratedWindowStyle.current diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.Linux.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.Linux.kt deleted file mode 100644 index 04e50248a1..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.Linux.kt +++ /dev/null @@ -1,134 +0,0 @@ -package org.jetbrains.jewel.window - -import androidx.compose.foundation.focusable -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.layout.size -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.input.pointer.PointerButton -import androidx.compose.ui.input.pointer.PointerEventPass -import androidx.compose.ui.input.pointer.PointerEventType -import androidx.compose.ui.input.pointer.onPointerEvent -import androidx.compose.ui.platform.LocalViewConfiguration -import androidx.compose.ui.unit.dp -import com.jetbrains.JBR -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.ui.component.Icon -import org.jetbrains.jewel.ui.component.IconButton -import org.jetbrains.jewel.ui.component.styling.IconButtonStyle -import org.jetbrains.jewel.ui.painter.PainterHint -import org.jetbrains.jewel.ui.painter.PainterProvider -import org.jetbrains.jewel.ui.painter.PainterProviderScope -import org.jetbrains.jewel.ui.painter.PainterSuffixHint -import org.jetbrains.jewel.window.styling.TitleBarStyle -import java.awt.Frame -import java.awt.event.MouseEvent -import java.awt.event.WindowEvent - -@Composable -internal fun DecoratedWindowScope.TitleBarOnLinux( - modifier: Modifier = Modifier, - gradientStartColor: Color = Color.Unspecified, - style: TitleBarStyle = JewelTheme.defaultTitleBarStyle, - content: @Composable TitleBarScope.(DecoratedWindowState) -> Unit, -) { - var lastPress = 0L - val viewConfig = LocalViewConfiguration.current - TitleBarImpl( - modifier.onPointerEvent(PointerEventType.Press, PointerEventPass.Main) { - if (this.currentEvent.button == PointerButton.Primary && - this.currentEvent.changes.any { changed -> !changed.isConsumed } - ) { - JBR.getWindowMove()?.startMovingTogetherWithMouse(window, MouseEvent.BUTTON1) - if (System.currentTimeMillis() - lastPress in - viewConfig.doubleTapMinTimeMillis..viewConfig.doubleTapTimeoutMillis - ) { - if (state.isMaximized) { - window.extendedState = Frame.NORMAL - } else { - window.extendedState = Frame.MAXIMIZED_BOTH - } - } - lastPress = System.currentTimeMillis() - } - }, - gradientStartColor, - style, - { _, _ -> PaddingValues(0.dp) }, - ) { state -> - CloseButton( - { window.dispatchEvent(WindowEvent(window, WindowEvent.WINDOW_CLOSING)) }, - state, - style, - ) - - if (state.isMaximized) { - ControlButton( - { window.extendedState = Frame.NORMAL }, - state, - style.icons.restoreButton, - "Restore", - ) - } else { - ControlButton( - { window.extendedState = Frame.MAXIMIZED_BOTH }, - state, - style.icons.maximizeButton, - "Maximize", - ) - } - ControlButton( - { window.extendedState = Frame.ICONIFIED }, - state, - style.icons.minimizeButton, - "Minimize", - ) - content(state) - } -} - -@Composable -private fun TitleBarScope.CloseButton( - onClick: () -> Unit, - state: DecoratedWindowState, - style: TitleBarStyle = JewelTheme.defaultTitleBarStyle, -) { - ControlButton( - onClick, - state, - style.icons.closeButton, - "Close", - style, - style.paneCloseButtonStyle, - ) -} - -@Composable -private fun TitleBarScope.ControlButton( - onClick: () -> Unit, - state: DecoratedWindowState, - painterProvider: PainterProvider, - description: String, - style: TitleBarStyle = JewelTheme.defaultTitleBarStyle, - iconButtonStyle: IconButtonStyle = style.paneButtonStyle, -) { - IconButton( - onClick, - Modifier.align(Alignment.End).focusable(false).size(style.metrics.titlePaneButtonSize), - style = iconButtonStyle, - ) { - Icon( - painterProvider.getPainter(if (state.isActive) PainterHint else Inactive).value, - description, - ) - } -} - -private object Inactive : PainterSuffixHint() { - - override fun PainterProviderScope.suffix(): String = "Inactive" - - override fun toString(): String = "Inactive" -} diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.MacOS.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.MacOS.kt deleted file mode 100644 index 63475e2d14..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.MacOS.kt +++ /dev/null @@ -1,103 +0,0 @@ -package org.jetbrains.jewel.window - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.toArgb -import androidx.compose.ui.node.ModifierNodeElement -import androidx.compose.ui.platform.InspectorInfo -import androidx.compose.ui.platform.debugInspectorInfo -import androidx.compose.ui.unit.dp -import com.jetbrains.JBR -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.window.styling.TitleBarStyle -import org.jetbrains.jewel.window.utils.macos.MacUtil - -public fun Modifier.newFullscreenControls(newControls: Boolean = true): Modifier = - this then NewFullscreenControlsElement( - newControls, - debugInspectorInfo { - name = "newFullscreenControls" - value = newControls - }, - ) - -private class NewFullscreenControlsElement( - val newControls: Boolean, - val inspectorInfo: InspectorInfo.() -> Unit, -) : ModifierNodeElement() { - - override fun create(): NewFullscreenControlsNode = - NewFullscreenControlsNode(newControls) - - override fun equals(other: Any?): Boolean { - if (this === other) return true - val otherModifier = other as? NewFullscreenControlsElement - ?: return false - return newControls == otherModifier.newControls - } - - override fun hashCode(): Int = newControls.hashCode() - - override fun InspectorInfo.inspectableProperties() { - inspectorInfo() - } - - override fun update(node: NewFullscreenControlsNode) { - node.newControls = newControls - } -} - -private class NewFullscreenControlsNode(var newControls: Boolean) : Modifier.Node() - -@Composable -internal fun DecoratedWindowScope.TitleBarOnMacOs( - modifier: Modifier = Modifier, - gradientStartColor: Color = Color.Unspecified, - style: TitleBarStyle = JewelTheme.defaultTitleBarStyle, - content: @Composable TitleBarScope.(DecoratedWindowState) -> Unit, -) { - val newFullscreenControls = modifier.foldOut(false) { e, r -> - if (e is NewFullscreenControlsElement) { - e.newControls - } else { - r - } - } - - if (newFullscreenControls) { - System.setProperty("apple.awt.newFullScreeControls", true.toString()) - System.setProperty( - "apple.awt.newFullScreeControls.background", - "${style.colors.fullscreenControlButtonsBackground.toArgb()}", - ) - MacUtil.updateColors(window) - } else { - System.clearProperty("apple.awt.newFullScreeControls") - System.clearProperty("apple.awt.newFullScreeControls.background") - } - - val titleBar = remember { JBR.getWindowDecorations().createCustomTitleBar() } - - TitleBarImpl( - modifier = modifier.customTitleBarMouseEventHandler(titleBar), - gradientStartColor = gradientStartColor, - style = style, - applyTitleBar = { height, state -> - if (state.isFullscreen) { - MacUtil.updateFullScreenButtons(window) - } - titleBar.height = height.value - JBR.getWindowDecorations().setCustomTitleBar(window, titleBar) - - if (state.isFullscreen && newFullscreenControls) { - PaddingValues(start = 80.dp) - } else { - PaddingValues(start = titleBar.leftInset.dp, end = titleBar.rightInset.dp) - } - }, - content = content, - ) -} diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.Windows.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.Windows.kt deleted file mode 100644 index e342f36bae..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.Windows.kt +++ /dev/null @@ -1,65 +0,0 @@ -package org.jetbrains.jewel.window - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.input.pointer.PointerEventPass -import androidx.compose.ui.input.pointer.PointerEventType -import androidx.compose.ui.input.pointer.pointerInput -import androidx.compose.ui.unit.dp -import com.jetbrains.JBR -import com.jetbrains.WindowDecorations.CustomTitleBar -import kotlinx.coroutines.currentCoroutineContext -import kotlinx.coroutines.isActive -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.ui.util.isDark -import org.jetbrains.jewel.window.styling.TitleBarStyle - -@Composable -internal fun DecoratedWindowScope.TitleBarOnWindows( - modifier: Modifier = Modifier, - gradientStartColor: Color = Color.Unspecified, - style: TitleBarStyle = JewelTheme.defaultTitleBarStyle, - content: @Composable TitleBarScope.(DecoratedWindowState) -> Unit, -) { - val titleBar = remember { JBR.getWindowDecorations().createCustomTitleBar() } - - TitleBarImpl( - modifier = modifier.customTitleBarMouseEventHandler(titleBar), - gradientStartColor = gradientStartColor, - style = style, - applyTitleBar = { height, _ -> - titleBar.height = height.value - titleBar.putProperty("controls.dark", style.colors.background.isDark()) - JBR.getWindowDecorations().setCustomTitleBar(window, titleBar) - PaddingValues(start = titleBar.leftInset.dp, end = titleBar.rightInset.dp) - }, - content = content, - ) -} - -internal fun Modifier.customTitleBarMouseEventHandler(titleBar: CustomTitleBar): Modifier = - pointerInput(Unit) { - val currentContext = currentCoroutineContext() - awaitPointerEventScope { - var inUserControl = false - while (currentContext.isActive) { - val event = awaitPointerEvent(PointerEventPass.Main) - event.changes.forEach { - if (!it.isConsumed && !inUserControl) { - titleBar.forceHitTest(false) - } else { - if (event.type == PointerEventType.Press) { - inUserControl = true - } - if (event.type == PointerEventType.Release) { - inUserControl = false - } - titleBar.forceHitTest(true) - } - } - } - } - } diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.kt deleted file mode 100644 index acd1218ff1..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/TitleBar.kt +++ /dev/null @@ -1,294 +0,0 @@ -package org.jetbrains.jewel.window - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.runtime.Composable -import androidx.compose.runtime.CompositionLocalProvider -import androidx.compose.runtime.Stable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.remember -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.focus.focusProperties -import androidx.compose.ui.graphics.Brush -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor -import androidx.compose.ui.graphics.isUnspecified -import androidx.compose.ui.graphics.painter.Painter -import androidx.compose.ui.layout.Layout -import androidx.compose.ui.layout.Measurable -import androidx.compose.ui.layout.MeasurePolicy -import androidx.compose.ui.layout.MeasureResult -import androidx.compose.ui.layout.MeasureScope -import androidx.compose.ui.layout.Placeable -import androidx.compose.ui.layout.layoutId -import androidx.compose.ui.layout.onSizeChanged -import androidx.compose.ui.node.ModifierNodeElement -import androidx.compose.ui.node.ParentDataModifierNode -import androidx.compose.ui.platform.InspectableValue -import androidx.compose.ui.platform.InspectorInfo -import androidx.compose.ui.platform.LocalDensity -import androidx.compose.ui.platform.NoInspectorInfo -import androidx.compose.ui.platform.debugInspectorInfo -import androidx.compose.ui.unit.Constraints -import androidx.compose.ui.unit.Density -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.offset -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.foundation.theme.LocalContentColor -import org.jetbrains.jewel.foundation.theme.OverrideDarkMode -import org.jetbrains.jewel.ui.component.styling.LocalDefaultDropdownStyle -import org.jetbrains.jewel.ui.component.styling.LocalIconButtonStyle -import org.jetbrains.jewel.ui.util.isDark -import org.jetbrains.jewel.window.styling.TitleBarStyle -import org.jetbrains.jewel.window.utils.DesktopPlatform -import org.jetbrains.jewel.window.utils.macos.MacUtil -import java.awt.Window -import kotlin.math.max - -internal const val TITLE_BAR_COMPONENT_LAYOUT_ID_PREFIX = "__TITLE_BAR_" - -internal const val TITLE_BAR_LAYOUT_ID = "__TITLE_BAR_CONTENT__" - -internal const val TITLE_BAR_BORDER_LAYOUT_ID = "__TITLE_BAR_BORDER__" - -@Composable -public fun DecoratedWindowScope.TitleBar( - modifier: Modifier = Modifier, - gradientStartColor: Color = Color.Unspecified, - style: TitleBarStyle = JewelTheme.defaultTitleBarStyle, - content: @Composable TitleBarScope.(DecoratedWindowState) -> Unit, -) { - when (DesktopPlatform.Current) { - DesktopPlatform.Linux -> TitleBarOnLinux(modifier, gradientStartColor, style, content) - DesktopPlatform.Windows -> TitleBarOnWindows(modifier, gradientStartColor, style, content) - DesktopPlatform.MacOS -> TitleBarOnMacOs(modifier, gradientStartColor, style, content) - DesktopPlatform.Unknown -> error("TitleBar is not supported on this platform(${System.getProperty("os.name")})") - } -} - -@Composable -internal fun DecoratedWindowScope.TitleBarImpl( - modifier: Modifier = Modifier, - gradientStartColor: Color = Color.Unspecified, - style: TitleBarStyle = JewelTheme.defaultTitleBarStyle, - applyTitleBar: (Dp, DecoratedWindowState) -> PaddingValues, - content: @Composable TitleBarScope.(DecoratedWindowState) -> Unit, -) { - val titleBarInfo = LocalTitleBarInfo.current - - val background by style.colors.backgroundFor(state) - - val density = LocalDensity.current - - val backgroundBrush = remember(background, gradientStartColor) { - if (gradientStartColor.isUnspecified) { - SolidColor(background) - } else { - with(density) { - Brush.horizontalGradient( - 0.0f to background, - 0.5f to gradientStartColor, - 1.0f to background, - startX = style.metrics.gradientStartX.toPx(), - endX = style.metrics.gradientEndX.toPx(), - ) - } - } - } - - Layout( - content = { - CompositionLocalProvider( - LocalContentColor provides style.colors.content, - LocalIconButtonStyle provides style.iconButtonStyle, - LocalDefaultDropdownStyle provides style.dropdownStyle, - ) { - OverrideDarkMode(background.isDark()) { - val scope = TitleBarScopeImpl(titleBarInfo.title, titleBarInfo.icon) - scope.content(state) - } - } - }, - modifier = modifier.background(backgroundBrush) - .focusProperties { canFocus = false } - .layoutId(TITLE_BAR_LAYOUT_ID) - .height(style.metrics.height) - .onSizeChanged { with(density) { applyTitleBar(it.height.toDp(), state) } } - .fillMaxWidth(), - measurePolicy = rememberTitleBarMeasurePolicy( - window, - state, - applyTitleBar, - ), - ) - - Spacer( - Modifier.layoutId(TITLE_BAR_BORDER_LAYOUT_ID) - .height(1.dp) - .fillMaxWidth() - .background(style.colors.border), - ) -} - -internal class TitleBarMeasurePolicy( - private val window: Window, - private val state: DecoratedWindowState, - private val applyTitleBar: (Dp, DecoratedWindowState) -> PaddingValues, -) : MeasurePolicy { - - override fun MeasureScope.measure(measurables: List, constraints: Constraints): MeasureResult { - if (measurables.isEmpty()) { - return layout(width = constraints.minWidth, height = constraints.minHeight) {} - } - - var occupiedSpaceHorizontally = 0 - - var maxSpaceVertically = constraints.minHeight - val contentConstraints = constraints.copy(minWidth = 0, minHeight = 0) - val measuredPlaceable = mutableListOf>() - - for (it in measurables) { - val placeable = it.measure(contentConstraints.offset(horizontal = -occupiedSpaceHorizontally)) - if (constraints.maxWidth < occupiedSpaceHorizontally + placeable.width) { - break - } - occupiedSpaceHorizontally += placeable.width - maxSpaceVertically = max(maxSpaceVertically, placeable.height) - measuredPlaceable += it to placeable - } - - val boxHeight = maxSpaceVertically - - val contentPadding = applyTitleBar(boxHeight.toDp(), state) - - val leftInset = contentPadding.calculateLeftPadding(layoutDirection).roundToPx() - val rightInset = contentPadding.calculateRightPadding(layoutDirection).roundToPx() - - occupiedSpaceHorizontally += leftInset - occupiedSpaceHorizontally += rightInset - - val boxWidth = maxOf(constraints.minWidth, occupiedSpaceHorizontally) - - return layout(boxWidth, boxHeight) { - if (state.isFullscreen) { - MacUtil.updateFullScreenButtons(window) - } - val placeableGroups = - measuredPlaceable.groupBy { (measurable, _) -> - (measurable.parentData as? TitleBarChildDataNode)?.horizontalAlignment - ?: Alignment.CenterHorizontally - } - - var headUsedSpace = leftInset - var trailerUsedSpace = rightInset - - placeableGroups[Alignment.Start]?.forEach { (_, placeable) -> - val x = headUsedSpace - val y = Alignment.CenterVertically.align(placeable.height, boxHeight) - placeable.placeRelative(x, y) - headUsedSpace += placeable.width - } - placeableGroups[Alignment.End]?.forEach { (_, placeable) -> - val x = boxWidth - placeable.width - trailerUsedSpace - val y = Alignment.CenterVertically.align(placeable.height, boxHeight) - placeable.placeRelative(x, y) - trailerUsedSpace += placeable.width - } - - val centerPlaceable = placeableGroups[Alignment.CenterHorizontally].orEmpty() - - val requiredCenterSpace = centerPlaceable.sumOf { it.second.width } - val minX = headUsedSpace - val maxX = boxWidth - trailerUsedSpace - requiredCenterSpace - var centerX = (boxWidth - requiredCenterSpace) / 2 - - if (minX <= maxX) { - if (centerX > maxX) { - centerX = maxX - } - if (centerX < minX) { - centerX = minX - } - - centerPlaceable.forEach { (_, placeable) -> - val x = centerX - val y = Alignment.CenterVertically.align(placeable.height, boxHeight) - placeable.placeRelative(x, y) - centerX += placeable.width - } - } - } - } -} - -@Composable -internal fun rememberTitleBarMeasurePolicy( - window: Window, - state: DecoratedWindowState, - applyTitleBar: (Dp, DecoratedWindowState) -> PaddingValues, -): MeasurePolicy = - remember(window, state, applyTitleBar) { - TitleBarMeasurePolicy(window, state, applyTitleBar) - } - -public interface TitleBarScope { - - public val title: String - - public val icon: Painter? - - @Stable - public fun Modifier.align(alignment: Alignment.Horizontal): Modifier -} - -private class TitleBarScopeImpl( - override val title: String, - override val icon: Painter?, -) : TitleBarScope { - - override fun Modifier.align(alignment: Alignment.Horizontal): Modifier = - this then TitleBarChildDataElement( - alignment, - debugInspectorInfo { - name = "align" - value = alignment - }, - ) -} - -private class TitleBarChildDataElement( - val horizontalAlignment: Alignment.Horizontal, - val inspectorInfo: InspectorInfo.() -> Unit = NoInspectorInfo, -) : ModifierNodeElement(), InspectableValue { - - override fun create(): TitleBarChildDataNode = TitleBarChildDataNode(horizontalAlignment) - - override fun equals(other: Any?): Boolean { - if (this === other) return true - val otherModifier = other as? TitleBarChildDataElement ?: return false - return horizontalAlignment == otherModifier.horizontalAlignment - } - - override fun hashCode(): Int = horizontalAlignment.hashCode() - - override fun update(node: TitleBarChildDataNode) { - node.horizontalAlignment = horizontalAlignment - } - - override fun InspectorInfo.inspectableProperties() { - inspectorInfo() - } -} - -private class TitleBarChildDataNode( - var horizontalAlignment: Alignment.Horizontal, -) : ParentDataModifierNode, Modifier.Node() { - - override fun Density.modifyParentData(parentData: Any?) = - this@TitleBarChildDataNode -} diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/styling/DecoratedWindowStyling.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/styling/DecoratedWindowStyling.kt deleted file mode 100644 index cc15f5ac62..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/styling/DecoratedWindowStyling.kt +++ /dev/null @@ -1,53 +0,0 @@ -package org.jetbrains.jewel.window.styling - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.Immutable -import androidx.compose.runtime.ProvidableCompositionLocal -import androidx.compose.runtime.State -import androidx.compose.runtime.rememberUpdatedState -import androidx.compose.runtime.staticCompositionLocalOf -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import org.jetbrains.jewel.foundation.GenerateDataFunctions -import org.jetbrains.jewel.window.DecoratedWindowState - -@Immutable -@GenerateDataFunctions -public class DecoratedWindowStyle( - public val colors: DecoratedWindowColors, - public val metrics: DecoratedWindowMetrics, -) { - - public companion object -} - -@Immutable -@GenerateDataFunctions -public class DecoratedWindowColors( - public val border: Color, - public val borderInactive: Color, -) { - - @Composable - public fun borderFor(state: DecoratedWindowState): State = - rememberUpdatedState( - when { - !state.isActive -> borderInactive - else -> border - }, - ) - - public companion object -} - -@Immutable -@GenerateDataFunctions -public class DecoratedWindowMetrics(public val borderWidth: Dp) { - - public companion object -} - -public val LocalDecoratedWindowStyle: ProvidableCompositionLocal = - staticCompositionLocalOf { - error("No DecoratedWindowStyle provided. Have you forgotten the theme?") - } diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/styling/TitleBarStyling.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/styling/TitleBarStyling.kt deleted file mode 100644 index ca0d907f2c..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/styling/TitleBarStyling.kt +++ /dev/null @@ -1,102 +0,0 @@ -package org.jetbrains.jewel.window.styling - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.Immutable -import androidx.compose.runtime.ProvidableCompositionLocal -import androidx.compose.runtime.Stable -import androidx.compose.runtime.State -import androidx.compose.runtime.rememberUpdatedState -import androidx.compose.runtime.staticCompositionLocalOf -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import org.jetbrains.jewel.foundation.GenerateDataFunctions -import org.jetbrains.jewel.ui.component.styling.DropdownStyle -import org.jetbrains.jewel.ui.component.styling.IconButtonStyle -import org.jetbrains.jewel.ui.painter.PainterProvider -import org.jetbrains.jewel.window.DecoratedWindowState - -@Stable -@GenerateDataFunctions -public class TitleBarStyle( - public val colors: TitleBarColors, - public val metrics: TitleBarMetrics, - public val icons: TitleBarIcons, - public val dropdownStyle: DropdownStyle, - public val iconButtonStyle: IconButtonStyle, - public val paneButtonStyle: IconButtonStyle, - public val paneCloseButtonStyle: IconButtonStyle, -) { - - public companion object -} - -@Immutable -@GenerateDataFunctions -public class TitleBarColors( - public val background: Color, - public val inactiveBackground: Color, - public val content: Color, - public val border: Color, - - // The background color for newControlButtons(three circles in left top corner) in MacOS - // fullscreen mode - public val fullscreenControlButtonsBackground: Color, - - // The hover and press background color for window control buttons(minimize, maximize) in Linux - public val titlePaneButtonHoveredBackground: Color, - public val titlePaneButtonPressedBackground: Color, - - // The hover and press background color for window close button in Linux - public val titlePaneCloseButtonHoveredBackground: Color, - public val titlePaneCloseButtonPressedBackground: Color, - - // The hover and press background color for IconButtons in title bar content - public val iconButtonHoveredBackground: Color, - public val iconButtonPressedBackground: Color, - - // The hover and press background color for Dropdown in title bar content - public val dropdownPressedBackground: Color, - public val dropdownHoveredBackground: Color, -) { - - @Composable - public fun backgroundFor(state: DecoratedWindowState): State = - rememberUpdatedState( - when { - !state.isActive -> inactiveBackground - else -> background - }, - ) - - public companion object -} - -@Immutable -@GenerateDataFunctions -public class TitleBarMetrics( - public val height: Dp, - public val gradientStartX: Dp, - public val gradientEndX: Dp, - public val titlePaneButtonSize: DpSize, -) { - - public companion object -} - -@Immutable -@GenerateDataFunctions -public class TitleBarIcons( - public val minimizeButton: PainterProvider, - public val maximizeButton: PainterProvider, - public val restoreButton: PainterProvider, - public val closeButton: PainterProvider, -) { - - public companion object -} - -public val LocalTitleBarStyle: ProvidableCompositionLocal = - staticCompositionLocalOf { - error("No TitleBarStyle provided. Have you forgotten the theme?") - } diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/DesktopPlatform.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/DesktopPlatform.kt deleted file mode 100644 index 51872dc474..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/DesktopPlatform.kt +++ /dev/null @@ -1,22 +0,0 @@ -package org.jetbrains.jewel.window.utils - -public enum class DesktopPlatform { - Linux, - Windows, - MacOS, - Unknown, - ; - - public companion object { - - public val Current: DesktopPlatform by lazy { - val name = System.getProperty("os.name") - when { - name?.startsWith("Linux") == true -> Linux - name?.startsWith("Win") == true -> Windows - name == "Mac OS X" -> MacOS - else -> Unknown - } - } - } -} diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/JnaLoader.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/JnaLoader.kt deleted file mode 100644 index 7e136b0f65..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/JnaLoader.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.jetbrains.jewel.window.utils - -import com.sun.jna.Native -import java.util.logging.Level -import java.util.logging.Logger -import kotlin.system.measureTimeMillis - -internal object JnaLoader { - - private var loaded: Boolean? = null - private val logger = Logger.getLogger(JnaLoader::class.java.simpleName) - - @Synchronized - fun load() { - if (loaded == null) { - loaded = false - try { - val time = measureTimeMillis { Native.POINTER_SIZE } - logger.info("JNA library (${Native.POINTER_SIZE shl 3}-bit) loaded in $time ms") - loaded = true - } catch (@Suppress("TooGenericExceptionCaught") t: Throwable) { - logger.log( - Level.WARNING, - "Unable to load JNA library(os=${ - System.getProperty("os.name") - } ${System.getProperty("os.version")}, jna.boot.library.path=${ - System.getProperty("jna.boot.library.path") - })", - t, - ) - } - } - } - - @get:Synchronized - val isLoaded: Boolean - get() { - if (loaded == null) { - load() - } - return loaded ?: false - } -} diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/UnsafeAccessing.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/UnsafeAccessing.kt deleted file mode 100644 index ed0e7920a2..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/UnsafeAccessing.kt +++ /dev/null @@ -1,73 +0,0 @@ -package org.jetbrains.jewel.window.utils - -import sun.misc.Unsafe -import java.lang.reflect.AccessibleObject -import java.util.logging.Level -import java.util.logging.Logger - -internal object UnsafeAccessing { - - private val logger = Logger.getLogger(UnsafeAccessing::class.java.simpleName) - - private val unsafe: Any? by lazy { - try { - val theUnsafe = Unsafe::class.java.getDeclaredField("theUnsafe") - theUnsafe.isAccessible = true - theUnsafe.get(null) as Unsafe - } catch (@Suppress("TooGenericExceptionCaught") error: Throwable) { - logger.log(Level.WARNING, "Unsafe accessing initializing failed.", error) - null - } - } - - val desktopModule by lazy { ModuleLayer.boot().findModule("java.desktop").get() } - - val ownerModule: Module by lazy { this.javaClass.module } - - private val isAccessibleFieldOffset: Long? by lazy { - try { - (unsafe as? Unsafe)?.objectFieldOffset(Parent::class.java.getDeclaredField("first")) - } catch (_: Throwable) { - null - } - } - - private val implAddOpens by lazy { - try { - Module::class.java - .getDeclaredMethod("implAddOpens", String::class.java, Module::class.java) - .accessible() - } catch (_: Throwable) { - null - } - } - - fun assignAccessibility(obj: AccessibleObject) { - try { - val theUnsafe = unsafe as? Unsafe ?: return - val offset = isAccessibleFieldOffset ?: return - theUnsafe.putBooleanVolatile(obj, offset, true) - } catch (_: Throwable) { - // ignore - } - } - - fun assignAccessibility(module: Module, packages: List) { - try { - packages.forEach { implAddOpens?.invoke(module, it, ownerModule) } - } catch (_: Throwable) { - // ignore - } - } - - private class Parent { - - var first = false - - @Volatile - var second: Any? = null - } -} - -internal fun T.accessible(): T = - apply { UnsafeAccessing.assignAccessibility(this) } diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/Foundation.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/Foundation.kt deleted file mode 100644 index 193b29c7eb..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/Foundation.kt +++ /dev/null @@ -1,98 +0,0 @@ -package org.jetbrains.jewel.window.utils.macos - -import com.sun.jna.Function -import com.sun.jna.Library -import com.sun.jna.Native -import com.sun.jna.Pointer -import org.jetbrains.jewel.window.utils.JnaLoader -import java.lang.reflect.Proxy -import java.util.Arrays -import java.util.Collections -import java.util.logging.Level -import java.util.logging.Logger - -internal object Foundation { - - private val logger = Logger.getLogger(Foundation::class.java.simpleName) - - init { - if (!JnaLoader.isLoaded) { - logger.log(Level.WARNING, "JNA is not loaded") - } - } - - private val myFoundationLibrary: FoundationLibrary? by lazy { - try { - Native.load( - "Foundation", - FoundationLibrary::class.java, - Collections.singletonMap("jna.encoding", "UTF8"), - ) - } catch (_: Throwable) { - null - } - } - - private val myObjcMsgSend: Function? by lazy { - try { - (Proxy.getInvocationHandler(myFoundationLibrary) as Library.Handler).nativeLibrary.getFunction("objc_msgSend") - } catch (_: Throwable) { - null - } - } - - /** - * Get the ID of the NSClass with className - */ - fun getObjcClass(className: String?): ID? = myFoundationLibrary?.objc_getClass(className) - - fun getProtocol(name: String?): ID? = myFoundationLibrary?.objc_getProtocol(name) - - fun createSelector(s: String?): Pointer? = myFoundationLibrary?.sel_registerName(s) - - private fun prepInvoke(id: ID?, selector: Pointer?, args: Array): Array { - val invokArgs = arrayOfNulls(args.size + 2) - invokArgs[0] = id - invokArgs[1] = selector - System.arraycopy(args, 0, invokArgs, 2, args.size) - return invokArgs - } - - // objc_msgSend is called with the calling convention of the target method - // on x86_64 this does not make a difference, but arm64 uses a different calling convention for varargs - // it is therefore important to not call objc_msgSend as a vararg function - operator fun invoke(id: ID?, selector: Pointer?, vararg args: Any?): ID = - ID(myObjcMsgSend?.invokeLong(prepInvoke(id, selector, args)) ?: 0) - - /** - * Invokes the given vararg selector. - * Expects `NSArray arrayWithObjects:(id), ...` like signature, i.e. exactly one fixed argument, followed by varargs. - */ - fun invokeVarArg(id: ID?, selector: Pointer?, vararg args: Any?): ID { - // c functions and objc methods have at least 1 fixed argument, we therefore need to separate out the first argument - return myFoundationLibrary?.objc_msgSend( - id, - selector, - args[0], - *Arrays.copyOfRange(args, 1, args.size), - ) ?: ID.NIL - } - - operator fun invoke(cls: String?, selector: String?, vararg args: Any?): ID = - invoke(getObjcClass(cls), createSelector(selector), *args) - - fun invokeVarArg(cls: String?, selector: String?, vararg args: Any?): ID = - invokeVarArg(getObjcClass(cls), createSelector(selector), *args) - - fun safeInvoke(stringCls: String?, stringSelector: String?, vararg args: Any?): ID { - val cls = getObjcClass(stringCls) - val selector = createSelector(stringSelector) - if (!invoke(cls, "respondsToSelector:", selector).booleanValue()) { - error("Missing selector $stringSelector for $stringCls") - } - return invoke(cls, selector, *args) - } - - operator fun invoke(id: ID?, selector: String?, vararg args: Any?): ID = - invoke(id, createSelector(selector), *args) -} diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/FoundationLibrary.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/FoundationLibrary.kt deleted file mode 100644 index a4c93807e2..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/FoundationLibrary.kt +++ /dev/null @@ -1,89 +0,0 @@ -package org.jetbrains.jewel.window.utils.macos - -import com.sun.jna.Callback -import com.sun.jna.Library -import com.sun.jna.Pointer - -internal interface FoundationLibrary : Library { - fun NSLog(pString: Pointer?, thing: Any?) - fun NSFullUserName(): ID? - fun objc_allocateClassPair(supercls: ID?, name: String?, extraBytes: Int): ID? - fun objc_registerClassPair(cls: ID?) - fun CFStringCreateWithBytes( - allocator: Pointer?, - bytes: ByteArray?, - byteCount: Int, - encoding: Int, - isExternalRepresentation: Byte, - ): ID? - - fun CFStringGetCString(theString: ID?, buffer: ByteArray?, bufferSize: Int, encoding: Int): Byte - fun CFStringGetLength(theString: ID?): Int - fun CFStringConvertNSStringEncodingToEncoding(nsEncoding: Long): Long - fun CFStringConvertEncodingToIANACharSetName(cfEncoding: Long): ID? - fun CFStringConvertIANACharSetNameToEncoding(encodingName: ID?): Long - fun CFStringConvertEncodingToNSStringEncoding(cfEncoding: Long): Long - fun CFRetain(cfTypeRef: ID?) - fun CFRelease(cfTypeRef: ID?) - fun CFGetRetainCount(cfTypeRef: Pointer?): Int - fun objc_getClass(className: String?): ID? - fun objc_getProtocol(name: String?): ID? - fun class_createInstance(pClass: ID?, extraBytes: Int): ID? - fun sel_registerName(selectorName: String?): Pointer? - fun class_replaceMethod(cls: ID?, selName: Pointer?, impl: Callback?, types: String?): ID? - fun objc_getMetaClass(name: String?): ID? - - /** - * Note: Vararg version. Should only be used only for selectors with a single fixed argument followed by varargs. - */ - fun objc_msgSend(receiver: ID?, selector: Pointer?, firstArg: Any?, vararg args: Any?): ID? - fun class_respondsToSelector(cls: ID?, selName: Pointer?): Boolean - fun class_addMethod(cls: ID?, selName: Pointer?, imp: Callback?, types: String?): Boolean - fun class_addMethod(cls: ID?, selName: Pointer?, imp: ID?, types: String?): Boolean - fun class_addProtocol(aClass: ID?, protocol: ID?): Boolean - fun class_isMetaClass(cls: ID?): Boolean - fun NSStringFromSelector(selector: Pointer?): ID? - fun NSStringFromClass(aClass: ID?): ID? - fun objc_getClass(clazz: Pointer?): Pointer? - - companion object { - const val kCFStringEncodingMacRoman = 0 - const val kCFStringEncodingWindowsLatin1 = 0x0500 - const val kCFStringEncodingISOLatin1 = 0x0201 - const val kCFStringEncodingNextStepLatin = 0x0B01 - const val kCFStringEncodingASCII = 0x0600 - const val kCFStringEncodingUnicode = 0x0100 - const val kCFStringEncodingUTF8 = 0x08000100 - const val kCFStringEncodingNonLossyASCII = 0x0BFF - const val kCFStringEncodingUTF16 = 0x0100 - const val kCFStringEncodingUTF16BE = 0x10000100 - const val kCFStringEncodingUTF16LE = 0x14000100 - const val kCFStringEncodingUTF32 = 0x0c000100 - const val kCFStringEncodingUTF32BE = 0x18000100 - const val kCFStringEncodingUTF32LE = 0x1c000100 - - // https://developer.apple.com/library/mac/documentation/Carbon/Reference/CGWindow_Reference/Constants/Constants.html#//apple_ref/doc/constant_group/Window_List_Option_Constants - const val kCGWindowListOptionAll = 0 - const val kCGWindowListOptionOnScreenOnly = 1 - const val kCGWindowListOptionOnScreenAboveWindow = 2 - const val kCGWindowListOptionOnScreenBelowWindow = 4 - const val kCGWindowListOptionIncludingWindow = 8 - const val kCGWindowListExcludeDesktopElements = 16 - - // https://developer.apple.com/library/mac/documentation/Carbon/Reference/CGWindow_Reference/Constants/Constants.html#//apple_ref/doc/constant_group/Window_Image_Types - const val kCGWindowImageDefault = 0 - const val kCGWindowImageBoundsIgnoreFraming = 1 - const val kCGWindowImageShouldBeOpaque = 2 - const val kCGWindowImageOnlyShadows = 4 - const val kCGWindowImageBestResolution = 8 - const val kCGWindowImageNominalResolution = 16 - - // see enum NSBitmapImageFileType - const val NSBitmapImageFileTypeTIFF = 0 - const val NSBitmapImageFileTypeBMP = 1 - const val NSBitmapImageFileTypeGIF = 2 - const val NSBitmapImageFileTypeJPEG = 3 - const val NSBitmapImageFileTypePNG = 4 - const val NSBitmapImageFileTypeJPEG2000 = 5 - } -} diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/ID.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/ID.kt deleted file mode 100644 index df74e25e7f..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/ID.kt +++ /dev/null @@ -1,30 +0,0 @@ -package org.jetbrains.jewel.window.utils.macos - -import com.sun.jna.NativeLong - -/** - * Could be an address in memory (if pointer to a class or method) or a - * value (like 0 or 1) - */ -internal class ID : NativeLong { - - constructor() - constructor(peer: Long) : super(peer) - - fun booleanValue(): Boolean = toInt() != 0 - - override fun toByte(): Byte = toInt().toByte() - - override fun toChar(): Char = toInt().toChar() - - override fun toShort(): Short = toInt().toShort() - - @Suppress("RedundantOverride") // Without this, we get a SOE - override fun toInt(): Int = super.toInt() - - companion object { - - @JvmField - val NIL = ID(0L) - } -} diff --git a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/MacUtil.kt b/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/MacUtil.kt deleted file mode 100644 index 248cb170a1..0000000000 --- a/decorated-window/src/main/kotlin/org/jetbrains/jewel/window/utils/macos/MacUtil.kt +++ /dev/null @@ -1,95 +0,0 @@ -package org.jetbrains.jewel.window.utils.macos - -import org.jetbrains.jewel.window.utils.UnsafeAccessing -import org.jetbrains.jewel.window.utils.accessible -import java.awt.Component -import java.awt.Window -import java.lang.reflect.InvocationTargetException -import java.util.logging.Level -import java.util.logging.Logger -import javax.swing.SwingUtilities - -internal object MacUtil { - - private val logger = Logger.getLogger(MacUtil::class.java.simpleName) - - init { - try { - UnsafeAccessing.assignAccessibility( - UnsafeAccessing.desktopModule, - listOf("sun.awt", "sun.lwawt", "sun.lwawt.macosx"), - ) - } catch (@Suppress("TooGenericExceptionCaught") e: Exception) { - logger.log(Level.WARNING, "Assign access for jdk.desktop failed.", e) - } - } - - fun getWindowFromJavaWindow(w: Window?): ID { - if (w == null) { - return ID.NIL - } - try { - val cPlatformWindow = getPlatformWindow(w) - if (cPlatformWindow != null) { - val ptr = cPlatformWindow.javaClass.superclass.getDeclaredField("ptr") - ptr.setAccessible(true) - return ID(ptr.getLong(cPlatformWindow)) - } - } catch (e: IllegalAccessException) { - logger.log(Level.WARNING, "Fail to get cPlatformWindow from awt window.", e) - } catch (e: NoSuchFieldException) { - logger.log(Level.WARNING, "Fail to get cPlatformWindow from awt window.", e) - } - return ID.NIL - } - - fun getPlatformWindow(w: Window): Any? { - try { - val awtAccessor = Class.forName("sun.awt.AWTAccessor") - val componentAccessor = awtAccessor.getMethod("getComponentAccessor").invoke(null) - val getPeer = componentAccessor.javaClass.getMethod("getPeer", Component::class.java).accessible() - val peer = getPeer.invoke(componentAccessor, w) - if (peer != null) { - val cWindowPeerClass: Class<*> = peer.javaClass - val getPlatformWindowMethod = cWindowPeerClass.getDeclaredMethod("getPlatformWindow") - val cPlatformWindow = getPlatformWindowMethod.invoke(peer) - if (cPlatformWindow != null) { - return cPlatformWindow - } - } - } catch (e: NoSuchMethodException) { - logger.log(Level.WARNING, "Fail to get cPlatformWindow from awt window.", e) - } catch (e: IllegalAccessException) { - logger.log(Level.WARNING, "Fail to get cPlatformWindow from awt window.", e) - } catch (e: InvocationTargetException) { - logger.log(Level.WARNING, "Fail to get cPlatformWindow from awt window.", e) - } catch (e: ClassNotFoundException) { - logger.log(Level.WARNING, "Fail to get cPlatformWindow from awt window.", e) - } - return null - } - - fun updateColors(w: Window) { - SwingUtilities.invokeLater { - val window = getWindowFromJavaWindow(w) - val delegate = Foundation.invoke(window, "delegate") - if (Foundation.invoke(delegate, "respondsToSelector:", Foundation.createSelector("updateColors")) - .booleanValue() - ) { - Foundation.invoke(delegate, "updateColors") - } - } - } - - fun updateFullScreenButtons(w: Window) { - SwingUtilities.invokeLater { - val selector = Foundation.createSelector("updateFullScreenButtons") - val window = getWindowFromJavaWindow(w) - val delegate = Foundation.invoke(window, "delegate") - - if (Foundation.invoke(delegate, "respondsToSelector:", selector).booleanValue()) { - Foundation.invoke(delegate, "updateFullScreenButtons") - } - } - } -} diff --git a/gradle.properties b/gradle.properties index 2ce2eecdc4..1208c254b6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,4 +6,4 @@ kotlin.stdlib.default.dependency=false # See https://jb.gg/intellij-platform-kotlin-oom kotlin.incremental.useClasspathSnapshot=false -bridge.ijp.target=241 +bridge.ijp.target=232 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index aa0097a6a7..70c8909d16 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ composeDesktop = "1.6.0-dev1397" detekt = "1.23.4" dokka = "1.8.20" -idea = "241.9959.31-EAP-SNAPSHOT" +idea = "232.10227.8" ideaGradlePlugin = "1.17.0" jna = "5.14.0" kotlin = "1.8.21" diff --git a/ide-laf-bridge/api/ide-laf-bridge.api b/ide-laf-bridge/api/ide-laf-bridge.api index b0d51fad0a..e029402075 100644 --- a/ide-laf-bridge/api/ide-laf-bridge.api +++ b/ide-laf-bridge/api/ide-laf-bridge.api @@ -78,6 +78,10 @@ public final class org/jetbrains/jewel/bridge/TypographyKt { public static final fun small (Lorg/jetbrains/jewel/ui/component/Typography;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/text/TextStyle; } +public final class org/jetbrains/jewel/bridge/UiThemeExtensionsKt { + public static final fun getIcons (Lcom/intellij/ide/ui/UITheme;)Ljava/util/Map; +} + public final class org/jetbrains/jewel/bridge/actionSystem/ProvideDataKt { public static final fun ComponentDataProviderBridge (Ljavax/swing/JComponent;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V public static final fun provideData (Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;)Landroidx/compose/ui/Modifier; diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeIconData.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeIconData.kt index 69d1b2c759..fb6627088b 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeIconData.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeIconData.kt @@ -1,14 +1,16 @@ package org.jetbrains.jewel.bridge import com.intellij.ide.ui.UITheme +import com.intellij.ui.ColorUtil +import org.jetbrains.jewel.foundation.InternalJewelApi import org.jetbrains.jewel.foundation.theme.ThemeIconData -@Suppress("UnstableApiUsage") +@OptIn(InternalJewelApi::class) public fun ThemeIconData.Companion.readFromLaF(): ThemeIconData { val uiTheme = currentUiThemeOrNull() - val bean = uiTheme?.describe() - val iconMap = bean?.icons.orEmpty() - val selectedIconColorPalette = bean?.iconColorsOnSelection.orEmpty() + val iconMap = uiTheme?.icons.orEmpty() + val selectedIconColorPalette = uiTheme?.selectedIconColorPalette.orEmpty() + .mapValues { ColorUtil.fromHex(it.value).rgb } val colorPalette = UITheme.getColorPalette() return ThemeIconData(iconMap, colorPalette, selectedIconColorPalette) diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeOverride.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeOverride.kt index e6a9af4231..3651942891 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeOverride.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeOverride.kt @@ -1,7 +1,5 @@ package org.jetbrains.jewel.bridge -import com.intellij.openapi.diagnostic.Logger -import com.intellij.ui.icons.patchIconPath import com.intellij.util.ui.DirProvider import org.jetbrains.jewel.ui.painter.PainterPathHint import org.jetbrains.jewel.ui.painter.PainterProviderScope @@ -11,7 +9,14 @@ internal object BridgeOverride : PainterPathHint { private val dirProvider = DirProvider() - @Suppress("UnstableApiUsage") // patchIconPath() is explicitly open to us + private val patchIconPath by lazy { + val clazz = Class.forName("com.intellij.ui.icons.CachedImageIconKt") + val patchIconPath = + clazz.getMethod("patchIconPath", String::class.java, ClassLoader::class.java) + patchIconPath.isAccessible = true + patchIconPath + } + override fun PainterProviderScope.patch(): String { if (this !is ResourcePainterProviderScope) return path @@ -20,49 +25,17 @@ internal object BridgeOverride : PainterPathHint { // removed (the classloader is set up differently in prod IDEs and when running // from Gradle, and the icon could be in either place depending on the environment) val fallbackPath = path.removePrefix(dirProvider.dir()) - - for (classLoader in classLoaders) { - val patchedPath = patchIconPath(path.removePrefix("/"), classLoader)?.first - ?: patchIconPath(fallbackPath, classLoader)?.first - - // 233 EAP 4 broke path patching horribly; now it can return a - // "reflective path", which is a FQN to an ExpUIIcons entry. - // As a (hopefully) temporary solution, we undo this transformation - // back into the original path. - if (patchedPath?.startsWith("com.intellij.icons.ExpUiIcons") == true) { - return inferActualPathFromReflectivePath(patchedPath) - } - - if (patchedPath != null) { - return patchedPath - } - } - return path - } - - private fun inferActualPathFromReflectivePath(patchedPath: String): String { - val iconPath = patchedPath.removePrefix("com.intellij.icons.ExpUiIcons.") - - return buildString { - append("expui/") - iconPath.split('.') - .map { it.trim() } - .filter { it.isNotEmpty() } - .forEach { - append(it.first().lowercaseChar()) - append(it.drop(1)) - append('/') + val patchedPath = + classLoaders + .firstNotNullOfOrNull { classLoader -> + val patchedPathAndClassLoader = + patchIconPath.invoke(null, path.removePrefix("/"), classLoader) + ?: patchIconPath.invoke(null, fallbackPath, classLoader) + patchedPathAndClassLoader as? Pair<*, *> } - replace(length - 1, length, "") // Drop last '/' - if (iconPath.contains("_dark")) append("_dark") - append(".svg") + ?.first as? String - Logger.getInstance("IconsPathPatching") - .warn( - "IntelliJ returned a reflective path: $patchedPath for $iconPath." + - " We reverted that to a plausible-looking resource path: ${toString()}", - ) - } + return patchedPath ?: path } override fun toString(): String = "BridgeOverride" diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgePainterHintsProvider.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgePainterHintsProvider.kt index 839a666573..6f600491c7 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgePainterHintsProvider.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgePainterHintsProvider.kt @@ -10,11 +10,12 @@ import org.jetbrains.jewel.ui.painter.BasePainterHintsProvider import org.jetbrains.jewel.ui.painter.PainterHint import org.jetbrains.jewel.ui.painter.hints.Dark import org.jetbrains.jewel.ui.painter.hints.HiDpi +import org.jetbrains.jewel.ui.util.fromRGBAHexStringOrNull @InternalJewelApi public class BridgePainterHintsProvider private constructor( isDark: Boolean, - intellijIconPalette: Map = emptyMap(), + intellijIconPalette: Map = emptyMap(), themeIconPalette: Map = emptyMap(), themeColorPalette: Map = emptyMap(), ) : BasePainterHintsProvider(isDark, intellijIconPalette, themeIconPalette, themeColorPalette) { @@ -31,21 +32,20 @@ public class BridgePainterHintsProvider private constructor( private val logger = thisLogger() - @Suppress("UnstableApiUsage") // We need to call @Internal APIs public operator fun invoke(isDark: Boolean): BasePainterHintsProvider { val uiTheme = currentUiThemeOrNull() ?: return BridgePainterHintsProvider(isDark) logger.info("Parsing theme info from theme ${uiTheme.name} (id: ${uiTheme.id}, isDark: ${uiTheme.isDark})") - val bean = uiTheme.describe() - val iconColorPalette = - (bean.colorPalette as Map).mapValues { - when (val value = it.value) { - is String -> value + val iconColorPalette = uiTheme.iconColorPalette + val keyPalette = UITheme.getColorPalette() + val themeColors = uiTheme.colors.orEmpty() + .mapValues { (_, v) -> + when (v) { + is Int -> Color(v) + is String -> Color.fromRGBAHexStringOrNull(v) else -> null } } - val keyPalette = UITheme.getColorPalette() - val themeColors = bean.colors.mapValues { (_, v) -> Color(v) } return BridgePainterHintsProvider(isDark, keyPalette, iconColorPalette, themeColors) } diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/UiThemeExtensions.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/UiThemeExtensions.kt index 81a6cd6da6..c4a75d91af 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/UiThemeExtensions.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/UiThemeExtensions.kt @@ -1,8 +1,45 @@ package org.jetbrains.jewel.bridge import com.intellij.ide.ui.LafManager -import com.intellij.ide.ui.laf.UIThemeLookAndFeelInfo +import com.intellij.ide.ui.UITheme +import com.intellij.ide.ui.laf.UIThemeBasedLookAndFeelInfo +import com.intellij.openapi.diagnostic.Logger +import org.jetbrains.jewel.foundation.InternalJewelApi +import java.lang.reflect.Field -@Suppress("UnstableApiUsage") -internal fun currentUiThemeOrNull(): UIThemeLookAndFeelInfo? = - LafManager.getInstance().currentUIThemeLookAndFeel?.takeIf { it.isInitialized } +private val logger = Logger.getInstance("UiThemeExtensions") + +private val classUITheme + get() = UITheme::class.java + +@InternalJewelApi +internal fun currentUiThemeOrNull() = + (LafManager.getInstance().currentLookAndFeel as? UIThemeBasedLookAndFeelInfo)?.theme + +@InternalJewelApi +public val UITheme.icons: Map + get() = readMapField(classUITheme.getDeclaredField("icons")) + .filterKeys { it != "ColorPalette" } + +internal val UITheme.iconColorPalette: Map + get() = readMapField>(classUITheme.getDeclaredField("icons"))["ColorPalette"] + .orEmpty() + +internal val UITheme.selectedIconColorPalette: Map + get() = readMapField(classUITheme.getDeclaredField("iconColorsOnSelection")) + +private fun UITheme.readMapField(field: Field): Map { + @Suppress("DEPRECATION") // We don't have an alternative API to use + val wasAccessible = field.isAccessible + field.isAccessible = true + + return try { + @Suppress("UNCHECKED_CAST") + (field.get(this) as? Map).orEmpty() + } catch (e: IllegalAccessException) { + logger.warn("Error while retrieving LaF", e) + emptyMap() + } finally { + field.isAccessible = wasAccessible + } +} diff --git a/int-ui/int-ui-decorated-window/api/int-ui-decorated-window.api b/int-ui/int-ui-decorated-window/api/int-ui-decorated-window.api deleted file mode 100644 index ba13fd97f4..0000000000 --- a/int-ui/int-ui-decorated-window/api/int-ui-decorated-window.api +++ /dev/null @@ -1,35 +0,0 @@ -public final class org/jetbrains/jewel/intui/window/IntUiDecoratedWindowResourceResolverKt { - public static final fun decoratedWindowPainterProvider (Ljava/lang/String;)Lorg/jetbrains/jewel/ui/painter/ResourcePainterProvider; -} - -public final class org/jetbrains/jewel/intui/window/IntUiThemeKt { - public static final fun decoratedWindow (Lorg/jetbrains/jewel/ui/ComponentStyling;Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle;Lorg/jetbrains/jewel/window/styling/TitleBarStyle;)Lorg/jetbrains/jewel/ui/ComponentStyling; - public static synthetic fun decoratedWindow$default (Lorg/jetbrains/jewel/ui/ComponentStyling;Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle;Lorg/jetbrains/jewel/window/styling/TitleBarStyle;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/ComponentStyling; -} - -public final class org/jetbrains/jewel/intui/window/styling/IntUiDecoratedWindowStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle$Companion;Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors;Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics;)Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle; - public static synthetic fun dark$default (Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle$Companion;Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors;Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics;ILjava/lang/Object;)Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle; - public static final fun dark-WkMS-hQ (Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors$Companion;JJ)Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors; - public static synthetic fun dark-WkMS-hQ$default (Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors$Companion;JJILjava/lang/Object;)Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors; - public static final fun defaults-3ABfNKs (Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics$Companion;F)Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics; - public static synthetic fun defaults-3ABfNKs$default (Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics$Companion;FILjava/lang/Object;)Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics; - public static final fun light (Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle$Companion;Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors;Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics;)Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle; - public static synthetic fun light$default (Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle$Companion;Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors;Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics;ILjava/lang/Object;)Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle; - public static final fun light-WkMS-hQ (Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors$Companion;JJ)Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors; - public static synthetic fun light-WkMS-hQ$default (Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors$Companion;JJILjava/lang/Object;)Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors; -} - -public final class org/jetbrains/jewel/intui/window/styling/IntUiTitleBarStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/window/styling/TitleBarStyle$Companion;Lorg/jetbrains/jewel/window/styling/TitleBarColors;Lorg/jetbrains/jewel/window/styling/TitleBarMetrics;Lorg/jetbrains/jewel/window/styling/TitleBarIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/window/styling/TitleBarStyle; - public static final fun dark-a6iJyiw (Lorg/jetbrains/jewel/window/styling/TitleBarColors$Companion;JJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/window/styling/TitleBarColors; - public static final fun defaults (Lorg/jetbrains/jewel/window/styling/TitleBarIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)Lorg/jetbrains/jewel/window/styling/TitleBarIcons; - public static synthetic fun defaults$default (Lorg/jetbrains/jewel/window/styling/TitleBarIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;ILjava/lang/Object;)Lorg/jetbrains/jewel/window/styling/TitleBarIcons; - public static final fun defaults-LgNEgRQ (Lorg/jetbrains/jewel/window/styling/TitleBarMetrics$Companion;FFFJ)Lorg/jetbrains/jewel/window/styling/TitleBarMetrics; - public static synthetic fun defaults-LgNEgRQ$default (Lorg/jetbrains/jewel/window/styling/TitleBarMetrics$Companion;FFFJILjava/lang/Object;)Lorg/jetbrains/jewel/window/styling/TitleBarMetrics; - public static final fun light (Lorg/jetbrains/jewel/window/styling/TitleBarStyle$Companion;Lorg/jetbrains/jewel/window/styling/TitleBarColors;Lorg/jetbrains/jewel/window/styling/TitleBarMetrics;Lorg/jetbrains/jewel/window/styling/TitleBarIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/window/styling/TitleBarStyle; - public static final fun light-a6iJyiw (Lorg/jetbrains/jewel/window/styling/TitleBarColors$Companion;JJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/window/styling/TitleBarColors; - public static final fun lightWithLightHeader (Lorg/jetbrains/jewel/window/styling/TitleBarStyle$Companion;Lorg/jetbrains/jewel/window/styling/TitleBarColors;Lorg/jetbrains/jewel/window/styling/TitleBarMetrics;Lorg/jetbrains/jewel/window/styling/TitleBarIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/window/styling/TitleBarStyle; - public static final fun lightWithLightHeader-a6iJyiw (Lorg/jetbrains/jewel/window/styling/TitleBarColors$Companion;JJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/window/styling/TitleBarColors; -} - diff --git a/int-ui/int-ui-decorated-window/build.gradle.kts b/int-ui/int-ui-decorated-window/build.gradle.kts deleted file mode 100644 index 0cca652add..0000000000 --- a/int-ui/int-ui-decorated-window/build.gradle.kts +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - jewel - `jewel-publish` - `jewel-check-public-api` - alias(libs.plugins.composeDesktop) -} - -dependencies { - api(projects.decoratedWindow) - api(projects.intUi.intUiStandalone) -} diff --git a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiDecoratedWindowResourceResolver.kt b/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiDecoratedWindowResourceResolver.kt deleted file mode 100644 index 359dd64c5a..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiDecoratedWindowResourceResolver.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.jetbrains.jewel.intui.window - -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.ui.painter.ResourcePainterProvider -import org.jetbrains.jewel.window.styling.DecoratedWindowStyle - -/** - * Create a [PainterProvider][org.jetbrains.jewel.painter.PainterProvider] - * for loading a decorated window module resource. - */ -public fun decoratedWindowPainterProvider(path: String): ResourcePainterProvider = - ResourcePainterProvider(path, DecoratedWindowStyle::class.java.classLoader, JewelTheme::class.java.classLoader) diff --git a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiTheme.kt b/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiTheme.kt deleted file mode 100644 index 857983f390..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiTheme.kt +++ /dev/null @@ -1,28 +0,0 @@ -package org.jetbrains.jewel.intui.window - -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.intui.window.styling.dark -import org.jetbrains.jewel.intui.window.styling.light -import org.jetbrains.jewel.ui.ComponentStyling -import org.jetbrains.jewel.window.styling.DecoratedWindowStyle -import org.jetbrains.jewel.window.styling.LocalDecoratedWindowStyle -import org.jetbrains.jewel.window.styling.LocalTitleBarStyle -import org.jetbrains.jewel.window.styling.TitleBarStyle - -public fun ComponentStyling.decoratedWindow( - windowStyle: DecoratedWindowStyle? = null, - titleBarStyle: TitleBarStyle? = null, -): ComponentStyling = - provide { - val isDark = JewelTheme.isDark - - val currentWindowStyle = windowStyle - ?: if (isDark) DecoratedWindowStyle.dark() else DecoratedWindowStyle.light() - val currentTitleBarStyle = titleBarStyle - ?: if (isDark) TitleBarStyle.dark() else TitleBarStyle.light() - - arrayOf( - LocalDecoratedWindowStyle provides currentWindowStyle, - LocalTitleBarStyle provides currentTitleBarStyle, - ) - } diff --git a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/styling/IntUiDecoratedWindowStyling.kt b/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/styling/IntUiDecoratedWindowStyling.kt deleted file mode 100644 index 50d573eae8..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/styling/IntUiDecoratedWindowStyling.kt +++ /dev/null @@ -1,34 +0,0 @@ -package org.jetbrains.jewel.intui.window.styling - -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.window.styling.DecoratedWindowColors -import org.jetbrains.jewel.window.styling.DecoratedWindowMetrics -import org.jetbrains.jewel.window.styling.DecoratedWindowStyle - -public fun DecoratedWindowStyle.Companion.light( - colors: DecoratedWindowColors = DecoratedWindowColors.light(), - metrics: DecoratedWindowMetrics = DecoratedWindowMetrics.defaults(), -): DecoratedWindowStyle = DecoratedWindowStyle(colors, metrics) - -public fun DecoratedWindowStyle.Companion.dark( - colors: DecoratedWindowColors = DecoratedWindowColors.dark(), - metrics: DecoratedWindowMetrics = DecoratedWindowMetrics.defaults(), -): DecoratedWindowStyle = DecoratedWindowStyle(colors, metrics) - -public fun DecoratedWindowColors.Companion.light( - // from Window.undecorated.border - borderColor: Color = Color(0xFF5A5D6B), - inactiveBorderColor: Color = borderColor, -): DecoratedWindowColors = DecoratedWindowColors(borderColor, inactiveBorderColor) - -public fun DecoratedWindowColors.Companion.dark( - // from Window.undecorated.border - borderColor: Color = Color(0xFF5A5D63), - inactiveBorderColor: Color = borderColor, -): DecoratedWindowColors = DecoratedWindowColors(borderColor, inactiveBorderColor) - -public fun DecoratedWindowMetrics.Companion.defaults( - borderWidth: Dp = 1.dp, -): DecoratedWindowMetrics = DecoratedWindowMetrics(borderWidth) diff --git a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/styling/IntUiTitleBarStyling.kt b/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/styling/IntUiTitleBarStyling.kt deleted file mode 100644 index 40befb1a16..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/styling/IntUiTitleBarStyling.kt +++ /dev/null @@ -1,312 +0,0 @@ -package org.jetbrains.jewel.intui.window.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.styling.Undecorated -import org.jetbrains.jewel.intui.standalone.styling.defaults -import org.jetbrains.jewel.intui.standalone.styling.light -import org.jetbrains.jewel.intui.standalone.styling.undecorated -import org.jetbrains.jewel.intui.window.decoratedWindowPainterProvider -import org.jetbrains.jewel.ui.component.styling.DropdownColors -import org.jetbrains.jewel.ui.component.styling.DropdownMetrics -import org.jetbrains.jewel.ui.component.styling.DropdownStyle -import org.jetbrains.jewel.ui.component.styling.IconButtonColors -import org.jetbrains.jewel.ui.component.styling.IconButtonMetrics -import org.jetbrains.jewel.ui.component.styling.IconButtonStyle -import org.jetbrains.jewel.ui.component.styling.MenuStyle -import org.jetbrains.jewel.ui.painter.PainterProvider -import org.jetbrains.jewel.window.styling.TitleBarColors -import org.jetbrains.jewel.window.styling.TitleBarIcons -import org.jetbrains.jewel.window.styling.TitleBarMetrics -import org.jetbrains.jewel.window.styling.TitleBarStyle - -@Composable -public fun TitleBarStyle.Companion.light( - colors: TitleBarColors = TitleBarColors.light(), - metrics: TitleBarMetrics = TitleBarMetrics.defaults(), - icons: TitleBarIcons = TitleBarIcons.defaults(), -): TitleBarStyle = - TitleBarStyle( - colors = colors, - metrics = metrics, - icons = icons, - dropdownStyle = DropdownStyle.Undecorated.dark( - colors = DropdownColors.Undecorated.dark( - content = colors.content, - contentFocused = colors.content, - contentHovered = colors.content, - contentPressed = colors.content, - contentDisabled = colors.content, - backgroundHovered = colors.dropdownHoveredBackground, - backgroundPressed = colors.dropdownPressedBackground, - ), - metrics = DropdownMetrics.undecorated( - arrowMinSize = DpSize(20.dp, 24.dp), - minSize = DpSize(60.dp, 30.dp), - cornerSize = CornerSize(6.dp), - contentPadding = PaddingValues(start = 10.dp, end = 0.dp, top = 3.dp, bottom = 3.dp), - ), - menuStyle = MenuStyle.light(), - ), - iconButtonStyle = titleBarIconButtonStyle( - colors.iconButtonHoveredBackground, - colors.iconButtonPressedBackground, - IconButtonMetrics.defaults(borderWidth = 0.dp), - ), - paneButtonStyle = titleBarIconButtonStyle( - colors.titlePaneButtonHoveredBackground, - colors.titlePaneButtonPressedBackground, - IconButtonMetrics.defaults(cornerSize = CornerSize(0.dp), borderWidth = 0.dp), - ), - paneCloseButtonStyle = titleBarIconButtonStyle( - colors.titlePaneCloseButtonHoveredBackground, - colors.titlePaneCloseButtonPressedBackground, - IconButtonMetrics.defaults(cornerSize = CornerSize(0.dp), borderWidth = 0.dp), - ), - ) - -@Composable -public fun TitleBarStyle.Companion.lightWithLightHeader( - colors: TitleBarColors = TitleBarColors.lightWithLightHeader(), - metrics: TitleBarMetrics = TitleBarMetrics.defaults(), - icons: TitleBarIcons = TitleBarIcons.defaults(), -): TitleBarStyle = - TitleBarStyle( - colors = colors, - metrics = metrics, - icons = icons, - dropdownStyle = DropdownStyle.Undecorated.light( - colors = DropdownColors.Undecorated.light( - content = colors.content, - contentFocused = colors.content, - contentHovered = colors.content, - contentPressed = colors.content, - contentDisabled = colors.content, - backgroundHovered = colors.dropdownHoveredBackground, - backgroundPressed = colors.dropdownPressedBackground, - ), - metrics = DropdownMetrics.undecorated( - arrowMinSize = DpSize(20.dp, 24.dp), - minSize = DpSize(60.dp, 30.dp), - cornerSize = CornerSize(6.dp), - contentPadding = PaddingValues(start = 10.dp, end = 0.dp, top = 3.dp, bottom = 3.dp), - ), - ), - iconButtonStyle = titleBarIconButtonStyle( - colors.iconButtonHoveredBackground, - colors.iconButtonPressedBackground, - IconButtonMetrics.defaults(borderWidth = 0.dp), - ), - paneButtonStyle = titleBarIconButtonStyle( - colors.titlePaneButtonHoveredBackground, - colors.titlePaneButtonPressedBackground, - IconButtonMetrics.defaults(cornerSize = CornerSize(0.dp), borderWidth = 0.dp), - ), - paneCloseButtonStyle = titleBarIconButtonStyle( - colors.titlePaneCloseButtonHoveredBackground, - colors.titlePaneCloseButtonPressedBackground, - IconButtonMetrics.defaults(cornerSize = CornerSize(0.dp), borderWidth = 0.dp), - ), - ) - -@Composable -public fun TitleBarStyle.Companion.dark( - colors: TitleBarColors = TitleBarColors.dark(), - metrics: TitleBarMetrics = TitleBarMetrics.defaults(), - icons: TitleBarIcons = TitleBarIcons.defaults(), -): TitleBarStyle = - TitleBarStyle( - colors = colors, - metrics = metrics, - icons = icons, - dropdownStyle = DropdownStyle.Undecorated.dark( - colors = DropdownColors.Undecorated.dark( - content = colors.content, - contentFocused = colors.content, - contentHovered = colors.content, - contentPressed = colors.content, - contentDisabled = colors.content, - backgroundHovered = colors.dropdownHoveredBackground, - backgroundPressed = colors.dropdownPressedBackground, - ), - metrics = DropdownMetrics.undecorated( - arrowMinSize = DpSize(20.dp, 24.dp), - minSize = DpSize(60.dp, 30.dp), - cornerSize = CornerSize(6.dp), - contentPadding = PaddingValues(start = 10.dp, end = 0.dp, top = 3.dp, bottom = 3.dp), - ), - ), - iconButtonStyle = titleBarIconButtonStyle( - colors.iconButtonHoveredBackground, - colors.iconButtonPressedBackground, - IconButtonMetrics.defaults(borderWidth = 0.dp), - ), - paneButtonStyle = titleBarIconButtonStyle( - colors.titlePaneButtonHoveredBackground, - colors.titlePaneButtonPressedBackground, - IconButtonMetrics.defaults(cornerSize = CornerSize(0.dp), borderWidth = 0.dp), - ), - paneCloseButtonStyle = titleBarIconButtonStyle( - colors.titlePaneCloseButtonHoveredBackground, - colors.titlePaneCloseButtonPressedBackground, - IconButtonMetrics.defaults(cornerSize = CornerSize(0.dp), borderWidth = 0.dp), - ), - ) - -private fun titleBarIconButtonStyle( - hoveredBackground: Color, - pressedBackground: Color, - metrics: IconButtonMetrics, -) = - IconButtonStyle( - IconButtonColors( - foregroundSelectedActivated = Color.Unspecified, - background = Color.Unspecified, - backgroundDisabled = Color.Unspecified, - backgroundSelected = Color.Unspecified, - backgroundSelectedActivated = Color.Unspecified, - backgroundFocused = Color.Unspecified, - backgroundPressed = hoveredBackground, - backgroundHovered = pressedBackground, - border = Color.Unspecified, - borderDisabled = Color.Unspecified, - borderSelected = Color.Unspecified, - borderSelectedActivated = Color.Unspecified, - borderFocused = hoveredBackground, - borderPressed = pressedBackground, - borderHovered = Color.Unspecified, - ), - metrics, - ) - -@Composable -public fun TitleBarColors.Companion.light( - backgroundColor: Color = IntUiLightTheme.colors.grey(2), - inactiveBackground: Color = IntUiLightTheme.colors.grey(3), - contentColor: Color = IntUiLightTheme.colors.grey(12), - borderColor: Color = IntUiLightTheme.colors.grey(4), - fullscreenControlButtonsBackground: Color = Color(0xFF7A7B80), - // Color hex from - // com.intellij.util.ui.JBUI.CurrentTheme.CustomFrameDecorations.titlePaneButtonHoveredBackground - titlePaneButtonHoveredBackground: Color = Color(0x1AFFFFFF), - // Same as - // com.intellij.util.ui.JBUI.CurrentTheme.CustomFrameDecorations.titlePaneButtonPressedBackground - titlePaneButtonPressedBackground: Color = titlePaneButtonHoveredBackground, - // Color hex from - // com.intellij.openapi.wm.impl.customFrameDecorations.CustomFrameTitleButtons.closeStyleBuilder - titlePaneCloseButtonHoveredBackground: Color = Color(0xFFE81123), - titlePaneCloseButtonPressedBackground: Color = Color(0xFFF1707A), - iconButtonHoveredBackground: Color = IntUiLightTheme.colors.grey(3), - iconButtonPressedBackground: Color = IntUiLightTheme.colors.grey(3), - - // There are two fields in theme.json: transparentHoveredBackground and hoveredBackground, - // but in com.intellij.ide.ui.laf.darcula.ui.ToolbarComboWidgetUI#paintBackground, - // transparentHoveredBackground is used first, which is guessed to be due to the gradient - // background - // caused by the project color of the titlebar, which makes the pure color background look strange - // in the area. In order to simplify the use in Jewel, here directly use - // transparentHoveredBackground - // as hoveredBackground. - dropdownHoveredBackground: Color = Color(0x1AFFFFFF), - dropdownPressedBackground: Color = dropdownHoveredBackground, -): TitleBarColors = - TitleBarColors( - background = backgroundColor, - inactiveBackground = inactiveBackground, - content = contentColor, - border = borderColor, - fullscreenControlButtonsBackground = fullscreenControlButtonsBackground, - titlePaneButtonHoveredBackground = titlePaneButtonHoveredBackground, - titlePaneButtonPressedBackground = titlePaneButtonPressedBackground, - titlePaneCloseButtonHoveredBackground = titlePaneCloseButtonHoveredBackground, - titlePaneCloseButtonPressedBackground = titlePaneCloseButtonPressedBackground, - iconButtonHoveredBackground = iconButtonHoveredBackground, - iconButtonPressedBackground = iconButtonPressedBackground, - dropdownHoveredBackground = dropdownHoveredBackground, - dropdownPressedBackground = dropdownPressedBackground, - ) - -@Composable -public fun TitleBarColors.Companion.lightWithLightHeader( - backgroundColor: Color = IntUiLightTheme.colors.grey(13), - inactiveBackground: Color = IntUiLightTheme.colors.grey(12), - fullscreenControlButtonsBackground: Color = Color(0xFF7A7B80), - contentColor: Color = IntUiLightTheme.colors.grey(1), - borderColor: Color = IntUiLightTheme.colors.grey(11), - titlePaneButtonHoveredBackground: Color = Color(0x1A000000), - titlePaneButtonPressedBackground: Color = titlePaneButtonHoveredBackground, - titlePaneCloseButtonHoveredBackground: Color = Color(0xFFE81123), - titlePaneCloseButtonPressedBackground: Color = Color(0xFFF1707A), - iconButtonHoveredBackground: Color = IntUiLightTheme.colors.grey(12), - iconButtonPressedBackground: Color = IntUiLightTheme.colors.grey(11), - dropdownHoveredBackground: Color = Color(0x0D000000), - dropdownPressedBackground: Color = dropdownHoveredBackground, -): TitleBarColors = - TitleBarColors( - background = backgroundColor, - inactiveBackground = inactiveBackground, - content = contentColor, - border = borderColor, - fullscreenControlButtonsBackground = fullscreenControlButtonsBackground, - titlePaneButtonHoveredBackground = titlePaneButtonHoveredBackground, - titlePaneButtonPressedBackground = titlePaneButtonPressedBackground, - titlePaneCloseButtonHoveredBackground = titlePaneCloseButtonHoveredBackground, - titlePaneCloseButtonPressedBackground = titlePaneCloseButtonPressedBackground, - iconButtonHoveredBackground = iconButtonHoveredBackground, - iconButtonPressedBackground = iconButtonPressedBackground, - dropdownHoveredBackground = dropdownHoveredBackground, - dropdownPressedBackground = dropdownPressedBackground, - ) - -@Composable -public fun TitleBarColors.Companion.dark( - backgroundColor: Color = IntUiDarkTheme.colors.grey(2), - inactiveBackground: Color = IntUiDarkTheme.colors.grey(3), - fullscreenControlButtonsBackground: Color = Color(0xFF575A5C), - contentColor: Color = IntUiDarkTheme.colors.grey(12), - borderColor: Color = IntUiDarkTheme.colors.grey(4), - titlePaneButtonHoveredBackground: Color = Color(0x1AFFFFFF), - titlePaneButtonPressedBackground: Color = titlePaneButtonHoveredBackground, - titlePaneCloseButtonHoveredBackground: Color = Color(0xFFE81123), - titlePaneCloseButtonPressedBackground: Color = Color(0xFFF1707A), - iconButtonHoveredBackground: Color = IntUiLightTheme.colors.grey(3), - iconButtonPressedBackground: Color = IntUiLightTheme.colors.grey(3), - dropdownHoveredBackground: Color = Color(0x1AFFFFFF), - dropdownPressedBackground: Color = dropdownHoveredBackground, -): TitleBarColors = - TitleBarColors( - background = backgroundColor, - inactiveBackground = inactiveBackground, - content = contentColor, - border = borderColor, - fullscreenControlButtonsBackground = fullscreenControlButtonsBackground, - titlePaneButtonHoveredBackground = titlePaneButtonHoveredBackground, - titlePaneButtonPressedBackground = titlePaneButtonPressedBackground, - titlePaneCloseButtonHoveredBackground = titlePaneCloseButtonHoveredBackground, - titlePaneCloseButtonPressedBackground = titlePaneCloseButtonPressedBackground, - iconButtonHoveredBackground = iconButtonHoveredBackground, - iconButtonPressedBackground = iconButtonPressedBackground, - dropdownHoveredBackground = dropdownHoveredBackground, - dropdownPressedBackground = dropdownPressedBackground, - ) - -public fun TitleBarMetrics.Companion.defaults( - height: Dp = 40.dp, - gradientStartX: Dp = (-100).dp, - gradientEndX: Dp = 400.dp, - titlePaneButtonSize: DpSize = DpSize(40.dp, 40.dp), -): TitleBarMetrics = TitleBarMetrics(height, gradientStartX, gradientEndX, titlePaneButtonSize) - -public fun TitleBarIcons.Companion.defaults( - minimizeButton: PainterProvider = decoratedWindowPainterProvider("icons/intui/window/minimize.svg"), - maximizeButton: PainterProvider = decoratedWindowPainterProvider("icons/intui/window/maximize.svg"), - restoreButton: PainterProvider = decoratedWindowPainterProvider("icons/intui/window/restore.svg"), - closeButton: PainterProvider = decoratedWindowPainterProvider("icons/intui/window/close.svg"), -): TitleBarIcons = TitleBarIcons(minimizeButton, maximizeButton, restoreButton, closeButton) diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/close.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/close.svg deleted file mode 100644 index 2adb4e8b3d..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/close.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/closeActive.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/closeActive.svg deleted file mode 100644 index 6c7926cc01..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/closeActive.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/closeInactive.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/closeInactive.svg deleted file mode 100644 index 3bc3d9e287..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/closeInactive.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/closeInactive_dark.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/closeInactive_dark.svg deleted file mode 100644 index b0b0e27355..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/closeInactive_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/close_dark.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/close_dark.svg deleted file mode 100644 index 9169e84637..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/close_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximize.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximize.svg deleted file mode 100644 index 4a83737f3d..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximize.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximizeInactive.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximizeInactive.svg deleted file mode 100644 index 745855833a..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximizeInactive.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximizeInactive_dark.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximizeInactive_dark.svg deleted file mode 100644 index b26d5f8846..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximizeInactive_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximize_dark.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximize_dark.svg deleted file mode 100644 index e23d4d81e1..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/maximize_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimize.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimize.svg deleted file mode 100644 index 5af691fd2f..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimize.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimizeInactive.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimizeInactive.svg deleted file mode 100644 index 0b17cb03a2..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimizeInactive.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimizeInactive_dark.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimizeInactive_dark.svg deleted file mode 100644 index b5a7f43958..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimizeInactive_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimize_dark.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimize_dark.svg deleted file mode 100644 index ff69b584ad..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/minimize_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restore.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restore.svg deleted file mode 100644 index e0cda0a73c..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restore.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restoreInactive.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restoreInactive.svg deleted file mode 100644 index ba2ec938fe..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restoreInactive.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restoreInactive_dark.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restoreInactive_dark.svg deleted file mode 100644 index 991ae13ec6..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restoreInactive_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restore_dark.svg b/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restore_dark.svg deleted file mode 100644 index 9216cfaf09..0000000000 --- a/int-ui/int-ui-decorated-window/src/main/resources/icons/intui/window/restore_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-standalone/api/int-ui-standalone.api b/int-ui/int-ui-standalone/api/int-ui-standalone.api deleted file mode 100644 index 66183c5b5a..0000000000 --- a/int-ui/int-ui-standalone/api/int-ui-standalone.api +++ /dev/null @@ -1,343 +0,0 @@ -public final class org/jetbrains/jewel/intui/core/theme/IntUiDarkTheme : org/jetbrains/jewel/foundation/theme/ThemeDescriptor { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/core/theme/IntUiDarkTheme; - public fun getColors ()Lorg/jetbrains/jewel/foundation/theme/ThemeColorPalette; - public fun getIconData ()Lorg/jetbrains/jewel/foundation/theme/ThemeIconData; - public fun getName ()Ljava/lang/String; - public fun isDark ()Z -} - -public final class org/jetbrains/jewel/intui/core/theme/IntUiLightTheme : org/jetbrains/jewel/foundation/theme/ThemeDescriptor { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/core/theme/IntUiLightTheme; - public fun getColors ()Lorg/jetbrains/jewel/foundation/theme/ThemeColorPalette; - public fun getIconData ()Lorg/jetbrains/jewel/foundation/theme/ThemeIconData; - public fun getName ()Ljava/lang/String; - public fun isDark ()Z -} - -public final class org/jetbrains/jewel/intui/standalone/InterFontKt { - public static final fun getInter (Landroidx/compose/ui/text/font/FontFamily$Companion;)Landroidx/compose/ui/text/font/FontFamily; -} - -public final class org/jetbrains/jewel/intui/standalone/PainterProviderKt { - public static final fun standalonePainterProvider (Ljava/lang/String;)Lorg/jetbrains/jewel/ui/painter/ResourcePainterProvider; -} - -public final class org/jetbrains/jewel/intui/standalone/StandalonePainterHintsProvider : org/jetbrains/jewel/ui/painter/BasePainterHintsProvider { - public static final field $stable I - public static final field Companion Lorg/jetbrains/jewel/intui/standalone/StandalonePainterHintsProvider$Companion; - public fun (Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;)V - public fun hints (Ljava/lang/String;Landroidx/compose/runtime/Composer;I)Ljava/util/List; -} - -public final class org/jetbrains/jewel/intui/standalone/StandalonePainterHintsProvider$Companion { -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiButtonStylingKt { - public static final fun default-H1KY9o8 (Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;JF)Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics; - public static synthetic fun default-H1KY9o8$default (Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;JFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics; - public static final fun getDefault (Lorg/jetbrains/jewel/ui/component/styling/ButtonColors$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultButtonColorFactory; - public static final fun getDefault (Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultButtonStyleFactory; - public static final fun getOutlined (Lorg/jetbrains/jewel/ui/component/styling/ButtonColors$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiOutlinedButtonColorFactory; - public static final fun getOutlined (Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiOutlinedButtonStyleFactory; - public static final fun outlined-H1KY9o8 (Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;JF)Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics; - public static synthetic fun outlined-H1KY9o8$default (Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;JFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiCheckboxStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/CheckboxIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/CheckboxIcons; - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/CheckboxColors;Lorg/jetbrains/jewel/ui/component/styling/CheckboxMetrics;Lorg/jetbrains/jewel/ui/component/styling/CheckboxIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle; - public static final fun dark-GyCwops (Lorg/jetbrains/jewel/ui/component/styling/CheckboxColors$Companion;JJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/CheckboxColors; - public static final fun defaults-RRvNTYw (Lorg/jetbrains/jewel/ui/component/styling/CheckboxMetrics$Companion;JLandroidx/compose/foundation/shape/CornerSize;JJF)Lorg/jetbrains/jewel/ui/component/styling/CheckboxMetrics; - public static synthetic fun defaults-RRvNTYw$default (Lorg/jetbrains/jewel/ui/component/styling/CheckboxMetrics$Companion;JLandroidx/compose/foundation/shape/CornerSize;JJFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/CheckboxMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/CheckboxIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/CheckboxIcons; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/CheckboxColors;Lorg/jetbrains/jewel/ui/component/styling/CheckboxMetrics;Lorg/jetbrains/jewel/ui/component/styling/CheckboxIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle; - public static final fun light-GyCwops (Lorg/jetbrains/jewel/ui/component/styling/CheckboxColors$Companion;JJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/CheckboxColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiChipStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/ChipStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/ChipColors;Lorg/jetbrains/jewel/ui/component/styling/ChipMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ChipStyle; - public static final fun dark-Sy8uPd4 (Lorg/jetbrains/jewel/ui/component/styling/ChipColors$Companion;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;JJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIIII)Lorg/jetbrains/jewel/ui/component/styling/ChipColors; - public static final fun defaults-oZzcvok (Lorg/jetbrains/jewel/ui/component/styling/ChipMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;FF)Lorg/jetbrains/jewel/ui/component/styling/ChipMetrics; - public static synthetic fun defaults-oZzcvok$default (Lorg/jetbrains/jewel/ui/component/styling/ChipMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;FFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/ChipMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/ChipStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/ChipColors;Lorg/jetbrains/jewel/ui/component/styling/ChipMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ChipStyle; - public static final fun light-Sy8uPd4 (Lorg/jetbrains/jewel/ui/component/styling/ChipColors$Companion;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;JJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIIII)Lorg/jetbrains/jewel/ui/component/styling/ChipColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiCircularProgressStylingKt { - public static final fun dark-O7O2-qc (Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle$Companion;JJ)Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle; - public static synthetic fun dark-O7O2-qc$default (Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle$Companion;JJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle; - public static final fun light-O7O2-qc (Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle$Companion;JJ)Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle; - public static synthetic fun light-O7O2-qc$default (Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle$Companion;JJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDefaultButtonColorFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultButtonColorFactory; - public final fun dark-AckW74Y (Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;JJJJJLandroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/ButtonColors; - public final fun light-AckW74Y (Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;JJJJJLandroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/ButtonColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDefaultButtonStyleFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultButtonStyleFactory; - public final fun dark (Lorg/jetbrains/jewel/ui/component/styling/ButtonColors;Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle; - public final fun light (Lorg/jetbrains/jewel/ui/component/styling/ButtonColors;Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDefaultDropdownColorsFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultDropdownColorsFactory; - public final fun dark-Xf8s2Ik (JJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/component/styling/DropdownColors; - public final fun light-Xf8s2Ik (JJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/component/styling/DropdownColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDefaultDropdownStyleFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultDropdownStyleFactory; - public final fun dark (Lorg/jetbrains/jewel/ui/component/styling/DropdownColors;Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics;Lorg/jetbrains/jewel/ui/component/styling/DropdownIcons;Landroidx/compose/ui/text/TextStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle; - public final fun light (Lorg/jetbrains/jewel/ui/component/styling/DropdownColors;Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics;Lorg/jetbrains/jewel/ui/component/styling/DropdownIcons;Landroidx/compose/ui/text/TextStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory; - public final fun dark-sQnm1Ko (JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors; - public static synthetic fun dark-sQnm1Ko$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors; - public final fun light-sQnm1Ko (JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors; - public static synthetic fun light-sQnm1Ko$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabStyleFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabStyleFactory; - public final fun dark (Lorg/jetbrains/jewel/ui/component/styling/TabColors;Lorg/jetbrains/jewel/ui/component/styling/TabMetrics;Lorg/jetbrains/jewel/ui/component/styling/TabIcons;Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TabStyle; - public final fun light (Lorg/jetbrains/jewel/ui/component/styling/TabColors;Lorg/jetbrains/jewel/ui/component/styling/TabMetrics;Lorg/jetbrains/jewel/ui/component/styling/TabIcons;Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TabStyle; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDividerStyleKt { - public static final fun dark-3IgeMak (Lorg/jetbrains/jewel/ui/component/styling/DividerStyle$Companion;JLorg/jetbrains/jewel/ui/component/styling/DividerMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/DividerStyle; - public static final fun light-3IgeMak (Lorg/jetbrains/jewel/ui/component/styling/DividerStyle$Companion;JLorg/jetbrains/jewel/ui/component/styling/DividerMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/DividerStyle; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDropdownStylingKt { - public static final fun default-Sq-BF7M (Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics$Companion;JJLandroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;F)Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics; - public static synthetic fun default-Sq-BF7M$default (Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics$Companion;JJLandroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;FILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics; - public static final fun defaults (Lorg/jetbrains/jewel/ui/component/styling/DropdownIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)Lorg/jetbrains/jewel/ui/component/styling/DropdownIcons; - public static synthetic fun defaults$default (Lorg/jetbrains/jewel/ui/component/styling/DropdownIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/DropdownIcons; - public static final fun getDefault (Lorg/jetbrains/jewel/ui/component/styling/DropdownColors$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultDropdownColorsFactory; - public static final fun getDefault (Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultDropdownStyleFactory; - public static final fun getUndecorated (Lorg/jetbrains/jewel/ui/component/styling/DropdownColors$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiUndecoratedDropdownColorsFactory; - public static final fun getUndecorated (Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiUndecoratedDropdownStyleFactory; - public static final fun undecorated-Sq-BF7M (Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics$Companion;JJLandroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;F)Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics; - public static synthetic fun undecorated-Sq-BF7M$default (Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics$Companion;JJLandroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;FILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory; - public final fun dark-sQnm1Ko (JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors; - public static synthetic fun dark-sQnm1Ko$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors; - public final fun light-sQnm1Ko (JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors; - public static synthetic fun light-sQnm1Ko$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabStyleFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabStyleFactory; - public final fun dark (Lorg/jetbrains/jewel/ui/component/styling/TabColors;Lorg/jetbrains/jewel/ui/component/styling/TabMetrics;Lorg/jetbrains/jewel/ui/component/styling/TabIcons;Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TabStyle; - public final fun light (Lorg/jetbrains/jewel/ui/component/styling/TabColors;Lorg/jetbrains/jewel/ui/component/styling/TabMetrics;Lorg/jetbrains/jewel/ui/component/styling/TabIcons;Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TabStyle; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiGroupHeaderStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderColors;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle; - public static final fun dark-iJQMabo (Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderColors$Companion;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderColors; - public static final fun defaults-VpY3zN4 (Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderMetrics$Companion;FF)Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderMetrics; - public static synthetic fun defaults-VpY3zN4$default (Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderMetrics$Companion;FFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderColors;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle; - public static final fun light-iJQMabo (Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderColors$Companion;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiHorizontalProgressBarStylingKt { - public static final fun dark-45ZY6uE (Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarColors;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarMetrics;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle; - public static final fun dark-zf8z9n0 (Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarColors$Companion;JJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarColors; - public static final fun defaults-4j6BHR0 (Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FF)Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarMetrics; - public static synthetic fun defaults-4j6BHR0$default (Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarMetrics; - public static final fun light-45ZY6uE (Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarColors;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarMetrics;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle; - public static final fun light-zf8z9n0 (Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarColors$Companion;JJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiIconButtonStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors;Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle; - public static final fun dark-8v1krLo (Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors$Companion;JJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors; - public static final fun defaults-ij7-PLE (Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FLandroidx/compose/foundation/layout/PaddingValues;J)Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics; - public static synthetic fun defaults-ij7-PLE$default (Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FLandroidx/compose/foundation/layout/PaddingValues;JILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors;Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle; - public static final fun light-8v1krLo (Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors$Companion;JJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiLazyTreeStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeColors;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeMetrics;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle; - public static final fun dark-v1fvUNM (Lorg/jetbrains/jewel/ui/component/styling/LazyTreeColors$Companion;JJJJJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LazyTreeColors; - public static final fun defaults (Lorg/jetbrains/jewel/ui/component/styling/LazyTreeIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)Lorg/jetbrains/jewel/ui/component/styling/LazyTreeIcons; - public static synthetic fun defaults$default (Lorg/jetbrains/jewel/ui/component/styling/LazyTreeIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/LazyTreeIcons; - public static final fun defaults-hRm7RI8 (Lorg/jetbrains/jewel/ui/component/styling/LazyTreeMetrics$Companion;FLandroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;FF)Lorg/jetbrains/jewel/ui/component/styling/LazyTreeMetrics; - public static synthetic fun defaults-hRm7RI8$default (Lorg/jetbrains/jewel/ui/component/styling/LazyTreeMetrics$Companion;FLandroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;FFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/LazyTreeMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeColors;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeMetrics;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle; - public static final fun light-v1fvUNM (Lorg/jetbrains/jewel/ui/component/styling/LazyTreeColors$Companion;JJJJJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LazyTreeColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiLinkStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/LinkStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/LinkColors;Lorg/jetbrains/jewel/ui/component/styling/LinkMetrics;Lorg/jetbrains/jewel/ui/component/styling/LinkIcons;Lorg/jetbrains/jewel/ui/component/styling/LinkTextStyles;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LinkStyle; - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/LinkTextStyles$Companion;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LinkTextStyles; - public static final fun dark-dPtIKUs (Lorg/jetbrains/jewel/ui/component/styling/LinkColors$Companion;JJJJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LinkColors; - public static final fun defaults (Lorg/jetbrains/jewel/ui/component/styling/LinkIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)Lorg/jetbrains/jewel/ui/component/styling/LinkIcons; - public static synthetic fun defaults$default (Lorg/jetbrains/jewel/ui/component/styling/LinkIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;Lorg/jetbrains/jewel/ui/painter/PainterProvider;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/LinkIcons; - public static final fun defaults-7dA9OmY (Lorg/jetbrains/jewel/ui/component/styling/LinkMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FJ)Lorg/jetbrains/jewel/ui/component/styling/LinkMetrics; - public static synthetic fun defaults-7dA9OmY$default (Lorg/jetbrains/jewel/ui/component/styling/LinkMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/LinkMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/LinkStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/LinkColors;Lorg/jetbrains/jewel/ui/component/styling/LinkMetrics;Lorg/jetbrains/jewel/ui/component/styling/LinkIcons;Lorg/jetbrains/jewel/ui/component/styling/LinkTextStyles;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LinkStyle; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/LinkTextStyles$Companion;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LinkTextStyles; - public static final fun light-dPtIKUs (Lorg/jetbrains/jewel/ui/component/styling/LinkColors$Companion;JJJJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/LinkColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiMenuStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/MenuStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/MenuColors;Lorg/jetbrains/jewel/ui/component/styling/MenuMetrics;Lorg/jetbrains/jewel/ui/component/styling/MenuIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/MenuStyle; - public static final fun dark-Jy8F4Js (Lorg/jetbrains/jewel/ui/component/styling/MenuColors$Companion;JJJLorg/jetbrains/jewel/ui/component/styling/MenuItemColors;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/MenuColors; - public static final fun dark-a3tHFA8 (Lorg/jetbrains/jewel/ui/component/styling/MenuItemColors$Companion;JJJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/component/styling/MenuItemColors; - public static final fun defaults (Lorg/jetbrains/jewel/ui/component/styling/MenuIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)Lorg/jetbrains/jewel/ui/component/styling/MenuIcons; - public static synthetic fun defaults$default (Lorg/jetbrains/jewel/ui/component/styling/MenuIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/MenuIcons; - public static final fun defaults-AWlRVLg (Lorg/jetbrains/jewel/ui/component/styling/MenuItemMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;FF)Lorg/jetbrains/jewel/ui/component/styling/MenuItemMetrics; - public static synthetic fun defaults-AWlRVLg$default (Lorg/jetbrains/jewel/ui/component/styling/MenuItemMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;FFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/MenuItemMetrics; - public static final fun defaults-BkVx2pU (Lorg/jetbrains/jewel/ui/component/styling/SubmenuMetrics$Companion;J)Lorg/jetbrains/jewel/ui/component/styling/SubmenuMetrics; - public static synthetic fun defaults-BkVx2pU$default (Lorg/jetbrains/jewel/ui/component/styling/SubmenuMetrics$Companion;JILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/SubmenuMetrics; - public static final fun defaults-ORMxH6s (Lorg/jetbrains/jewel/ui/component/styling/MenuMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;JFFLorg/jetbrains/jewel/ui/component/styling/MenuItemMetrics;Lorg/jetbrains/jewel/ui/component/styling/SubmenuMetrics;)Lorg/jetbrains/jewel/ui/component/styling/MenuMetrics; - public static synthetic fun defaults-ORMxH6s$default (Lorg/jetbrains/jewel/ui/component/styling/MenuMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;JFFLorg/jetbrains/jewel/ui/component/styling/MenuItemMetrics;Lorg/jetbrains/jewel/ui/component/styling/SubmenuMetrics;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/MenuMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/MenuStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/MenuColors;Lorg/jetbrains/jewel/ui/component/styling/MenuMetrics;Lorg/jetbrains/jewel/ui/component/styling/MenuIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/MenuStyle; - public static final fun light-Jy8F4Js (Lorg/jetbrains/jewel/ui/component/styling/MenuColors$Companion;JJJLorg/jetbrains/jewel/ui/component/styling/MenuItemColors;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/MenuColors; - public static final fun light-a3tHFA8 (Lorg/jetbrains/jewel/ui/component/styling/MenuItemColors$Companion;JJJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/component/styling/MenuItemColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiOutlinedButtonColorFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiOutlinedButtonColorFactory; - public final fun dark-AckW74Y (Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;JJJJJLandroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/ButtonColors; - public final fun light-AckW74Y (Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;JJJJJLandroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Brush;Landroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/ButtonColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiOutlinedButtonStyleFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiOutlinedButtonStyleFactory; - public final fun dark (Lorg/jetbrains/jewel/ui/component/styling/ButtonColors;Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle; - public final fun light (Lorg/jetbrains/jewel/ui/component/styling/ButtonColors;Lorg/jetbrains/jewel/ui/component/styling/ButtonMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiRadioButtonStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons; - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonColors;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonMetrics;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle; - public static synthetic fun dark$default (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons; - public static final fun dark-dPtIKUs (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonColors$Companion;JJJJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonColors; - public static final fun defaults-Q6CdCac (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonMetrics$Companion;JF)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonMetrics; - public static synthetic fun defaults-Q6CdCac$default (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonMetrics$Companion;JFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonColors;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonMetrics;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle; - public static synthetic fun light$default (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonIcons; - public static final fun light-dPtIKUs (Lorg/jetbrains/jewel/ui/component/styling/RadioButtonColors$Companion;JJJJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/RadioButtonColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiScrollbarStylingKt { - public static final fun dark-45ZY6uE (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarColors;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarMetrics;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle; - public static final fun dark-RIQooxk (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarColors$Companion;JJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarColors; - public static final fun defaults--JS8el8 (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FFLandroidx/compose/foundation/layout/PaddingValues;)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarMetrics; - public static synthetic fun defaults--JS8el8$default (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FFLandroidx/compose/foundation/layout/PaddingValues;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarMetrics; - public static final fun light-45ZY6uE (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarColors;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarMetrics;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle; - public static final fun light-RIQooxk (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarColors$Companion;JJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiSliderStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/SliderStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/SliderColors;Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics;Landroidx/compose/ui/graphics/Shape;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/SliderStyle; - public static final fun dark-8v1krLo (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/SliderColors; - public static final fun defaults-nDjVmYc (Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics$Companion;FJFFFFLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/SliderStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/SliderColors;Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics;Landroidx/compose/ui/graphics/Shape;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/SliderStyle; - public static final fun light-8v1krLo (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/SliderColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiTabStylingKt { - public static final fun default (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFF)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha; - public static synthetic fun default$default (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha; - public static final fun defaults (Lorg/jetbrains/jewel/ui/component/styling/TabIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)Lorg/jetbrains/jewel/ui/component/styling/TabIcons; - public static synthetic fun defaults$default (Lorg/jetbrains/jewel/ui/component/styling/TabIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabIcons; - public static final fun defaults-t6ZgxxQ (Lorg/jetbrains/jewel/ui/component/styling/TabMetrics$Companion;FLandroidx/compose/foundation/layout/PaddingValues;FFF)Lorg/jetbrains/jewel/ui/component/styling/TabMetrics; - public static synthetic fun defaults-t6ZgxxQ$default (Lorg/jetbrains/jewel/ui/component/styling/TabMetrics$Companion;FLandroidx/compose/foundation/layout/PaddingValues;FFFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabMetrics; - public static final fun editor (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFF)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha; - public static synthetic fun editor$default (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha; - public static final fun getDefault (Lorg/jetbrains/jewel/ui/component/styling/TabColors$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory; - public static final fun getDefault (Lorg/jetbrains/jewel/ui/component/styling/TabStyle$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabStyleFactory; - public static final fun getEditor (Lorg/jetbrains/jewel/ui/component/styling/TabColors$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory; - public static final fun getEditor (Lorg/jetbrains/jewel/ui/component/styling/TabStyle$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabStyleFactory; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiTextAreaStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/TextAreaColors;Lorg/jetbrains/jewel/ui/component/styling/TextAreaMetrics;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle; - public static final fun dark-a3tHFA8 (Lorg/jetbrains/jewel/ui/component/styling/TextAreaColors$Companion;JJJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/component/styling/TextAreaColors; - public static final fun defaults-H1KY9o8 (Lorg/jetbrains/jewel/ui/component/styling/TextAreaMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;JF)Lorg/jetbrains/jewel/ui/component/styling/TextAreaMetrics; - public static synthetic fun defaults-H1KY9o8$default (Lorg/jetbrains/jewel/ui/component/styling/TextAreaMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;JFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TextAreaMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/TextAreaColors;Lorg/jetbrains/jewel/ui/component/styling/TextAreaMetrics;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle; - public static final fun light-a3tHFA8 (Lorg/jetbrains/jewel/ui/component/styling/TextAreaColors$Companion;JJJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/component/styling/TextAreaColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiTextFieldStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/TextFieldColors;Lorg/jetbrains/jewel/ui/component/styling/TextFieldMetrics;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle; - public static final fun dark-a3tHFA8 (Lorg/jetbrains/jewel/ui/component/styling/TextFieldColors$Companion;JJJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/component/styling/TextFieldColors; - public static final fun defaults-H1KY9o8 (Lorg/jetbrains/jewel/ui/component/styling/TextFieldMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;JF)Lorg/jetbrains/jewel/ui/component/styling/TextFieldMetrics; - public static synthetic fun defaults-H1KY9o8$default (Lorg/jetbrains/jewel/ui/component/styling/TextFieldMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;Landroidx/compose/foundation/layout/PaddingValues;JFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TextFieldMetrics; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/TextFieldColors;Lorg/jetbrains/jewel/ui/component/styling/TextFieldMetrics;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle; - public static final fun light-a3tHFA8 (Lorg/jetbrains/jewel/ui/component/styling/TextFieldColors$Companion;JJJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/component/styling/TextFieldColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiTooltipStylingKt { - public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/TooltipColors;Lorg/jetbrains/jewel/ui/component/styling/TooltipMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle; - public static final fun dark-zf8z9n0 (Lorg/jetbrains/jewel/ui/component/styling/TooltipColors$Companion;JJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TooltipColors; - public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/TooltipColors;Lorg/jetbrains/jewel/ui/component/styling/TooltipMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle; - public static final fun light-zf8z9n0 (Lorg/jetbrains/jewel/ui/component/styling/TooltipColors$Companion;JJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/TooltipColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiUndecoratedDropdownColorsFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiUndecoratedDropdownColorsFactory; - public final fun dark-0ik9mME (JJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/DropdownColors; - public final fun light-0ik9mME (JJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/DropdownColors; -} - -public final class org/jetbrains/jewel/intui/standalone/styling/IntUiUndecoratedDropdownStyleFactory { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiUndecoratedDropdownStyleFactory; - public final fun dark (Lorg/jetbrains/jewel/ui/component/styling/DropdownColors;Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics;Lorg/jetbrains/jewel/ui/component/styling/DropdownIcons;Landroidx/compose/ui/text/TextStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle; - public final fun light (Lorg/jetbrains/jewel/ui/component/styling/DropdownColors;Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics;Lorg/jetbrains/jewel/ui/component/styling/DropdownIcons;Landroidx/compose/ui/text/TextStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle; -} - -public final class org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalColorsKt { - public static final fun dark-GyCwops (Lorg/jetbrains/jewel/foundation/BorderColors$Companion;JJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/BorderColors; - public static final fun dark-Hformbs (Lorg/jetbrains/jewel/foundation/OutlineColors$Companion;JJJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/OutlineColors; - public static final fun dark-jA1GFJw (Lorg/jetbrains/jewel/foundation/GlobalColors$Companion;Lorg/jetbrains/jewel/foundation/BorderColors;Lorg/jetbrains/jewel/foundation/OutlineColors;JJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/GlobalColors; - public static final fun light-GyCwops (Lorg/jetbrains/jewel/foundation/BorderColors$Companion;JJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/BorderColors; - public static final fun light-Hformbs (Lorg/jetbrains/jewel/foundation/OutlineColors$Companion;JJJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/OutlineColors; - public static final fun light-jA1GFJw (Lorg/jetbrains/jewel/foundation/GlobalColors$Companion;Lorg/jetbrains/jewel/foundation/BorderColors;Lorg/jetbrains/jewel/foundation/OutlineColors;JJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/GlobalColors; -} - -public final class org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalMetricsKt { - public static final fun defaults-VpY3zN4 (Lorg/jetbrains/jewel/foundation/GlobalMetrics$Companion;FF)Lorg/jetbrains/jewel/foundation/GlobalMetrics; - public static synthetic fun defaults-VpY3zN4$default (Lorg/jetbrains/jewel/foundation/GlobalMetrics$Companion;FFILjava/lang/Object;)Lorg/jetbrains/jewel/foundation/GlobalMetrics; -} - -public final class org/jetbrains/jewel/intui/standalone/theme/IntUiThemeKt { - public static final fun IntUiTheme (Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;Lorg/jetbrains/jewel/ui/ComponentStyling;ZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V - public static final fun IntUiTheme (ZZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V - public static final fun dark (Lorg/jetbrains/jewel/ui/ComponentStyling;Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle;Lorg/jetbrains/jewel/ui/component/styling/ChipStyle;Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/DividerStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle;Lorg/jetbrains/jewel/ui/component/styling/LinkStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle;Lorg/jetbrains/jewel/ui/component/styling/SliderStyle;Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle;Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/ComponentStyling; - public static final fun darkThemeDefinition-RFMEUTM (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Lorg/jetbrains/jewel/foundation/GlobalColors;Lorg/jetbrains/jewel/foundation/GlobalMetrics;Lorg/jetbrains/jewel/foundation/theme/ThemeColorPalette;Lorg/jetbrains/jewel/foundation/theme/ThemeIconData;Landroidx/compose/ui/text/TextStyle;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition; - public static final fun default (Lorg/jetbrains/jewel/ui/ComponentStyling;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ui/ComponentStyling; - public static final fun getDefaultTextStyle (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;)Landroidx/compose/ui/text/TextStyle; - public static final fun light (Lorg/jetbrains/jewel/ui/ComponentStyling;Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle;Lorg/jetbrains/jewel/ui/component/styling/ChipStyle;Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/DividerStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle;Lorg/jetbrains/jewel/ui/component/styling/LinkStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle;Lorg/jetbrains/jewel/ui/component/styling/SliderStyle;Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle;Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/ComponentStyling; - public static final fun lightThemeDefinition-RFMEUTM (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Lorg/jetbrains/jewel/foundation/GlobalColors;Lorg/jetbrains/jewel/foundation/GlobalMetrics;Lorg/jetbrains/jewel/foundation/theme/ThemeColorPalette;Lorg/jetbrains/jewel/foundation/theme/ThemeIconData;Landroidx/compose/ui/text/TextStyle;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition; -} - diff --git a/int-ui/int-ui-standalone/build.gradle.kts b/int-ui/int-ui-standalone/build.gradle.kts deleted file mode 100644 index b7eefadad2..0000000000 --- a/int-ui/int-ui-standalone/build.gradle.kts +++ /dev/null @@ -1,35 +0,0 @@ -plugins { - jewel - `jewel-publish` - `jewel-check-public-api` - alias(libs.plugins.composeDesktop) - `intellij-theme-generator` -} - -dependencies { api(projects.ui) } - -intelliJThemeGenerator { - val targetIdeaVersion = "241.9959" - register("intUiLight") { - themeClassName = "org.jetbrains.jewel.intui.core.theme.IntUiLightTheme" - themeFile = "platform/platform-resources/src/themes/expUI/expUI_light.theme.json" - ideaVersion = targetIdeaVersion - } - register("intUiDark") { - themeClassName = "org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme" - themeFile = "platform/platform-resources/src/themes/expUI/expUI_dark.theme.json" - ideaVersion = targetIdeaVersion - } -} - -tasks { - named("dokkaHtml") { - dependsOn("generateIntUiDarkTheme") - dependsOn("generateIntUiLightTheme") - } - named("sourcesJar") { - dependsOn("generateIntUiDarkTheme") - dependsOn("generateIntUiLightTheme") - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - } -} diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/InterFont.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/InterFont.kt deleted file mode 100644 index 86e863800d..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/InterFont.kt +++ /dev/null @@ -1,21 +0,0 @@ -package org.jetbrains.jewel.intui.standalone - -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.platform.Font - -private val InterFontFamily = - FontFamily( - Font(resource = "/fonts/inter/Inter-Thin.ttf", weight = FontWeight.Thin), - Font(resource = "/fonts/inter/Inter-ExtraLight.ttf", weight = FontWeight.ExtraLight), - Font(resource = "/fonts/inter/Inter-Light.ttf", weight = FontWeight.Light), - Font(resource = "/fonts/inter/Inter-Regular.ttf", weight = FontWeight.Normal), - Font(resource = "/fonts/inter/Inter-Medium.ttf", weight = FontWeight.Medium), - Font(resource = "/fonts/inter/Inter-SemiBold.ttf", weight = FontWeight.SemiBold), - Font(resource = "/fonts/inter/Inter-Bold.ttf", weight = FontWeight.Bold), - Font(resource = "/fonts/inter/Inter-ExtraBold.ttf", weight = FontWeight.ExtraBold), - Font(resource = "/fonts/inter/Inter-Black.ttf", weight = FontWeight.Black), - ) - -public val FontFamily.Companion.Inter: FontFamily - get() = InterFontFamily diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/PainterProvider.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/PainterProvider.kt deleted file mode 100644 index e244f806be..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/PainterProvider.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.jetbrains.jewel.intui.standalone - -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.ui.painter.ResourcePainterProvider - -/** - * Create a [PainterProvider][org.jetbrains.jewel.painter.PainterProvider] to load a resource from - * the classpath. - */ -public fun standalonePainterProvider(path: String): ResourcePainterProvider = - ResourcePainterProvider(path, JewelTheme::class.java.classLoader) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/StandalonePainterHintsProvider.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/StandalonePainterHintsProvider.kt deleted file mode 100644 index 052c067222..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/StandalonePainterHintsProvider.kt +++ /dev/null @@ -1,90 +0,0 @@ -package org.jetbrains.jewel.intui.standalone - -import androidx.compose.runtime.Composable -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.foundation.theme.ThemeDefinition -import org.jetbrains.jewel.ui.painter.BasePainterHintsProvider -import org.jetbrains.jewel.ui.painter.PainterHint -import org.jetbrains.jewel.ui.painter.hints.Dark -import org.jetbrains.jewel.ui.painter.hints.HiDpi -import org.jetbrains.jewel.ui.painter.hints.Override - -public class StandalonePainterHintsProvider( - theme: ThemeDefinition, -) : BasePainterHintsProvider( - theme.isDark, - intellijColorPalette, - theme.iconData.colorPalette, - theme.colorPalette.rawMap, -) { - - private val overrideHint: PainterHint = - Override( - theme.iconData.iconOverrides.entries.associate { (k, v) -> - k.removePrefix("/") to v.removePrefix("/") - }, - ) - - @Composable - override fun hints(path: String): List = buildList { - add(getPaletteHint(path)) - add(overrideHint) - add(HiDpi()) - add(Dark(JewelTheme.isDark)) - } - - public companion object { - - // Extracted from com.intellij.ide.ui.UITheme#colorPalette - private val intellijColorPalette = - mapOf( - "Actions.Red" to "#DB5860", - "Actions.Red.Dark" to "#C75450", - "Actions.Yellow" to "#EDA200", - "Actions.Yellow.Dark" to "#F0A732", - "Actions.Green" to "#59A869", - "Actions.Green.Dark" to "#499C54", - "Actions.Blue" to "#389FD6", - "Actions.Blue.Dark" to "#3592C4", - "Actions.Grey" to "#6E6E6E", - "Actions.Grey.Dark" to "#AFB1B3", - "Actions.GreyInline" to "#7F8B91", - "Actions.GreyInline.Dark" to "#7F8B91", - "Objects.Grey" to "#9AA7B0", - "Objects.Blue" to "#40B6E0", - "Objects.Green" to "#62B543", - "Objects.Yellow" to "#F4AF3D", - "Objects.YellowDark" to "#D9A343", - "Objects.Purple" to "#B99BF8", - "Objects.Pink" to "#F98B9E", - "Objects.Red" to "#F26522", - "Objects.RedStatus" to "#E05555", - "Objects.GreenAndroid" to "#3DDC84", - "Objects.BlackText" to "#231F20", - "Checkbox.Background.Default" to "#FFFFFF", - "Checkbox.Background.Default.Dark" to "#43494A", - "Checkbox.Background.Disabled" to "#F2F2F2", - "Checkbox.Background.Disabled.Dark" to "#3C3F41", - "Checkbox.Border.Default" to "#b0b0b0", - "Checkbox.Border.Default.Dark" to "#6B6B6B", - "Checkbox.Border.Disabled" to "#BDBDBD", - "Checkbox.Border.Disabled.Dark" to "#545556", - "Checkbox.Focus.Thin.Default" to "#7B9FC7", - "Checkbox.Focus.Thin.Default.Dark" to "#466D94", - "Checkbox.Focus.Wide" to "#97C3F3", - "Checkbox.Focus.Wide.Dark" to "#3D6185", - "Checkbox.Foreground.Disabled" to "#ABABAB", - "Checkbox.Foreground.Disabled.Dark" to "#606060", - "Checkbox.Background.Selected" to "#4F9EE3", - "Checkbox.Background.Selected.Dark" to "#43494A", - "Checkbox.Border.Selected" to "#4B97D9", - "Checkbox.Border.Selected.Dark" to "#6B6B6B", - "Checkbox.Foreground.Selected" to "#FEFEFE", - "Checkbox.Foreground.Selected.Dark" to "#A7A7A7", - "Checkbox.Focus.Thin.Selected" to "#ACCFF7", - "Checkbox.Focus.Thin.Selected.Dark" to "#466D94", - "Tree.iconColor" to "#808080", - "Tree.iconColor.Dark" to "#AFB1B3", - ) - } -} diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiButtonStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiButtonStyling.kt deleted file mode 100644 index f6c4cdd759..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiButtonStyling.kt +++ /dev/null @@ -1,226 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Brush -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.ui.component.styling.ButtonColors -import org.jetbrains.jewel.ui.component.styling.ButtonMetrics -import org.jetbrains.jewel.ui.component.styling.ButtonStyle - -public val ButtonStyle.Companion.Default: IntUiDefaultButtonStyleFactory - get() = IntUiDefaultButtonStyleFactory - -public object IntUiDefaultButtonStyleFactory { - - @Composable - public fun light( - colors: ButtonColors = ButtonColors.Default.light(), - metrics: ButtonMetrics = ButtonMetrics.default(), - ): ButtonStyle = ButtonStyle(colors, metrics) - - @Composable - public fun dark( - colors: ButtonColors = ButtonColors.Default.dark(), - metrics: ButtonMetrics = ButtonMetrics.default(), - ): ButtonStyle = ButtonStyle(colors, metrics) -} - -public val ButtonStyle.Companion.Outlined: IntUiOutlinedButtonStyleFactory - get() = IntUiOutlinedButtonStyleFactory - -public object IntUiOutlinedButtonStyleFactory { - - @Composable - public fun light( - colors: ButtonColors = ButtonColors.Outlined.light(), - metrics: ButtonMetrics = ButtonMetrics.outlined(), - ): ButtonStyle = - ButtonStyle(colors, metrics) - - @Composable - public fun dark( - colors: ButtonColors = ButtonColors.Outlined.dark(), - metrics: ButtonMetrics = ButtonMetrics.outlined(), - ): ButtonStyle = - ButtonStyle(colors, metrics) -} - -public val ButtonColors.Companion.Default: IntUiDefaultButtonColorFactory - get() = IntUiDefaultButtonColorFactory - -public object IntUiDefaultButtonColorFactory { - - @Composable - public fun light( - background: Brush = SolidColor(IntUiLightTheme.colors.blue(4)), - backgroundDisabled: Brush = SolidColor(IntUiLightTheme.colors.grey(12)), - backgroundFocused: Brush = SolidColor(IntUiLightTheme.colors.blue(4)), - backgroundPressed: Brush = SolidColor(IntUiLightTheme.colors.blue(2)), - backgroundHovered: Brush = SolidColor(IntUiLightTheme.colors.blue(3)), - content: Color = IntUiLightTheme.colors.grey(14), - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentFocused: Color = IntUiLightTheme.colors.grey(14), - contentPressed: Color = IntUiLightTheme.colors.grey(14), - contentHovered: Color = IntUiLightTheme.colors.grey(14), - border: Brush = SolidColor(IntUiLightTheme.colors.blue(4)), - borderDisabled: Brush = SolidColor(IntUiLightTheme.colors.grey(12)), - borderFocused: Brush = SolidColor(IntUiLightTheme.colors.blue(4)), - borderPressed: Brush = border, - borderHovered: Brush = border, - ): ButtonColors = - ButtonColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - ) - - @Composable - public fun dark( - background: Brush = SolidColor(IntUiDarkTheme.colors.blue(6)), - backgroundDisabled: Brush = SolidColor(IntUiDarkTheme.colors.grey(5)), - backgroundFocused: Brush = SolidColor(IntUiDarkTheme.colors.blue(6)), - backgroundPressed: Brush = SolidColor(IntUiDarkTheme.colors.blue(4)), - backgroundHovered: Brush = SolidColor(IntUiDarkTheme.colors.blue(5)), - content: Color = IntUiDarkTheme.colors.grey(14), - contentDisabled: Color = IntUiDarkTheme.colors.grey(8), - contentFocused: Color = IntUiDarkTheme.colors.grey(14), - contentPressed: Color = IntUiDarkTheme.colors.grey(14), - contentHovered: Color = IntUiDarkTheme.colors.grey(14), - border: Brush = SolidColor(IntUiDarkTheme.colors.blue(6)), - borderDisabled: Brush = SolidColor(IntUiDarkTheme.colors.grey(5)), - borderFocused: Brush = SolidColor(IntUiDarkTheme.colors.grey(1)), - borderPressed: Brush = border, - borderHovered: Brush = border, - ): ButtonColors = - ButtonColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - ) -} - -public val ButtonColors.Companion.Outlined: IntUiOutlinedButtonColorFactory - get() = IntUiOutlinedButtonColorFactory - -public object IntUiOutlinedButtonColorFactory { - - @Composable - public fun light( - background: Brush = SolidColor(Color.Transparent), - backgroundDisabled: Brush = SolidColor(IntUiLightTheme.colors.grey(12)), - backgroundFocused: Brush = SolidColor(Color.Transparent), - backgroundPressed: Brush = SolidColor(IntUiLightTheme.colors.grey(13)), - backgroundHovered: Brush = SolidColor(Color.Transparent), - content: Color = IntUiLightTheme.colors.grey(1), - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentFocused: Color = IntUiLightTheme.colors.grey(1), - contentPressed: Color = IntUiLightTheme.colors.grey(1), - contentHovered: Color = IntUiLightTheme.colors.grey(1), - border: Brush = SolidColor(IntUiLightTheme.colors.grey(9)), - borderDisabled: Brush = SolidColor(IntUiLightTheme.colors.grey(12)), - borderFocused: Brush = SolidColor(IntUiLightTheme.colors.blue(4)), - borderPressed: Brush = SolidColor(IntUiLightTheme.colors.grey(7)), - borderHovered: Brush = SolidColor(IntUiLightTheme.colors.grey(8)), - ): ButtonColors = - ButtonColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - ) - - @Composable - public fun dark( - background: Brush = SolidColor(Color.Transparent), - backgroundDisabled: Brush = SolidColor(IntUiDarkTheme.colors.grey(5)), - backgroundFocused: Brush = SolidColor(IntUiDarkTheme.colors.grey(6)), - backgroundPressed: Brush = SolidColor(IntUiDarkTheme.colors.grey(2)), - backgroundHovered: Brush = SolidColor(Color.Unspecified), - content: Color = IntUiDarkTheme.colors.grey(12), - contentDisabled: Color = IntUiDarkTheme.colors.grey(8), - contentFocused: Color = IntUiDarkTheme.colors.grey(12), - contentPressed: Color = IntUiDarkTheme.colors.grey(12), - contentHovered: Color = IntUiDarkTheme.colors.grey(12), - border: Brush = SolidColor(IntUiDarkTheme.colors.grey(5)), - borderDisabled: Brush = SolidColor(IntUiDarkTheme.colors.grey(5)), - borderFocused: Brush = SolidColor(IntUiDarkTheme.colors.grey(2)), - borderPressed: Brush = SolidColor(IntUiDarkTheme.colors.grey(7)), - borderHovered: Brush = SolidColor(IntUiDarkTheme.colors.grey(7)), - ): ButtonColors = - ButtonColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - ) -} - -public fun ButtonMetrics.Companion.default( - cornerSize: CornerSize = CornerSize(4.dp), - padding: PaddingValues = PaddingValues(horizontal = 12.dp, vertical = 6.dp), - minSize: DpSize = DpSize(72.dp, 28.dp), - borderWidth: Dp = 0.dp, -): ButtonMetrics = - ButtonMetrics(cornerSize, padding, minSize, borderWidth) - -public fun ButtonMetrics.Companion.outlined( - cornerSize: CornerSize = CornerSize(4.dp), - padding: PaddingValues = PaddingValues(horizontal = 12.dp, vertical = 6.dp), - minSize: DpSize = DpSize(72.dp, 28.dp), - borderWidth: Dp = 1.dp, -): ButtonMetrics = - ButtonMetrics(cornerSize, padding, minSize, borderWidth) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCheckboxStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCheckboxStyling.kt deleted file mode 100644 index f4729f20fc..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCheckboxStyling.kt +++ /dev/null @@ -1,76 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpOffset -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.standalonePainterProvider -import org.jetbrains.jewel.ui.component.styling.CheckboxColors -import org.jetbrains.jewel.ui.component.styling.CheckboxIcons -import org.jetbrains.jewel.ui.component.styling.CheckboxMetrics -import org.jetbrains.jewel.ui.component.styling.CheckboxStyle -import org.jetbrains.jewel.ui.painter.PainterProvider - -@Composable -public fun CheckboxStyle.Companion.light( - colors: CheckboxColors = CheckboxColors.light(), - metrics: CheckboxMetrics = CheckboxMetrics.defaults(), - icons: CheckboxIcons = CheckboxIcons.light(), -): CheckboxStyle = - CheckboxStyle(colors, metrics, icons) - -@Composable -public fun CheckboxStyle.Companion.dark( - colors: CheckboxColors = CheckboxColors.dark(), - metrics: CheckboxMetrics = CheckboxMetrics.defaults(), - icons: CheckboxIcons = CheckboxIcons.dark(), -): CheckboxStyle = - CheckboxStyle(colors, metrics, icons) - -@Composable -public fun CheckboxColors.Companion.light( - content: Color = Color.Unspecified, - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentSelected: Color = content, -): CheckboxColors = - CheckboxColors(content, contentDisabled, contentSelected) - -@Composable -public fun CheckboxColors.Companion.dark( - content: Color = Color.Unspecified, - contentDisabled: Color = IntUiDarkTheme.colors.grey(7), - contentSelected: Color = content, -): CheckboxColors = - CheckboxColors(content, contentDisabled, contentSelected) - -public fun CheckboxMetrics.Companion.defaults( - checkboxSize: DpSize = DpSize(19.dp, 19.dp), - checkboxCornerSize: CornerSize = CornerSize(3.dp), - outlineSize: DpSize = DpSize(15.dp, 15.dp), - outlineOffset: DpOffset = DpOffset(2.5.dp, 1.5.dp), - iconContentGap: Dp = 5.dp, -): CheckboxMetrics = - CheckboxMetrics( - checkboxSize, - checkboxCornerSize, - outlineSize, - outlineOffset, - iconContentGap, - ) - -@Composable -public fun CheckboxIcons.Companion.light( - checkbox: PainterProvider = standalonePainterProvider("com/intellij/ide/ui/laf/icons/intellij/checkBox.svg"), -): CheckboxIcons = - CheckboxIcons(checkbox) - -@Composable -public fun CheckboxIcons.Companion.dark( - checkbox: PainterProvider = standalonePainterProvider("com/intellij/ide/ui/laf/icons/darcula/checkBox.svg"), -): CheckboxIcons = - CheckboxIcons(checkbox) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiChipStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiChipStyling.kt deleted file mode 100644 index 54f57bf535..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiChipStyling.kt +++ /dev/null @@ -1,167 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Brush -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.SolidColor -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.ui.component.styling.ChipColors -import org.jetbrains.jewel.ui.component.styling.ChipMetrics -import org.jetbrains.jewel.ui.component.styling.ChipStyle - -@Composable -public fun ChipStyle.Companion.light( - colors: ChipColors = ChipColors.light(), - metrics: ChipMetrics = ChipMetrics.defaults(), -): ChipStyle = ChipStyle(colors, metrics) - -@Composable -public fun ChipStyle.Companion.dark( - colors: ChipColors = ChipColors.dark(), - metrics: ChipMetrics = ChipMetrics.defaults(), -): ChipStyle = ChipStyle(colors, metrics) - -@Composable -public fun ChipColors.Companion.light( - background: Brush = SolidColor(IntUiLightTheme.colors.grey(14)), - backgroundDisabled: Brush = SolidColor(IntUiLightTheme.colors.grey(12)), - backgroundFocused: Brush = background, - backgroundPressed: Brush = SolidColor(IntUiLightTheme.colors.grey(13)), - backgroundHovered: Brush = background, - backgroundSelected: Brush = background, - backgroundSelectedDisabled: Brush = backgroundDisabled, - backgroundSelectedFocused: Brush = background, - backgroundSelectedPressed: Brush = background, - backgroundSelectedHovered: Brush = background, - content: Color = IntUiLightTheme.colors.grey(1), - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - contentSelected: Color = content, - contentSelectedDisabled: Color = contentDisabled, - contentSelectedFocused: Color = content, - contentSelectedPressed: Color = content, - contentSelectedHovered: Color = content, - border: Color = IntUiLightTheme.colors.grey(9), - borderDisabled: Color = IntUiLightTheme.colors.grey(6), - borderFocused: Color = IntUiLightTheme.colors.blue(4), - borderPressed: Color = IntUiLightTheme.colors.grey(7), - borderHovered: Color = IntUiLightTheme.colors.grey(8), - borderSelected: Color = IntUiLightTheme.colors.blue(4), - borderSelectedDisabled: Color = borderSelected, - borderSelectedFocused: Color = borderSelected, - borderSelectedPressed: Color = borderSelected, - borderSelectedHovered: Color = borderSelected, -): ChipColors = - ChipColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - backgroundSelected = backgroundSelected, - backgroundSelectedDisabled = backgroundSelectedDisabled, - backgroundSelectedPressed = backgroundSelectedPressed, - backgroundSelectedFocused = backgroundSelectedFocused, - backgroundSelectedHovered = backgroundSelectedHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentSelected = contentSelected, - contentSelectedDisabled = contentSelectedDisabled, - contentSelectedPressed = contentSelectedPressed, - contentSelectedFocused = contentSelectedFocused, - contentSelectedHovered = contentSelectedHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - borderSelected = borderSelected, - borderSelectedDisabled = borderSelectedDisabled, - borderSelectedPressed = borderSelectedPressed, - borderSelectedFocused = borderSelectedFocused, - borderSelectedHovered = borderSelectedHovered, - ) - -@Composable -public fun ChipColors.Companion.dark( - background: Brush = SolidColor(IntUiDarkTheme.colors.grey(2)), - backgroundDisabled: Brush = SolidColor(IntUiDarkTheme.colors.grey(5)), - backgroundFocused: Brush = background, - backgroundPressed: Brush = background, - backgroundHovered: Brush = background, - backgroundSelected: Brush = background, - backgroundSelectedDisabled: Brush = backgroundDisabled, - backgroundSelectedFocused: Brush = background, - backgroundSelectedPressed: Brush = background, - backgroundSelectedHovered: Brush = background, - content: Color = IntUiDarkTheme.colors.grey(12), - contentDisabled: Color = IntUiDarkTheme.colors.grey(8), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - contentSelected: Color = content, - contentSelectedDisabled: Color = contentDisabled, - contentSelectedFocused: Color = content, - contentSelectedPressed: Color = content, - contentSelectedHovered: Color = content, - border: Color = IntUiDarkTheme.colors.grey(5), - borderDisabled: Color = IntUiDarkTheme.colors.grey(6), - borderFocused: Color = IntUiDarkTheme.colors.blue(6), - borderPressed: Color = IntUiDarkTheme.colors.grey(7), - borderHovered: Color = borderPressed, - borderSelected: Color = IntUiDarkTheme.colors.blue(6), - borderSelectedDisabled: Color = borderSelected, - borderSelectedFocused: Color = borderSelected, - borderSelectedPressed: Color = borderSelected, - borderSelectedHovered: Color = borderSelected, -): ChipColors = - ChipColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - backgroundSelected = backgroundSelected, - backgroundSelectedDisabled = backgroundSelectedDisabled, - backgroundSelectedPressed = backgroundSelectedPressed, - backgroundSelectedFocused = backgroundSelectedFocused, - backgroundSelectedHovered = backgroundSelectedHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentSelected = contentSelected, - contentSelectedDisabled = contentSelectedDisabled, - contentSelectedPressed = contentSelectedPressed, - contentSelectedFocused = contentSelectedFocused, - contentSelectedHovered = contentSelectedHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - borderSelected = borderSelected, - borderSelectedDisabled = borderSelectedDisabled, - borderSelectedPressed = borderSelectedPressed, - borderSelectedFocused = borderSelectedFocused, - borderSelectedHovered = borderSelectedHovered, - ) - -public fun ChipMetrics.Companion.defaults( - cornerSize: CornerSize = CornerSize(100), - padding: PaddingValues = PaddingValues(horizontal = 12.dp, vertical = 8.dp), - borderWidth: Dp = 1.dp, - borderWidthSelected: Dp = 2.dp, -): ChipMetrics = - ChipMetrics(cornerSize, padding, borderWidth, borderWidthSelected) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCircularProgressStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCircularProgressStyling.kt deleted file mode 100644 index 81a1c4ab32..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCircularProgressStyling.kt +++ /dev/null @@ -1,23 +0,0 @@ -@file:Suppress( - "MatchingDeclarationName", - "ktlint:standard:filename", -) // Going for consistency with other files - -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.ui.graphics.Color -import org.jetbrains.jewel.ui.component.styling.CircularProgressStyle -import kotlin.time.Duration -import kotlin.time.Duration.Companion.milliseconds - -public fun CircularProgressStyle.Companion.dark( - frameTime: Duration = 125.milliseconds, - color: Color = Color(0xFF6F737A), -): CircularProgressStyle = - CircularProgressStyle(frameTime, color) - -public fun CircularProgressStyle.Companion.light( - frameTime: Duration = 125.milliseconds, - color: Color = Color(0xFFA8ADBD), -): CircularProgressStyle = - CircularProgressStyle(frameTime, color) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDividerStyle.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDividerStyle.kt deleted file mode 100644 index 8702a39538..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDividerStyle.kt +++ /dev/null @@ -1,22 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.ui.component.styling.DividerMetrics -import org.jetbrains.jewel.ui.component.styling.DividerStyle - -@Composable -public fun DividerStyle.Companion.light( - color: Color = IntUiLightTheme.colors.grey(12), - metrics: DividerMetrics = DividerMetrics.defaults(), -): DividerStyle = - DividerStyle(color, metrics) - -@Composable -public fun DividerStyle.Companion.dark( - color: Color = IntUiDarkTheme.colors.grey(1), - metrics: DividerMetrics = DividerMetrics.defaults(), -): DividerStyle = - DividerStyle(color, metrics) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDropdownStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDropdownStyling.kt deleted file mode 100644 index dc600cfd7a..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDropdownStyling.kt +++ /dev/null @@ -1,282 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.standalonePainterProvider -import org.jetbrains.jewel.intui.standalone.theme.defaultTextStyle -import org.jetbrains.jewel.ui.component.styling.DropdownColors -import org.jetbrains.jewel.ui.component.styling.DropdownIcons -import org.jetbrains.jewel.ui.component.styling.DropdownMetrics -import org.jetbrains.jewel.ui.component.styling.DropdownStyle -import org.jetbrains.jewel.ui.component.styling.MenuStyle -import org.jetbrains.jewel.ui.painter.PainterProvider - -public val DropdownStyle.Companion.Default: IntUiDefaultDropdownStyleFactory - get() = IntUiDefaultDropdownStyleFactory - -public object IntUiDefaultDropdownStyleFactory { - - @Composable - public fun light( - colors: DropdownColors = DropdownColors.Default.light(), - metrics: DropdownMetrics = DropdownMetrics.default(), - icons: DropdownIcons = DropdownIcons.defaults(), - textStyle: TextStyle = JewelTheme.defaultTextStyle, - menuStyle: MenuStyle = MenuStyle.light(), - ): DropdownStyle = - DropdownStyle(colors, metrics, icons, textStyle, menuStyle) - - @Composable - public fun dark( - colors: DropdownColors = DropdownColors.Default.dark(), - metrics: DropdownMetrics = DropdownMetrics.default(), - icons: DropdownIcons = DropdownIcons.defaults(), - textStyle: TextStyle = JewelTheme.defaultTextStyle, - menuStyle: MenuStyle = MenuStyle.dark(), - ): DropdownStyle = - DropdownStyle(colors, metrics, icons, textStyle, menuStyle) -} - -public val DropdownStyle.Companion.Undecorated: IntUiUndecoratedDropdownStyleFactory - get() = IntUiUndecoratedDropdownStyleFactory - -public object IntUiUndecoratedDropdownStyleFactory { - - @Composable - public fun light( - colors: DropdownColors = DropdownColors.Undecorated.light(), - metrics: DropdownMetrics = DropdownMetrics.undecorated(), - icons: DropdownIcons = DropdownIcons.defaults(), - textStyle: TextStyle = JewelTheme.defaultTextStyle, - menuStyle: MenuStyle = MenuStyle.light(), - ): DropdownStyle = - DropdownStyle(colors, metrics, icons, textStyle, menuStyle) - - @Composable - public fun dark( - colors: DropdownColors = DropdownColors.Undecorated.dark(), - metrics: DropdownMetrics = DropdownMetrics.undecorated(), - icons: DropdownIcons = DropdownIcons.defaults(), - textStyle: TextStyle = JewelTheme.defaultTextStyle, - menuStyle: MenuStyle = MenuStyle.dark(), - ): DropdownStyle = - DropdownStyle(colors, metrics, icons, textStyle, menuStyle) -} - -public val DropdownColors.Companion.Default: IntUiDefaultDropdownColorsFactory - get() = IntUiDefaultDropdownColorsFactory - -public object IntUiDefaultDropdownColorsFactory { - - @Composable - public fun light( - background: Color = IntUiLightTheme.colors.grey(14), - backgroundDisabled: Color = IntUiLightTheme.colors.grey(13), - backgroundFocused: Color = background, - backgroundPressed: Color = background, - backgroundHovered: Color = background, - content: Color = IntUiLightTheme.colors.grey(1), - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - border: Color = IntUiLightTheme.colors.grey(9), - borderDisabled: Color = IntUiLightTheme.colors.grey(11), - borderFocused: Color = IntUiLightTheme.colors.blue(4), - borderPressed: Color = border, - borderHovered: Color = border, - iconTint: Color = IntUiLightTheme.colors.grey(7), - iconTintDisabled: Color = IntUiLightTheme.colors.grey(9), - iconTintFocused: Color = iconTint, - iconTintPressed: Color = iconTint, - iconTintHovered: Color = iconTint, - ): DropdownColors = - DropdownColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - iconTint = iconTint, - iconTintDisabled = iconTintDisabled, - iconTintFocused = iconTintFocused, - iconTintPressed = iconTintPressed, - iconTintHovered = iconTintHovered, - ) - - @Composable - public fun dark( - background: Color = IntUiDarkTheme.colors.grey(2), - backgroundDisabled: Color = background, - backgroundFocused: Color = background, - backgroundPressed: Color = background, - backgroundHovered: Color = background, - content: Color = IntUiDarkTheme.colors.grey(12), - contentDisabled: Color = IntUiDarkTheme.colors.grey(7), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - border: Color = IntUiDarkTheme.colors.grey(5), - borderDisabled: Color = IntUiDarkTheme.colors.grey(5), - borderFocused: Color = IntUiDarkTheme.colors.blue(6), - borderPressed: Color = border, - borderHovered: Color = border, - iconTint: Color = IntUiDarkTheme.colors.grey(10), - iconTintDisabled: Color = IntUiDarkTheme.colors.grey(6), - iconTintFocused: Color = iconTint, - iconTintPressed: Color = iconTint, - iconTintHovered: Color = iconTint, - ): DropdownColors = - DropdownColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - iconTint = iconTint, - iconTintDisabled = iconTintDisabled, - iconTintFocused = iconTintFocused, - iconTintPressed = iconTintPressed, - iconTintHovered = iconTintHovered, - ) -} - -public val DropdownColors.Companion.Undecorated: IntUiUndecoratedDropdownColorsFactory - get() = IntUiUndecoratedDropdownColorsFactory - -public object IntUiUndecoratedDropdownColorsFactory { - - @Composable - public fun light( - background: Color = Color.Transparent, - backgroundDisabled: Color = background, - backgroundFocused: Color = background, - backgroundPressed: Color = IntUiLightTheme.colors.grey(14).copy(alpha = 0.1f), - backgroundHovered: Color = backgroundPressed, - content: Color = IntUiLightTheme.colors.grey(1), - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - iconTint: Color = IntUiLightTheme.colors.grey(7), - iconTintDisabled: Color = IntUiLightTheme.colors.grey(9), - iconTintFocused: Color = iconTint, - iconTintPressed: Color = iconTint, - iconTintHovered: Color = iconTint, - ): DropdownColors = - DropdownColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = Color.Transparent, - borderDisabled = Color.Transparent, - borderFocused = Color.Transparent, - borderPressed = Color.Transparent, - borderHovered = Color.Transparent, - iconTint = iconTint, - iconTintDisabled = iconTintDisabled, - iconTintFocused = iconTintFocused, - iconTintPressed = iconTintPressed, - iconTintHovered = iconTintHovered, - ) - - @Composable - public fun dark( - background: Color = Color.Transparent, - backgroundDisabled: Color = background, - backgroundFocused: Color = background, - backgroundPressed: Color = Color(0x0D000000), // Not a palette color - backgroundHovered: Color = backgroundPressed, - content: Color = IntUiDarkTheme.colors.grey(12), - contentDisabled: Color = IntUiDarkTheme.colors.grey(7), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - iconTint: Color = IntUiDarkTheme.colors.grey(10), - iconTintDisabled: Color = IntUiDarkTheme.colors.grey(6), - iconTintFocused: Color = iconTint, - iconTintPressed: Color = iconTint, - iconTintHovered: Color = iconTint, - ): DropdownColors = - DropdownColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = Color.Transparent, - borderDisabled = Color.Transparent, - borderFocused = Color.Transparent, - borderPressed = Color.Transparent, - borderHovered = Color.Transparent, - iconTint = iconTint, - iconTintDisabled = iconTintDisabled, - iconTintFocused = iconTintFocused, - iconTintPressed = iconTintPressed, - iconTintHovered = iconTintHovered, - ) -} - -public fun DropdownMetrics.Companion.default( - arrowMinSize: DpSize = DpSize((23 + 3).dp, 24.dp), - minSize: DpSize = DpSize((49 + 23 + 6).dp, 24.dp), - cornerSize: CornerSize = CornerSize(4.dp), - contentPadding: PaddingValues = PaddingValues(horizontal = 6.dp, vertical = 3.dp), - borderWidth: Dp = 1.dp, -): DropdownMetrics = - DropdownMetrics(arrowMinSize, minSize, cornerSize, contentPadding, borderWidth) - -public fun DropdownMetrics.Companion.undecorated( - arrowMinSize: DpSize = DpSize((23 + 3).dp, 24.dp), - minSize: DpSize = DpSize((49 + 23 + 6).dp, 24.dp), - cornerSize: CornerSize = CornerSize(4.dp), - contentPadding: PaddingValues = PaddingValues(horizontal = 6.dp, vertical = 3.dp), - borderWidth: Dp = 0.dp, -): DropdownMetrics = - DropdownMetrics(arrowMinSize, minSize, cornerSize, contentPadding, borderWidth) - -public fun DropdownIcons.Companion.defaults( - chevronDown: PainterProvider = standalonePainterProvider("expui/general/chevronDown.svg"), -): DropdownIcons = - DropdownIcons(chevronDown) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiGroupHeaderStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiGroupHeaderStyling.kt deleted file mode 100644 index f5431e6e71..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiGroupHeaderStyling.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.ui.component.styling.GroupHeaderColors -import org.jetbrains.jewel.ui.component.styling.GroupHeaderMetrics -import org.jetbrains.jewel.ui.component.styling.GroupHeaderStyle - -@Composable -public fun GroupHeaderStyle.Companion.light( - colors: GroupHeaderColors = GroupHeaderColors.light(), - metrics: GroupHeaderMetrics = GroupHeaderMetrics.defaults(), -): GroupHeaderStyle = - GroupHeaderStyle(colors, metrics) - -@Composable -public fun GroupHeaderStyle.Companion.dark( - colors: GroupHeaderColors = GroupHeaderColors.dark(), - metrics: GroupHeaderMetrics = GroupHeaderMetrics.defaults(), -): GroupHeaderStyle = - GroupHeaderStyle(colors, metrics) - -@Composable -public fun GroupHeaderColors.Companion.light( - divider: Color = IntUiLightTheme.colors.grey(12), -): GroupHeaderColors = - GroupHeaderColors(divider) - -@Composable -public fun GroupHeaderColors.Companion.dark( - divider: Color = IntUiDarkTheme.colors.grey(3), -): GroupHeaderColors = - GroupHeaderColors(divider) - -public fun GroupHeaderMetrics.Companion.defaults( - dividerThickness: Dp = 1.dp, - indent: Dp = 8.dp, -): GroupHeaderMetrics = - GroupHeaderMetrics(dividerThickness, indent) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiHorizontalProgressBarStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiHorizontalProgressBarStyling.kt deleted file mode 100644 index a935bc8196..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiHorizontalProgressBarStyling.kt +++ /dev/null @@ -1,65 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.ui.component.styling.HorizontalProgressBarColors -import org.jetbrains.jewel.ui.component.styling.HorizontalProgressBarMetrics -import org.jetbrains.jewel.ui.component.styling.HorizontalProgressBarStyle -import kotlin.time.Duration -import kotlin.time.Duration.Companion.milliseconds - -@Composable -public fun HorizontalProgressBarStyle.Companion.light( - colors: HorizontalProgressBarColors = HorizontalProgressBarColors.light(), - metrics: HorizontalProgressBarMetrics = HorizontalProgressBarMetrics.defaults(), - indeterminateCycleDuration: Duration = 800.milliseconds, -): HorizontalProgressBarStyle = - HorizontalProgressBarStyle(colors, metrics, indeterminateCycleDuration) - -@Composable -public fun HorizontalProgressBarStyle.Companion.dark( - colors: HorizontalProgressBarColors = HorizontalProgressBarColors.dark(), - metrics: HorizontalProgressBarMetrics = HorizontalProgressBarMetrics.defaults(), - indeterminateCycleDuration: Duration = 800.milliseconds, -): HorizontalProgressBarStyle = - HorizontalProgressBarStyle(colors, metrics, indeterminateCycleDuration) - -@Composable -public fun HorizontalProgressBarColors.Companion.light( - track: Color = IntUiLightTheme.colors.grey(11), - progress: Color = IntUiLightTheme.colors.blue(4), - indeterminateBase: Color = IntUiLightTheme.colors.blue(9), - indeterminateHighlight: Color = IntUiLightTheme.colors.blue(4), -): HorizontalProgressBarColors = - HorizontalProgressBarColors( - track = track, - progress = progress, - indeterminateBase = indeterminateBase, - indeterminateHighlight = indeterminateHighlight, - ) - -@Composable -public fun HorizontalProgressBarColors.Companion.dark( - track: Color = IntUiDarkTheme.colors.grey(4), - progress: Color = IntUiDarkTheme.colors.blue(7), - indeterminateBase: Color = IntUiDarkTheme.colors.blue(9), - indeterminateHighlight: Color = IntUiDarkTheme.colors.blue(5), -): HorizontalProgressBarColors = - HorizontalProgressBarColors( - track = track, - progress = progress, - indeterminateBase = indeterminateBase, - indeterminateHighlight = indeterminateHighlight, - ) - -public fun HorizontalProgressBarMetrics.Companion.defaults( - cornerSize: CornerSize = CornerSize(100), - minHeight: Dp = 4.dp, - indeterminateHighlightWidth: Dp = 140.dp, -): HorizontalProgressBarMetrics = - HorizontalProgressBarMetrics(cornerSize, minHeight, indeterminateHighlightWidth) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiIconButtonStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiIconButtonStyling.kt deleted file mode 100644 index 4ecae089bd..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiIconButtonStyling.kt +++ /dev/null @@ -1,108 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.ui.component.styling.IconButtonColors -import org.jetbrains.jewel.ui.component.styling.IconButtonMetrics -import org.jetbrains.jewel.ui.component.styling.IconButtonStyle - -@Composable -public fun IconButtonStyle.Companion.light( - colors: IconButtonColors = IconButtonColors.light(), - metrics: IconButtonMetrics = IconButtonMetrics.defaults(), -): IconButtonStyle = - IconButtonStyle(colors, metrics) - -@Composable -public fun IconButtonStyle.Companion.dark( - colors: IconButtonColors = IconButtonColors.dark(), - metrics: IconButtonMetrics = IconButtonMetrics.defaults(), -): IconButtonStyle = - IconButtonStyle(colors, metrics) - -@Composable -public fun IconButtonColors.Companion.light( - foregroundSelectedActivated: Color = IntUiLightTheme.colors.grey(14), - background: Color = Color.Unspecified, - backgroundDisabled: Color = background, - backgroundSelected: Color = IntUiLightTheme.colors.grey(11), - backgroundSelectedActivated: Color = IntUiLightTheme.colors.blue(4), - backgroundFocused: Color = background, - backgroundPressed: Color = IntUiLightTheme.colors.grey(11), - backgroundHovered: Color = IntUiLightTheme.colors.grey(12), - border: Color = background, - borderDisabled: Color = backgroundDisabled, - borderSelected: Color = backgroundSelected, - borderSelectedActivated: Color = backgroundSelectedActivated, - borderFocused: Color = backgroundFocused, - borderPressed: Color = backgroundPressed, - borderHovered: Color = backgroundHovered, -): IconButtonColors = - IconButtonColors( - foregroundSelectedActivated = foregroundSelectedActivated, - background = background, - backgroundDisabled = backgroundDisabled, - backgroundSelected = backgroundSelected, - backgroundSelectedActivated = backgroundSelectedActivated, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - border = border, - borderDisabled = borderDisabled, - borderSelected = borderSelected, - borderSelectedActivated = borderSelectedActivated, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - ) - -@Composable -public fun IconButtonColors.Companion.dark( - foregroundSelectedActivated: Color = IntUiDarkTheme.colors.grey(14), - background: Color = Color.Unspecified, - backgroundDisabled: Color = background, - backgroundSelected: Color = IntUiDarkTheme.colors.grey(5), - backgroundSelectedActivated: Color = IntUiDarkTheme.colors.blue(6), - backgroundFocused: Color = background, - backgroundPressed: Color = IntUiDarkTheme.colors.grey(5), - backgroundHovered: Color = IntUiDarkTheme.colors.grey(3), - border: Color = background, - borderDisabled: Color = backgroundDisabled, - borderSelected: Color = backgroundSelected, - borderSelectedActivated: Color = backgroundSelectedActivated, - borderFocused: Color = backgroundFocused, - borderPressed: Color = backgroundPressed, - borderHovered: Color = backgroundHovered, -): IconButtonColors = - IconButtonColors( - foregroundSelectedActivated = foregroundSelectedActivated, - background = background, - backgroundDisabled = backgroundDisabled, - backgroundSelected = backgroundSelected, - backgroundSelectedActivated = backgroundSelectedActivated, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - border = border, - borderDisabled = borderDisabled, - borderSelected = borderSelected, - borderSelectedActivated = borderSelectedActivated, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - ) - -public fun IconButtonMetrics.Companion.defaults( - cornerSize: CornerSize = CornerSize(4.dp), - borderWidth: Dp = 1.dp, - padding: PaddingValues = PaddingValues(0.dp), - minSize: DpSize = DpSize(16.dp, 16.dp), -): IconButtonMetrics = - IconButtonMetrics(cornerSize, borderWidth, padding, minSize) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLazyTreeStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLazyTreeStyling.kt deleted file mode 100644 index 2f9981996f..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLazyTreeStyling.kt +++ /dev/null @@ -1,102 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.standalonePainterProvider -import org.jetbrains.jewel.ui.component.styling.LazyTreeColors -import org.jetbrains.jewel.ui.component.styling.LazyTreeIcons -import org.jetbrains.jewel.ui.component.styling.LazyTreeMetrics -import org.jetbrains.jewel.ui.component.styling.LazyTreeStyle -import org.jetbrains.jewel.ui.painter.PainterProvider - -@Composable -public fun LazyTreeStyle.Companion.light( - colors: LazyTreeColors = LazyTreeColors.light(), - metrics: LazyTreeMetrics = LazyTreeMetrics.defaults(), - icons: LazyTreeIcons = LazyTreeIcons.defaults(), -): LazyTreeStyle = - LazyTreeStyle(colors, metrics, icons) - -@Composable -public fun LazyTreeStyle.Companion.dark( - colors: LazyTreeColors = LazyTreeColors.dark(), - metrics: LazyTreeMetrics = LazyTreeMetrics.defaults(), - icons: LazyTreeIcons = LazyTreeIcons.defaults(), -): LazyTreeStyle = - LazyTreeStyle(colors, metrics, icons) - -@Composable -public fun LazyTreeColors.Companion.light( - content: Color = Color.Unspecified, - contentFocused: Color = content, - contentSelected: Color = content, - contentSelectedFocused: Color = content, - nodeBackgroundFocused: Color = Color.Unspecified, - nodeBackgroundSelected: Color = IntUiLightTheme.colors.grey(11), - nodeBackgroundSelectedFocused: Color = IntUiLightTheme.colors.blue(11), -): LazyTreeColors = - LazyTreeColors( - elementBackgroundFocused = nodeBackgroundFocused, - elementBackgroundSelected = nodeBackgroundSelected, - elementBackgroundSelectedFocused = nodeBackgroundSelectedFocused, - content = content, - contentFocused = contentFocused, - contentSelected = contentSelected, - contentSelectedFocused = contentSelectedFocused, - ) - -@Composable -public fun LazyTreeColors.Companion.dark( - content: Color = Color.Unspecified, - contentFocused: Color = content, - contentSelected: Color = content, - contentSelectedFocused: Color = content, - nodeBackgroundFocused: Color = Color.Unspecified, - nodeBackgroundSelected: Color = IntUiDarkTheme.colors.grey(4), - nodeBackgroundSelectedFocused: Color = IntUiDarkTheme.colors.blue(2), -): LazyTreeColors = - LazyTreeColors( - elementBackgroundFocused = nodeBackgroundFocused, - elementBackgroundSelected = nodeBackgroundSelected, - elementBackgroundSelectedFocused = nodeBackgroundSelectedFocused, - content = content, - contentFocused = contentFocused, - contentSelected = contentSelected, - contentSelectedFocused = contentSelectedFocused, - ) - -public fun LazyTreeMetrics.Companion.defaults( - indentSize: Dp = 7.dp + 16.dp, - elementBackgroundCornerSize: CornerSize = CornerSize(2.dp), - elementPadding: PaddingValues = PaddingValues(horizontal = 12.dp), - elementContentPadding: PaddingValues = PaddingValues(4.dp), - elementMinHeight: Dp = 24.dp, - chevronContentGap: Dp = 2.dp, -): LazyTreeMetrics = - LazyTreeMetrics( - indentSize, - elementBackgroundCornerSize, - elementPadding, - elementContentPadding, - elementMinHeight, - chevronContentGap, - ) - -public fun LazyTreeIcons.Companion.defaults( - chevronCollapsed: PainterProvider = standalonePainterProvider("expui/general/chevronRight.svg"), - chevronExpanded: PainterProvider = standalonePainterProvider("expui/general/chevronDown.svg"), - chevronSelectedCollapsed: PainterProvider = chevronCollapsed, - chevronSelectedExpanded: PainterProvider = chevronExpanded, -): LazyTreeIcons = - LazyTreeIcons( - chevronCollapsed, - chevronExpanded, - chevronSelectedCollapsed, - chevronSelectedExpanded, - ) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLinkStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLinkStyling.kt deleted file mode 100644 index 4e06d48fef..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLinkStyling.kt +++ /dev/null @@ -1,110 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.style.TextDecoration -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.standalonePainterProvider -import org.jetbrains.jewel.intui.standalone.theme.defaultTextStyle -import org.jetbrains.jewel.ui.component.styling.LinkColors -import org.jetbrains.jewel.ui.component.styling.LinkIcons -import org.jetbrains.jewel.ui.component.styling.LinkMetrics -import org.jetbrains.jewel.ui.component.styling.LinkStyle -import org.jetbrains.jewel.ui.component.styling.LinkTextStyles -import org.jetbrains.jewel.ui.painter.PainterProvider - -@Composable -public fun LinkStyle.Companion.light( - colors: LinkColors = LinkColors.light(), - metrics: LinkMetrics = LinkMetrics.defaults(), - icons: LinkIcons = LinkIcons.defaults(), - textStyles: LinkTextStyles = LinkTextStyles.light(), -): LinkStyle = - LinkStyle(colors, metrics, icons, textStyles) - -@Composable -public fun LinkStyle.Companion.dark( - colors: LinkColors = LinkColors.dark(), - metrics: LinkMetrics = LinkMetrics.defaults(), - icons: LinkIcons = LinkIcons.defaults(), - textStyles: LinkTextStyles = LinkTextStyles.dark(), -): LinkStyle = - LinkStyle(colors, metrics, icons, textStyles) - -@Composable -public fun LinkColors.Companion.light( - content: Color = IntUiLightTheme.colors.blue(2), - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - contentVisited: Color = content, -): LinkColors = - LinkColors( - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentVisited = contentVisited, - ) - -@Composable -public fun LinkColors.Companion.dark( - content: Color = IntUiDarkTheme.colors.blue(9), - contentDisabled: Color = IntUiDarkTheme.colors.grey(7), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - contentVisited: Color = content, -): LinkColors = - LinkColors( - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentVisited = contentVisited, - ) - -public fun LinkMetrics.Companion.defaults( - focusHaloCornerSize: CornerSize = CornerSize(2.dp), - textIconGap: Dp = 0.dp, - iconSize: DpSize = DpSize(16.dp, 16.dp), -): LinkMetrics = - LinkMetrics(focusHaloCornerSize, textIconGap, iconSize) - -public fun LinkIcons.Companion.defaults( - dropdownChevron: PainterProvider = standalonePainterProvider("expui/general/chevronDown.svg"), - externalLink: PainterProvider = standalonePainterProvider("expui/ide/externalLink.svg"), -): LinkIcons = - LinkIcons(dropdownChevron, externalLink) - -@Composable -public fun LinkTextStyles.Companion.light( - normal: TextStyle = JewelTheme.defaultTextStyle.copy(textDecoration = TextDecoration.Underline), - disabled: TextStyle = JewelTheme.defaultTextStyle, - focused: TextStyle = normal, - pressed: TextStyle = normal, - hovered: TextStyle = normal, - visited: TextStyle = normal, -): LinkTextStyles = - LinkTextStyles(normal, disabled, focused, pressed, hovered, visited) - -@Composable -public fun LinkTextStyles.Companion.dark( - normal: TextStyle = JewelTheme.defaultTextStyle.copy(textDecoration = TextDecoration.Underline), - disabled: TextStyle = JewelTheme.defaultTextStyle, - focused: TextStyle = normal, - pressed: TextStyle = normal, - hovered: TextStyle = normal, - visited: TextStyle = normal, -): LinkTextStyles = - LinkTextStyles(normal, disabled, focused, pressed, hovered, visited) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiMenuStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiMenuStyling.kt deleted file mode 100644 index baeba77238..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiMenuStyling.kt +++ /dev/null @@ -1,210 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpOffset -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.standalonePainterProvider -import org.jetbrains.jewel.ui.component.styling.MenuColors -import org.jetbrains.jewel.ui.component.styling.MenuIcons -import org.jetbrains.jewel.ui.component.styling.MenuItemColors -import org.jetbrains.jewel.ui.component.styling.MenuItemMetrics -import org.jetbrains.jewel.ui.component.styling.MenuMetrics -import org.jetbrains.jewel.ui.component.styling.MenuStyle -import org.jetbrains.jewel.ui.component.styling.SubmenuMetrics -import org.jetbrains.jewel.ui.painter.PainterProvider - -@Composable -public fun MenuStyle.Companion.light( - colors: MenuColors = MenuColors.light(), - metrics: MenuMetrics = MenuMetrics.defaults(), - icons: MenuIcons = MenuIcons.defaults(), -): MenuStyle = - MenuStyle(isDark = false, colors, metrics, icons) - -@Composable -public fun MenuStyle.Companion.dark( - colors: MenuColors = MenuColors.dark(), - metrics: MenuMetrics = MenuMetrics.defaults(), - icons: MenuIcons = MenuIcons.defaults(), -): MenuStyle = - MenuStyle(isDark = true, colors, metrics, icons) - -@Composable -public fun MenuColors.Companion.light( - background: Color = IntUiLightTheme.colors.grey(14), - border: Color = IntUiLightTheme.colors.grey(9), - shadow: Color = Color(0x78919191), // Not a palette color - itemColors: MenuItemColors = MenuItemColors.light(), -): MenuColors = - MenuColors( - background = background, - border = border, - shadow = shadow, - itemColors = itemColors, - ) - -@Composable -public fun MenuColors.Companion.dark( - background: Color = IntUiDarkTheme.colors.grey(2), - border: Color = IntUiDarkTheme.colors.grey(3), - shadow: Color = Color(0x66000000), // Not a palette color - itemColors: MenuItemColors = MenuItemColors.dark(), -): MenuColors = - MenuColors( - background = background, - border = border, - shadow = shadow, - itemColors = itemColors, - ) - -@Composable -public fun MenuItemColors.Companion.light( - background: Color = IntUiLightTheme.colors.grey(14), - backgroundDisabled: Color = IntUiLightTheme.colors.grey(14), - backgroundFocused: Color = IntUiLightTheme.colors.blue(11), - backgroundPressed: Color = background, - backgroundHovered: Color = backgroundFocused, - content: Color = IntUiLightTheme.colors.grey(1), - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - iconTint: Color = IntUiLightTheme.colors.grey(7), - iconTintDisabled: Color = iconTint, - iconTintFocused: Color = iconTint, - iconTintPressed: Color = iconTint, - iconTintHovered: Color = iconTint, - keybindingTint: Color = IntUiLightTheme.colors.grey(8), - keybindingTintDisabled: Color = keybindingTint, - keybindingTintFocused: Color = IntUiLightTheme.colors.grey(1), - keybindingTintPressed: Color = keybindingTintFocused, - keybindingTintHovered: Color = keybindingTintFocused, - separator: Color = IntUiLightTheme.colors.grey(12), -): MenuItemColors = - MenuItemColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - iconTint = iconTint, - iconTintDisabled = iconTintDisabled, - iconTintFocused = iconTintFocused, - iconTintPressed = iconTintPressed, - iconTintHovered = iconTintHovered, - keybindingTint = keybindingTint, - keybindingTintDisabled = keybindingTintDisabled, - keybindingTintFocused = keybindingTintFocused, - keybindingTintPressed = keybindingTintPressed, - keybindingTintHovered = keybindingTintHovered, - separator = separator, - ) - -@Composable -public fun MenuItemColors.Companion.dark( - background: Color = IntUiDarkTheme.colors.grey(2), - backgroundDisabled: Color = IntUiDarkTheme.colors.grey(2), - backgroundFocused: Color = IntUiDarkTheme.colors.blue(2), - backgroundPressed: Color = background, - backgroundHovered: Color = backgroundFocused, - content: Color = IntUiDarkTheme.colors.grey(12), - contentDisabled: Color = IntUiDarkTheme.colors.grey(7), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - iconTint: Color = IntUiDarkTheme.colors.grey(10), - iconTintDisabled: Color = iconTint, - iconTintFocused: Color = iconTint, - iconTintPressed: Color = iconTint, - iconTintHovered: Color = iconTint, - keybindingTint: Color = IntUiDarkTheme.colors.grey(7), - keybindingTintDisabled: Color = keybindingTint, - keybindingTintFocused: Color = IntUiDarkTheme.colors.grey(12), - keybindingTintPressed: Color = keybindingTintFocused, - keybindingTintHovered: Color = keybindingTintFocused, - separator: Color = IntUiDarkTheme.colors.grey(3), -): MenuItemColors = - MenuItemColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - iconTint = iconTint, - iconTintDisabled = iconTintDisabled, - iconTintFocused = iconTintFocused, - iconTintPressed = iconTintPressed, - iconTintHovered = iconTintHovered, - separator = separator, - keybindingTint = keybindingTint, - keybindingTintDisabled = keybindingTintDisabled, - keybindingTintFocused = keybindingTintFocused, - keybindingTintPressed = keybindingTintPressed, - keybindingTintHovered = keybindingTintHovered, - ) - -public fun MenuMetrics.Companion.defaults( - cornerSize: CornerSize = CornerSize(8.dp), - menuMargin: PaddingValues = PaddingValues(vertical = 6.dp), - contentPadding: PaddingValues = PaddingValues(vertical = 8.dp), - offset: DpOffset = DpOffset((-6).dp, 2.dp), - shadowSize: Dp = 12.dp, - borderWidth: Dp = 1.dp, - itemMetrics: MenuItemMetrics = MenuItemMetrics.defaults(), - submenuMetrics: SubmenuMetrics = SubmenuMetrics.defaults(), -): MenuMetrics = - MenuMetrics( - cornerSize, - menuMargin, - contentPadding, - offset, - shadowSize, - borderWidth, - itemMetrics, - submenuMetrics, - ) - -public fun MenuItemMetrics.Companion.defaults( - selectionCornerSize: CornerSize = CornerSize(4.dp), - outerPadding: PaddingValues = PaddingValues(horizontal = 6.dp), - contentPadding: PaddingValues = PaddingValues(horizontal = 10.dp, vertical = 4.dp), - separatorPadding: PaddingValues = PaddingValues(horizontal = 12.dp, vertical = 4.dp), - keybindingsPadding: PaddingValues = PaddingValues(start = 36.dp), - separatorThickness: Dp = 1.dp, - iconSize: Dp = 16.dp, -): MenuItemMetrics = - MenuItemMetrics( - selectionCornerSize, - outerPadding, - contentPadding, - separatorPadding, - keybindingsPadding, - separatorThickness, - iconSize, - ) - -public fun SubmenuMetrics.Companion.defaults( - offset: DpOffset = DpOffset(0.dp, (-8).dp), -): SubmenuMetrics = - SubmenuMetrics(offset) - -public fun MenuIcons.Companion.defaults( - submenuChevron: PainterProvider = standalonePainterProvider("expui/general/chevronRight.svg"), -): MenuIcons = - MenuIcons(submenuChevron) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiRadioButtonStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiRadioButtonStyling.kt deleted file mode 100644 index 0f683234ce..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiRadioButtonStyling.kt +++ /dev/null @@ -1,85 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.standalonePainterProvider -import org.jetbrains.jewel.ui.component.styling.RadioButtonColors -import org.jetbrains.jewel.ui.component.styling.RadioButtonIcons -import org.jetbrains.jewel.ui.component.styling.RadioButtonMetrics -import org.jetbrains.jewel.ui.component.styling.RadioButtonStyle -import org.jetbrains.jewel.ui.painter.PainterProvider - -@Composable -public fun RadioButtonStyle.Companion.light( - colors: RadioButtonColors = RadioButtonColors.light(), - metrics: RadioButtonMetrics = RadioButtonMetrics.defaults(), - icons: RadioButtonIcons = RadioButtonIcons.light(), -): RadioButtonStyle = - RadioButtonStyle(colors, metrics, icons) - -@Composable -public fun RadioButtonStyle.Companion.dark( - colors: RadioButtonColors = RadioButtonColors.dark(), - metrics: RadioButtonMetrics = RadioButtonMetrics.defaults(), - icons: RadioButtonIcons = RadioButtonIcons.dark(), -): RadioButtonStyle = - RadioButtonStyle(colors, metrics, icons) - -@Composable -public fun RadioButtonColors.Companion.light( - content: Color = Color.Unspecified, - contentHovered: Color = content, - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentSelected: Color = content, - contentSelectedHovered: Color = content, - contentSelectedDisabled: Color = contentDisabled, -): RadioButtonColors = - RadioButtonColors( - content = content, - contentHovered = contentHovered, - contentDisabled = contentDisabled, - contentSelected = contentSelected, - contentSelectedHovered = contentSelectedHovered, - contentSelectedDisabled = contentSelectedDisabled, - ) - -@Composable -public fun RadioButtonColors.Companion.dark( - content: Color = Color.Unspecified, - contentHovered: Color = content, - contentDisabled: Color = IntUiDarkTheme.colors.grey(8), - contentSelected: Color = content, - contentSelectedHovered: Color = content, - contentSelectedDisabled: Color = contentDisabled, -): RadioButtonColors = - RadioButtonColors( - content = content, - contentHovered = contentHovered, - contentDisabled = contentDisabled, - contentSelected = contentSelected, - contentSelectedHovered = contentSelectedHovered, - contentSelectedDisabled = contentSelectedDisabled, - ) - -public fun RadioButtonMetrics.Companion.defaults( - radioButtonSize: DpSize = DpSize(19.dp, 19.dp), - iconContentGap: Dp = 8.dp, -): RadioButtonMetrics = - RadioButtonMetrics(radioButtonSize, iconContentGap) - -public fun RadioButtonIcons.Companion.light( - radioButton: PainterProvider = - standalonePainterProvider("com/intellij/ide/ui/laf/icons/intellij/radio.svg"), -): RadioButtonIcons = - RadioButtonIcons(radioButton) - -public fun RadioButtonIcons.Companion.dark( - radioButton: PainterProvider = - standalonePainterProvider("com/intellij/ide/ui/laf/icons/darcula/radio.svg"), -): RadioButtonIcons = - RadioButtonIcons(radioButton) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiScrollbarStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiScrollbarStyling.kt deleted file mode 100644 index f55ccf83c9..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiScrollbarStyling.kt +++ /dev/null @@ -1,51 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.ui.component.styling.ScrollbarColors -import org.jetbrains.jewel.ui.component.styling.ScrollbarMetrics -import org.jetbrains.jewel.ui.component.styling.ScrollbarStyle -import kotlin.time.Duration -import kotlin.time.Duration.Companion.milliseconds - -@Composable -public fun ScrollbarStyle.Companion.light( - colors: ScrollbarColors = ScrollbarColors.light(), - metrics: ScrollbarMetrics = ScrollbarMetrics.defaults(), - hoverDuration: Duration = 300.milliseconds, -): ScrollbarStyle = - ScrollbarStyle(colors, metrics, hoverDuration) - -@Composable -public fun ScrollbarStyle.Companion.dark( - colors: ScrollbarColors = ScrollbarColors.dark(), - metrics: ScrollbarMetrics = ScrollbarMetrics.defaults(), - hoverDuration: Duration = 300.milliseconds, -): ScrollbarStyle = - ScrollbarStyle(colors, metrics, hoverDuration) - -@Composable -public fun ScrollbarColors.Companion.light( - thumbBackground: Color = Color(0x33000000), - thumbBackgroundHovered: Color = Color(0x80000000), -): ScrollbarColors = - ScrollbarColors(thumbBackground, thumbBackgroundHovered) - -@Composable -public fun ScrollbarColors.Companion.dark( - thumbBackground: Color = Color(0x59808080), - thumbBackgroundHovered: Color = Color(0x8C808080), -): ScrollbarColors = - ScrollbarColors(thumbBackground, thumbBackgroundHovered) - -public fun ScrollbarMetrics.Companion.defaults( - thumbCornerSize: CornerSize = CornerSize(100), - thumbThickness: Dp = 8.dp, - minThumbLength: Dp = 16.dp, - trackPadding: PaddingValues = PaddingValues(start = 7.dp, end = 3.dp), -): ScrollbarMetrics = - ScrollbarMetrics(thumbCornerSize, thumbThickness, minThumbLength, trackPadding) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiSliderStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiSliderStyling.kt deleted file mode 100644 index f7b5f8a537..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiSliderStyling.kt +++ /dev/null @@ -1,109 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.shape.CircleShape -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.Shape -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.ui.component.styling.SliderColors -import org.jetbrains.jewel.ui.component.styling.SliderMetrics -import org.jetbrains.jewel.ui.component.styling.SliderStyle - -@Composable -public fun SliderStyle.Companion.light( - colors: SliderColors = SliderColors.light(), - metrics: SliderMetrics = SliderMetrics.defaults(), - thumbShape: Shape = CircleShape, -): SliderStyle = SliderStyle(colors, metrics, thumbShape) - -@Composable -public fun SliderStyle.Companion.dark( - colors: SliderColors = SliderColors.dark(), - metrics: SliderMetrics = SliderMetrics.defaults(), - thumbShape: Shape = CircleShape, -): SliderStyle = SliderStyle(colors, metrics, thumbShape) - -@Composable -public fun SliderColors.Companion.light( - track: Color = IntUiLightTheme.colors.grey(10), - trackFilled: Color = IntUiLightTheme.colors.blue(6), - trackDisabled: Color = IntUiLightTheme.colors.grey(12), - trackFilledDisabled: Color = IntUiLightTheme.colors.grey(11), - stepMarker: Color = track, - thumbFill: Color = IntUiLightTheme.colors.grey(14), - thumbFillDisabled: Color = thumbFill, - thumbFillFocused: Color = thumbFill, - thumbFillPressed: Color = thumbFill, - thumbFillHovered: Color = thumbFill, - thumbBorder: Color = IntUiLightTheme.colors.grey(8), - thumbBorderFocused: Color = IntUiLightTheme.colors.blue(4), - thumbBorderDisabled: Color = IntUiLightTheme.colors.grey(11), - thumbBorderPressed: Color = IntUiLightTheme.colors.grey(7), - thumbBorderHovered: Color = IntUiLightTheme.colors.grey(9), -): SliderColors = SliderColors( - track, - trackFilled, - trackDisabled, - trackFilledDisabled, - stepMarker, - thumbFill, - thumbFillDisabled, - thumbFillFocused, - thumbFillPressed, - thumbFillHovered, - thumbBorder, - thumbBorderFocused, - thumbBorderDisabled, - thumbBorderPressed, - thumbBorderHovered, -) - -@Composable -public fun SliderColors.Companion.dark( - track: Color = IntUiDarkTheme.colors.grey(4), - trackFilled: Color = IntUiDarkTheme.colors.blue(7), - trackDisabled: Color = IntUiDarkTheme.colors.grey(3), - trackFilledDisabled: Color = IntUiDarkTheme.colors.grey(4), - stepMarker: Color = track, - thumbFill: Color = IntUiDarkTheme.colors.grey(2), - thumbFillDisabled: Color = IntUiDarkTheme.colors.grey(3), - thumbFillFocused: Color = thumbFill, - thumbFillPressed: Color = thumbFill, - thumbFillHovered: Color = thumbFill, - thumbBorder: Color = IntUiDarkTheme.colors.grey(7), - thumbBorderFocused: Color = IntUiDarkTheme.colors.blue(6), - thumbBorderDisabled: Color = IntUiDarkTheme.colors.grey(5), - thumbBorderPressed: Color = IntUiDarkTheme.colors.grey(8), - thumbBorderHovered: Color = IntUiDarkTheme.colors.grey(9), -): SliderColors = SliderColors( - track, - trackFilled, - trackDisabled, - trackFilledDisabled, - stepMarker, - thumbFill, - thumbFillDisabled, - thumbFillFocused, - thumbFillPressed, - thumbFillHovered, - thumbBorder, - thumbBorderFocused, - thumbBorderDisabled, - thumbBorderPressed, - thumbBorderHovered, -) - -@Composable -public fun SliderMetrics.Companion.defaults( - trackHeight: Dp = 4.dp, - thumbSize: DpSize = DpSize(14.dp, 14.dp), - thumbBorderWidth: Dp = 1.dp, - stepLineHeight: Dp = 8.dp, - stepLineWidth: Dp = 1.dp, - trackToStepSpacing: Dp = thumbSize.height / 2 + 4.dp, -): SliderMetrics = - SliderMetrics(trackHeight, thumbSize, thumbBorderWidth, stepLineHeight, stepLineWidth, trackToStepSpacing) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTabStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTabStyling.kt deleted file mode 100644 index 89e05bcab6..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTabStyling.kt +++ /dev/null @@ -1,280 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.standalonePainterProvider -import org.jetbrains.jewel.ui.component.styling.TabColors -import org.jetbrains.jewel.ui.component.styling.TabContentAlpha -import org.jetbrains.jewel.ui.component.styling.TabIcons -import org.jetbrains.jewel.ui.component.styling.TabMetrics -import org.jetbrains.jewel.ui.component.styling.TabStyle -import org.jetbrains.jewel.ui.painter.PainterProvider - -public val TabStyle.Companion.Default: IntUiDefaultTabStyleFactory - get() = IntUiDefaultTabStyleFactory - -public object IntUiDefaultTabStyleFactory { - - @Composable - public fun light( - colors: TabColors = TabColors.Default.light(), - metrics: TabMetrics = TabMetrics.defaults(), - icons: TabIcons = TabIcons.defaults(), - contentAlpha: TabContentAlpha = TabContentAlpha.default(), - ): TabStyle = - TabStyle(colors, metrics, icons, contentAlpha) - - @Composable - public fun dark( - colors: TabColors = TabColors.Default.dark(), - metrics: TabMetrics = TabMetrics.defaults(), - icons: TabIcons = TabIcons.defaults(), - contentAlpha: TabContentAlpha = TabContentAlpha.default(), - ): TabStyle = - TabStyle(colors, metrics, icons, contentAlpha) -} - -public val TabStyle.Companion.Editor: IntUiEditorTabStyleFactory - get() = IntUiEditorTabStyleFactory - -public object IntUiEditorTabStyleFactory { - - @Composable - public fun light( - colors: TabColors = TabColors.Editor.light(), - metrics: TabMetrics = TabMetrics.defaults(), - icons: TabIcons = TabIcons.defaults(), - contentAlpha: TabContentAlpha = TabContentAlpha.editor(), - ): TabStyle = - TabStyle(colors, metrics, icons, contentAlpha) - - @Composable - public fun dark( - colors: TabColors = TabColors.Editor.dark(), - metrics: TabMetrics = TabMetrics.defaults(), - icons: TabIcons = TabIcons.defaults(), - contentAlpha: TabContentAlpha = TabContentAlpha.editor(), - ): TabStyle = - TabStyle(colors, metrics, icons, contentAlpha) -} - -public val TabColors.Companion.Default: IntUiDefaultTabColorsFactory - get() = IntUiDefaultTabColorsFactory - -public object IntUiDefaultTabColorsFactory { - - public fun light( - background: Color = IntUiLightTheme.colors.grey(14), - backgroundHovered: Color = IntUiLightTheme.colors.grey(12), - backgroundPressed: Color = backgroundHovered, - backgroundSelected: Color = background, - backgroundDisabled: Color = background, - content: Color = IntUiLightTheme.colors.grey(1), - contentHovered: Color = content, - contentDisabled: Color = content, - contentPressed: Color = content, - contentSelected: Color = content, - underline: Color = Color.Unspecified, - underlineHovered: Color = underline, - underlineDisabled: Color = underline, - underlinePressed: Color = underline, - underlineSelected: Color = IntUiLightTheme.colors.blue(4), - ): TabColors = - TabColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - backgroundSelected = backgroundSelected, - content = content, - contentDisabled = contentDisabled, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentSelected = contentSelected, - underline = underline, - underlineDisabled = underlineDisabled, - underlinePressed = underlinePressed, - underlineHovered = underlineHovered, - underlineSelected = underlineSelected, - ) - - public fun dark( - background: Color = Color.Unspecified, - backgroundHovered: Color = IntUiDarkTheme.colors.grey(4), - backgroundPressed: Color = backgroundHovered, - backgroundSelected: Color = background, - backgroundDisabled: Color = background, - content: Color = Color.Unspecified, - contentHovered: Color = content, - contentDisabled: Color = content, - contentPressed: Color = content, - contentSelected: Color = content, - underline: Color = Color.Unspecified, - underlineHovered: Color = underline, - underlineDisabled: Color = underline, - underlinePressed: Color = underline, - underlineSelected: Color = IntUiDarkTheme.colors.blue(6), - ): TabColors = - TabColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - backgroundSelected = backgroundSelected, - content = content, - contentDisabled = contentDisabled, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentSelected = contentSelected, - underline = underline, - underlineDisabled = underlineDisabled, - underlinePressed = underlinePressed, - underlineHovered = underlineHovered, - underlineSelected = underlineSelected, - ) -} - -public val TabColors.Companion.Editor: IntUiEditorTabColorsFactory - get() = IntUiEditorTabColorsFactory - -public object IntUiEditorTabColorsFactory { - - public fun light( - background: Color = Color.Transparent, - backgroundHovered: Color = background, - backgroundPressed: Color = background, - backgroundSelected: Color = background, - backgroundDisabled: Color = background, - content: Color = Color.Unspecified, - contentHovered: Color = content, - contentDisabled: Color = content, - contentPressed: Color = content, - contentSelected: Color = content, - underline: Color = Color.Unspecified, - underlineHovered: Color = underline, - underlineDisabled: Color = underline, - underlinePressed: Color = underline, - underlineSelected: Color = IntUiLightTheme.colors.blue(4), - ): TabColors = - TabColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - backgroundSelected = backgroundSelected, - content = content, - contentDisabled = contentDisabled, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentSelected = contentSelected, - underline = underline, - underlineDisabled = underlineDisabled, - underlinePressed = underlinePressed, - underlineHovered = underlineHovered, - underlineSelected = underlineSelected, - ) - - public fun dark( - background: Color = Color.Unspecified, - backgroundHovered: Color = background, - backgroundPressed: Color = background, - backgroundSelected: Color = background, - backgroundDisabled: Color = background, - content: Color = Color.Unspecified, - contentHovered: Color = content, - contentDisabled: Color = content, - contentPressed: Color = content, - contentSelected: Color = content, - underline: Color = Color.Unspecified, - underlineHovered: Color = underline, - underlineDisabled: Color = underline, - underlinePressed: Color = underline, - underlineSelected: Color = IntUiDarkTheme.colors.blue(6), - ): TabColors = - TabColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - backgroundSelected = backgroundSelected, - content = content, - contentDisabled = contentDisabled, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentSelected = contentSelected, - underline = underline, - underlineDisabled = underlineDisabled, - underlinePressed = underlinePressed, - underlineHovered = underlineHovered, - underlineSelected = underlineSelected, - ) -} - -public fun TabMetrics.Companion.defaults( - underlineThickness: Dp = 3.dp, - tabPadding: PaddingValues = PaddingValues(horizontal = 8.dp), - closeContentGap: Dp = 8.dp, - tabContentSpacing: Dp = 4.dp, - tabHeight: Dp = 40.dp, -): TabMetrics = - TabMetrics(underlineThickness, tabPadding, tabHeight, tabContentSpacing, closeContentGap) - -public fun TabContentAlpha.Companion.default( - iconNormal: Float = 1f, - iconDisabled: Float = iconNormal, - iconPressed: Float = iconNormal, - iconHovered: Float = iconNormal, - iconSelected: Float = iconNormal, - contentNormal: Float = iconNormal, - contentDisabled: Float = iconNormal, - contentPressed: Float = iconNormal, - contentHovered: Float = iconNormal, - contentSelected: Float = iconNormal, -): TabContentAlpha = - TabContentAlpha( - iconNormal = iconNormal, - iconDisabled = iconDisabled, - iconPressed = iconPressed, - iconHovered = iconHovered, - iconSelected = iconSelected, - contentNormal = contentNormal, - contentDisabled = contentDisabled, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentSelected = contentSelected, - ) - -public fun TabContentAlpha.Companion.editor( - iconNormal: Float = .7f, - iconDisabled: Float = iconNormal, - iconPressed: Float = 1f, - iconHovered: Float = iconPressed, - iconSelected: Float = iconPressed, - contentNormal: Float = .9f, - contentDisabled: Float = contentNormal, - contentPressed: Float = 1f, - contentHovered: Float = contentPressed, - contentSelected: Float = contentPressed, -): TabContentAlpha = - TabContentAlpha( - iconNormal = iconNormal, - iconDisabled = iconDisabled, - iconPressed = iconPressed, - iconHovered = iconHovered, - iconSelected = iconSelected, - contentNormal = contentNormal, - contentDisabled = contentDisabled, - contentPressed = contentPressed, - contentHovered = contentHovered, - contentSelected = contentSelected, - ) - -public fun TabIcons.Companion.defaults( - close: PainterProvider = standalonePainterProvider("expui/general/closeSmall.svg"), -): TabIcons = - TabIcons(close) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextAreaStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextAreaStyling.kt deleted file mode 100644 index 77bdeaeec9..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextAreaStyling.kt +++ /dev/null @@ -1,137 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.theme.defaultTextStyle -import org.jetbrains.jewel.ui.component.styling.TextAreaColors -import org.jetbrains.jewel.ui.component.styling.TextAreaMetrics -import org.jetbrains.jewel.ui.component.styling.TextAreaStyle - -@Composable -public fun TextAreaStyle.Companion.light( - colors: TextAreaColors = TextAreaColors.light(), - metrics: TextAreaMetrics = TextAreaMetrics.defaults(), - textStyle: TextStyle = JewelTheme.defaultTextStyle, -): TextAreaStyle = - TextAreaStyle(colors, metrics, textStyle) - -@Composable -public fun TextAreaStyle.Companion.dark( - colors: TextAreaColors = TextAreaColors.dark(), - metrics: TextAreaMetrics = TextAreaMetrics.defaults(), - textStyle: TextStyle = JewelTheme.defaultTextStyle, -): TextAreaStyle = - TextAreaStyle(colors, metrics, textStyle) - -@Composable -public fun TextAreaColors.Companion.light( - background: Color = IntUiLightTheme.colors.grey(14), - backgroundDisabled: Color = IntUiLightTheme.colors.grey(13), - backgroundFocused: Color = background, - backgroundPressed: Color = background, - backgroundHovered: Color = background, - content: Color = IntUiLightTheme.colors.grey(1), - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - border: Color = IntUiLightTheme.colors.grey(9), - borderDisabled: Color = IntUiLightTheme.colors.grey(11), - borderFocused: Color = IntUiLightTheme.colors.blue(4), - borderPressed: Color = border, - borderHovered: Color = border, - caret: Color = IntUiLightTheme.colors.grey(1), - caretDisabled: Color = caret, - caretFocused: Color = caret, - caretPressed: Color = caret, - caretHovered: Color = caret, - placeholder: Color = IntUiLightTheme.colors.grey(8), -): TextAreaColors = - TextAreaColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - caret = caret, - caretDisabled = caretDisabled, - caretFocused = caretFocused, - caretPressed = caretPressed, - caretHovered = caretHovered, - placeholder = placeholder, - ) - -@Composable -public fun TextAreaColors.Companion.dark( - background: Color = IntUiDarkTheme.colors.grey(2), - backgroundDisabled: Color = background, - backgroundFocused: Color = background, - backgroundPressed: Color = background, - backgroundHovered: Color = background, - content: Color = IntUiDarkTheme.colors.grey(12), - contentDisabled: Color = IntUiDarkTheme.colors.grey(7), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - border: Color = IntUiDarkTheme.colors.grey(5), - borderDisabled: Color = border, - borderFocused: Color = IntUiDarkTheme.colors.blue(6), - borderPressed: Color = border, - borderHovered: Color = border, - caret: Color = IntUiDarkTheme.colors.grey(12), - caretDisabled: Color = caret, - caretFocused: Color = caret, - caretPressed: Color = caret, - caretHovered: Color = caret, - placeholder: Color = IntUiDarkTheme.colors.grey(7), -): TextAreaColors = - TextAreaColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - caret = caret, - caretDisabled = caretDisabled, - caretFocused = caretFocused, - caretPressed = caretPressed, - caretHovered = caretHovered, - placeholder = placeholder, - ) - -public fun TextAreaMetrics.Companion.defaults( - cornerSize: CornerSize = CornerSize(4.dp), - contentPadding: PaddingValues = PaddingValues(horizontal = 6.dp, vertical = 2.dp), - minSize: DpSize = DpSize(144.dp, 28.dp), - borderWidth: Dp = 1.dp, -): TextAreaMetrics = - TextAreaMetrics(borderWidth, contentPadding, cornerSize, minSize) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextFieldStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextFieldStyling.kt deleted file mode 100644 index 7939f3c811..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextFieldStyling.kt +++ /dev/null @@ -1,137 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.shape.CornerSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.theme.defaultTextStyle -import org.jetbrains.jewel.ui.component.styling.TextFieldColors -import org.jetbrains.jewel.ui.component.styling.TextFieldMetrics -import org.jetbrains.jewel.ui.component.styling.TextFieldStyle - -@Composable -public fun TextFieldStyle.Companion.light( - colors: TextFieldColors = TextFieldColors.light(), - metrics: TextFieldMetrics = TextFieldMetrics.defaults(), - textStyle: TextStyle = JewelTheme.defaultTextStyle, -): TextFieldStyle = - TextFieldStyle(colors, metrics, textStyle) - -@Composable -public fun TextFieldStyle.Companion.dark( - colors: TextFieldColors = TextFieldColors.dark(), - metrics: TextFieldMetrics = TextFieldMetrics.defaults(), - textStyle: TextStyle = JewelTheme.defaultTextStyle, -): TextFieldStyle = - TextFieldStyle(colors, metrics, textStyle) - -@Composable -public fun TextFieldColors.Companion.light( - background: Color = IntUiLightTheme.colors.grey(14), - backgroundDisabled: Color = IntUiLightTheme.colors.grey(13), - backgroundFocused: Color = background, - backgroundPressed: Color = background, - backgroundHovered: Color = background, - content: Color = IntUiLightTheme.colors.grey(1), - contentDisabled: Color = IntUiLightTheme.colors.grey(8), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - border: Color = IntUiLightTheme.colors.grey(9), - borderDisabled: Color = IntUiLightTheme.colors.grey(11), - borderFocused: Color = IntUiLightTheme.colors.blue(4), - borderPressed: Color = border, - borderHovered: Color = border, - caret: Color = IntUiLightTheme.colors.grey(1), - caretDisabled: Color = caret, - caretFocused: Color = caret, - caretPressed: Color = caret, - caretHovered: Color = caret, - placeholder: Color = IntUiLightTheme.colors.grey(8), -): TextFieldColors = - TextFieldColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - caret = caret, - caretDisabled = caretDisabled, - caretFocused = caretFocused, - caretPressed = caretPressed, - caretHovered = caretHovered, - placeholder = placeholder, - ) - -@Composable -public fun TextFieldColors.Companion.dark( - background: Color = IntUiDarkTheme.colors.grey(2), - backgroundDisabled: Color = background, - backgroundFocused: Color = background, - backgroundPressed: Color = background, - backgroundHovered: Color = background, - content: Color = IntUiDarkTheme.colors.grey(12), - contentDisabled: Color = IntUiDarkTheme.colors.grey(7), - contentFocused: Color = content, - contentPressed: Color = content, - contentHovered: Color = content, - border: Color = IntUiDarkTheme.colors.grey(5), - borderDisabled: Color = border, - borderFocused: Color = IntUiDarkTheme.colors.blue(6), - borderPressed: Color = border, - borderHovered: Color = border, - caret: Color = IntUiDarkTheme.colors.grey(12), - caretDisabled: Color = caret, - caretFocused: Color = caret, - caretPressed: Color = caret, - caretHovered: Color = caret, - placeholder: Color = IntUiDarkTheme.colors.grey(7), -): TextFieldColors = - TextFieldColors( - background = background, - backgroundDisabled = backgroundDisabled, - backgroundFocused = backgroundFocused, - backgroundPressed = backgroundPressed, - backgroundHovered = backgroundHovered, - content = content, - contentDisabled = contentDisabled, - contentFocused = contentFocused, - contentPressed = contentPressed, - contentHovered = contentHovered, - border = border, - borderDisabled = borderDisabled, - borderFocused = borderFocused, - borderPressed = borderPressed, - borderHovered = borderHovered, - caret = caret, - caretDisabled = caretDisabled, - caretFocused = caretFocused, - caretPressed = caretPressed, - caretHovered = caretHovered, - placeholder = placeholder, - ) - -public fun TextFieldMetrics.Companion.defaults( - cornerSize: CornerSize = CornerSize(4.dp), - contentPadding: PaddingValues = PaddingValues(horizontal = 9.dp, vertical = 6.dp), - minSize: DpSize = DpSize(144.dp, 28.dp), - borderWidth: Dp = 1.dp, -): TextFieldMetrics = - TextFieldMetrics(borderWidth, contentPadding, cornerSize, minSize) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTooltipStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTooltipStyling.kt deleted file mode 100644 index 41b56f8a39..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTooltipStyling.kt +++ /dev/null @@ -1,47 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.styling - -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.ui.component.styling.TooltipColors -import org.jetbrains.jewel.ui.component.styling.TooltipMetrics -import org.jetbrains.jewel.ui.component.styling.TooltipStyle - -@Composable -public fun TooltipStyle.Companion.light( - intUiTooltipColors: TooltipColors = TooltipColors.light(), - intUiTooltipMetrics: TooltipMetrics = TooltipMetrics.defaults(), -): TooltipStyle = - TooltipStyle( - colors = intUiTooltipColors, - metrics = intUiTooltipMetrics, - ) - -@Composable -public fun TooltipStyle.Companion.dark( - intUiTooltipColors: TooltipColors = TooltipColors.dark(), - intUiTooltipMetrics: TooltipMetrics = TooltipMetrics.defaults(), -): TooltipStyle = - TooltipStyle( - colors = intUiTooltipColors, - metrics = intUiTooltipMetrics, - ) - -@Composable -public fun TooltipColors.Companion.light( - backgroundColor: Color = IntUiLightTheme.colors.grey(2), - contentColor: Color = IntUiLightTheme.colors.grey(12), - borderColor: Color = backgroundColor, - shadow: Color = Color(0x78919191), // Not a palette color -): TooltipColors = - TooltipColors(backgroundColor, contentColor, borderColor, shadow) - -@Composable -public fun TooltipColors.Companion.dark( - backgroundColor: Color = IntUiDarkTheme.colors.grey(2), - contentColor: Color = IntUiDarkTheme.colors.grey(12), - borderColor: Color = IntUiDarkTheme.colors.grey(3), - shadow: Color = Color(0x66000000), // Not a palette color -): TooltipColors = - TooltipColors(backgroundColor, contentColor, borderColor, shadow) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalColors.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalColors.kt deleted file mode 100644 index 00674a2d3d..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalColors.kt +++ /dev/null @@ -1,73 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.theme - -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import org.jetbrains.jewel.foundation.BorderColors -import org.jetbrains.jewel.foundation.GlobalColors -import org.jetbrains.jewel.foundation.OutlineColors -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme - -@Composable -public fun GlobalColors.Companion.light( - borders: BorderColors = BorderColors.light(), - outlines: OutlineColors = OutlineColors.light(), - infoContent: Color = IntUiLightTheme.colors.grey(7), - paneBackground: Color = IntUiLightTheme.colors.grey(13), -): GlobalColors = - GlobalColors( - borders = borders, - outlines = outlines, - infoContent = infoContent, - paneBackground = paneBackground, - ) - -@Composable -public fun GlobalColors.Companion.dark( - borders: BorderColors = BorderColors.dark(), - outlines: OutlineColors = OutlineColors.dark(), - infoContent: Color = IntUiDarkTheme.colors.grey(7), - paneBackground: Color = IntUiDarkTheme.colors.grey(2), -): GlobalColors = - GlobalColors( - borders = borders, - outlines = outlines, - infoContent = infoContent, - paneBackground = paneBackground, - ) - -@Composable -public fun BorderColors.Companion.light( - normal: Color = IntUiLightTheme.colors.grey(9), - focused: Color = IntUiLightTheme.colors.grey(14), - disabled: Color = IntUiLightTheme.colors.grey(11), -): BorderColors = - BorderColors(normal, focused, disabled) - -@Composable -public fun BorderColors.Companion.dark( - normal: Color = IntUiDarkTheme.colors.grey(5), - focused: Color = IntUiDarkTheme.colors.grey(2), - disabled: Color = IntUiDarkTheme.colors.grey(4), -): BorderColors = - BorderColors(normal, focused, disabled) - -@Composable -public fun OutlineColors.Companion.light( - focused: Color = IntUiLightTheme.colors.blue(4), - focusedWarning: Color = IntUiLightTheme.colors.yellow(4), - focusedError: Color = IntUiLightTheme.colors.red(4), - warning: Color = IntUiLightTheme.colors.yellow(7), - error: Color = IntUiLightTheme.colors.red(9), -): OutlineColors = - OutlineColors(focused, focusedWarning, focusedError, warning, error) - -@Composable -public fun OutlineColors.Companion.dark( - focused: Color = IntUiDarkTheme.colors.blue(6), - focusedWarning: Color = IntUiDarkTheme.colors.yellow(4), - focusedError: Color = IntUiDarkTheme.colors.red(4), - warning: Color = IntUiDarkTheme.colors.yellow(2), - error: Color = IntUiDarkTheme.colors.red(2), -): OutlineColors = - OutlineColors(focused, focusedWarning, focusedError, warning, error) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalMetrics.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalMetrics.kt deleted file mode 100644 index 8b009b8aa6..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalMetrics.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.theme - -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.GlobalMetrics - -public fun GlobalMetrics.Companion.defaults( - outlineWidth: Dp = 2.dp, - rowHeight: Dp = 24.dp, -): GlobalMetrics = - GlobalMetrics(outlineWidth, rowHeight) diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/theme/IntUiTheme.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/theme/IntUiTheme.kt deleted file mode 100644 index 4fcecd1359..0000000000 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/theme/IntUiTheme.kt +++ /dev/null @@ -1,226 +0,0 @@ -package org.jetbrains.jewel.intui.standalone.theme - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.CompositionLocalProvider -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontStyle -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp -import org.jetbrains.jewel.foundation.GlobalColors -import org.jetbrains.jewel.foundation.GlobalMetrics -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.foundation.theme.ThemeColorPalette -import org.jetbrains.jewel.foundation.theme.ThemeDefinition -import org.jetbrains.jewel.foundation.theme.ThemeIconData -import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme -import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.Inter -import org.jetbrains.jewel.intui.standalone.StandalonePainterHintsProvider -import org.jetbrains.jewel.intui.standalone.styling.Default -import org.jetbrains.jewel.intui.standalone.styling.Editor -import org.jetbrains.jewel.intui.standalone.styling.Outlined -import org.jetbrains.jewel.intui.standalone.styling.Undecorated -import org.jetbrains.jewel.intui.standalone.styling.dark -import org.jetbrains.jewel.intui.standalone.styling.light -import org.jetbrains.jewel.ui.ComponentStyling -import org.jetbrains.jewel.ui.DefaultComponentStyling -import org.jetbrains.jewel.ui.component.styling.ButtonStyle -import org.jetbrains.jewel.ui.component.styling.CheckboxStyle -import org.jetbrains.jewel.ui.component.styling.ChipStyle -import org.jetbrains.jewel.ui.component.styling.CircularProgressStyle -import org.jetbrains.jewel.ui.component.styling.DividerStyle -import org.jetbrains.jewel.ui.component.styling.DropdownStyle -import org.jetbrains.jewel.ui.component.styling.GroupHeaderStyle -import org.jetbrains.jewel.ui.component.styling.HorizontalProgressBarStyle -import org.jetbrains.jewel.ui.component.styling.IconButtonStyle -import org.jetbrains.jewel.ui.component.styling.LazyTreeStyle -import org.jetbrains.jewel.ui.component.styling.LinkStyle -import org.jetbrains.jewel.ui.component.styling.MenuStyle -import org.jetbrains.jewel.ui.component.styling.RadioButtonStyle -import org.jetbrains.jewel.ui.component.styling.ScrollbarStyle -import org.jetbrains.jewel.ui.component.styling.SliderStyle -import org.jetbrains.jewel.ui.component.styling.TabStyle -import org.jetbrains.jewel.ui.component.styling.TextAreaStyle -import org.jetbrains.jewel.ui.component.styling.TextFieldStyle -import org.jetbrains.jewel.ui.component.styling.TooltipStyle -import org.jetbrains.jewel.ui.painter.LocalPainterHintsProvider -import org.jetbrains.jewel.ui.theme.BaseJewelTheme - -public val JewelTheme.Companion.defaultTextStyle: TextStyle - get() = TextStyle.Default.copy( - fontFamily = FontFamily.Inter, - fontSize = 13.sp, - fontWeight = FontWeight.Normal, - fontStyle = FontStyle.Normal, - ) - -@Composable -public fun JewelTheme.Companion.lightThemeDefinition( - colors: GlobalColors = GlobalColors.light(), - metrics: GlobalMetrics = GlobalMetrics.defaults(), - palette: ThemeColorPalette = IntUiLightTheme.colors, - iconData: ThemeIconData = IntUiLightTheme.iconData, - defaultTextStyle: TextStyle = JewelTheme.defaultTextStyle, - contentColor: Color = IntUiLightTheme.colors.grey(1), -): ThemeDefinition = - ThemeDefinition(isDark = false, colors, metrics, defaultTextStyle, contentColor, palette, iconData) - -@Composable -public fun JewelTheme.Companion.darkThemeDefinition( - colors: GlobalColors = GlobalColors.dark(), - metrics: GlobalMetrics = GlobalMetrics.defaults(), - palette: ThemeColorPalette = IntUiDarkTheme.colors, - iconData: ThemeIconData = IntUiDarkTheme.iconData, - defaultTextStyle: TextStyle = JewelTheme.defaultTextStyle, - contentColor: Color = IntUiDarkTheme.colors.grey(12), -): ThemeDefinition = - ThemeDefinition(isDark = true, colors, metrics, defaultTextStyle, contentColor, palette, iconData) - -@Composable -public fun ComponentStyling.default(): ComponentStyling = with { - val isDark = JewelTheme.isDark - if (isDark) dark() else light() -} - -@Composable -public fun ComponentStyling.dark( - checkboxStyle: CheckboxStyle = CheckboxStyle.dark(), - chipStyle: ChipStyle = ChipStyle.dark(), - circularProgressStyle: CircularProgressStyle = CircularProgressStyle.dark(), - defaultButtonStyle: ButtonStyle = ButtonStyle.Default.dark(), - defaultTabStyle: TabStyle = TabStyle.Default.dark(), - dividerStyle: DividerStyle = DividerStyle.dark(), - dropdownStyle: DropdownStyle = DropdownStyle.Default.dark(), - editorTabStyle: TabStyle = TabStyle.Editor.dark(), - groupHeaderStyle: GroupHeaderStyle = GroupHeaderStyle.dark(), - horizontalProgressBarStyle: HorizontalProgressBarStyle = HorizontalProgressBarStyle.dark(), - iconButtonStyle: IconButtonStyle = IconButtonStyle.dark(), - lazyTreeStyle: LazyTreeStyle = LazyTreeStyle.dark(), - linkStyle: LinkStyle = LinkStyle.dark(), - menuStyle: MenuStyle = MenuStyle.dark(), - outlinedButtonStyle: ButtonStyle = ButtonStyle.Outlined.dark(), - radioButtonStyle: RadioButtonStyle = RadioButtonStyle.dark(), - scrollbarStyle: ScrollbarStyle = ScrollbarStyle.dark(), - sliderStyle: SliderStyle = SliderStyle.dark(), - textAreaStyle: TextAreaStyle = TextAreaStyle.dark(), - textFieldStyle: TextFieldStyle = TextFieldStyle.dark(), - tooltipStyle: TooltipStyle = TooltipStyle.dark(), - undecoratedDropdownStyle: DropdownStyle = DropdownStyle.Undecorated.dark(), -): ComponentStyling = - with( - DefaultComponentStyling( - checkboxStyle = checkboxStyle, - chipStyle = chipStyle, - circularProgressStyle = circularProgressStyle, - defaultButtonStyle = defaultButtonStyle, - defaultDropdownStyle = dropdownStyle, - defaultTabStyle = defaultTabStyle, - dividerStyle = dividerStyle, - editorTabStyle = editorTabStyle, - groupHeaderStyle = groupHeaderStyle, - horizontalProgressBarStyle = horizontalProgressBarStyle, - iconButtonStyle = iconButtonStyle, - lazyTreeStyle = lazyTreeStyle, - linkStyle = linkStyle, - menuStyle = menuStyle, - outlinedButtonStyle = outlinedButtonStyle, - radioButtonStyle = radioButtonStyle, - scrollbarStyle = scrollbarStyle, - sliderStyle = sliderStyle, - textAreaStyle = textAreaStyle, - textFieldStyle = textFieldStyle, - tooltipStyle = tooltipStyle, - undecoratedDropdownStyle = undecoratedDropdownStyle, - ), - ) - -@Composable -public fun ComponentStyling.light( - checkboxStyle: CheckboxStyle = CheckboxStyle.light(), - chipStyle: ChipStyle = ChipStyle.light(), - circularProgressStyle: CircularProgressStyle = CircularProgressStyle.light(), - defaultButtonStyle: ButtonStyle = ButtonStyle.Default.light(), - defaultTabStyle: TabStyle = TabStyle.Default.light(), - dividerStyle: DividerStyle = DividerStyle.light(), - dropdownStyle: DropdownStyle = DropdownStyle.Default.light(), - editorTabStyle: TabStyle = TabStyle.Editor.light(), - groupHeaderStyle: GroupHeaderStyle = GroupHeaderStyle.light(), - horizontalProgressBarStyle: HorizontalProgressBarStyle = HorizontalProgressBarStyle.light(), - iconButtonStyle: IconButtonStyle = IconButtonStyle.light(), - lazyTreeStyle: LazyTreeStyle = LazyTreeStyle.light(), - linkStyle: LinkStyle = LinkStyle.light(), - menuStyle: MenuStyle = MenuStyle.light(), - outlinedButtonStyle: ButtonStyle = ButtonStyle.Outlined.light(), - radioButtonStyle: RadioButtonStyle = RadioButtonStyle.light(), - scrollbarStyle: ScrollbarStyle = ScrollbarStyle.light(), - sliderStyle: SliderStyle = SliderStyle.light(), - textAreaStyle: TextAreaStyle = TextAreaStyle.light(), - textFieldStyle: TextFieldStyle = TextFieldStyle.light(), - tooltipStyle: TooltipStyle = TooltipStyle.light(), - undecoratedDropdownStyle: DropdownStyle = DropdownStyle.Undecorated.light(), -): ComponentStyling = - with( - DefaultComponentStyling( - checkboxStyle = checkboxStyle, - chipStyle = chipStyle, - circularProgressStyle = circularProgressStyle, - defaultButtonStyle = defaultButtonStyle, - defaultDropdownStyle = dropdownStyle, - defaultTabStyle = defaultTabStyle, - dividerStyle = dividerStyle, - editorTabStyle = editorTabStyle, - groupHeaderStyle = groupHeaderStyle, - horizontalProgressBarStyle = horizontalProgressBarStyle, - iconButtonStyle = iconButtonStyle, - lazyTreeStyle = lazyTreeStyle, - linkStyle = linkStyle, - menuStyle = menuStyle, - outlinedButtonStyle = outlinedButtonStyle, - radioButtonStyle = radioButtonStyle, - scrollbarStyle = scrollbarStyle, - sliderStyle = sliderStyle, - textAreaStyle = textAreaStyle, - textFieldStyle = textFieldStyle, - tooltipStyle = tooltipStyle, - undecoratedDropdownStyle = undecoratedDropdownStyle, - ), - ) - -@Composable -public fun IntUiTheme( - isDark: Boolean = false, - swingCompatMode: Boolean = false, - content: @Composable () -> Unit, -) { - val themeDefinition = - if (isDark) JewelTheme.darkThemeDefinition() else JewelTheme.lightThemeDefinition() - - IntUiTheme( - theme = themeDefinition, - styling = ComponentStyling, - swingCompatMode = swingCompatMode, - content = content, - ) -} - -@Composable -public fun IntUiTheme( - theme: ThemeDefinition, - styling: ComponentStyling, - swingCompatMode: Boolean = false, - content: @Composable () -> Unit, -) { - BaseJewelTheme( - theme, - ComponentStyling.default().with(styling), - swingCompatMode, - ) { - CompositionLocalProvider( - LocalPainterHintsProvider provides StandalonePainterHintsProvider(theme), - ) { - content() - } - } -} diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBox.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBox.svg deleted file mode 100644 index 040fba7519..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBox.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxDisabled.svg deleted file mode 100644 index d8fd6c72e9..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxDisabled.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxFocused.svg deleted file mode 100644 index ace3092921..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxFocused.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxIndeterminateSelected.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxIndeterminateSelected.svg deleted file mode 100644 index 125303cedf..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxIndeterminateSelected.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxIndeterminateSelectedDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxIndeterminateSelectedDisabled.svg deleted file mode 100644 index 3fa19a323e..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxIndeterminateSelectedDisabled.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxIndeterminateSelectedFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxIndeterminateSelectedFocused.svg deleted file mode 100644 index 61522b37b6..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxIndeterminateSelectedFocused.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxSelected.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxSelected.svg deleted file mode 100644 index dd29faaceb..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxSelected.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxSelectedDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxSelectedDisabled.svg deleted file mode 100644 index 64f901f114..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxSelectedDisabled.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxSelectedFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxSelectedFocused.svg deleted file mode 100644 index 2160bc7892..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkBoxSelectedFocused.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkmark.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkmark.svg deleted file mode 100644 index b00b29aed8..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkmark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkmarkDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkmarkDisabled.svg deleted file mode 100644 index 67a059a283..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkmarkDisabled.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkmarkSelected.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkmarkSelected.svg deleted file mode 100644 index 04db58fda4..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/checkmarkSelected.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radio.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radio.svg deleted file mode 100644 index 9e892f403c..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radio.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioDisabled.svg deleted file mode 100644 index 6fcd561f35..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioDisabled.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioFocused.svg deleted file mode 100644 index 62dd358dc4..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioFocused.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioSelected.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioSelected.svg deleted file mode 100644 index d1f5370b0d..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioSelected.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioSelectedDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioSelectedDisabled.svg deleted file mode 100644 index 9d5c288a1f..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioSelectedDisabled.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioSelectedFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioSelectedFocused.svg deleted file mode 100644 index dc261e997a..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/darcula/radioSelectedFocused.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBox.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBox.svg deleted file mode 100644 index a981bf0bcb..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBox.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxDisabled.svg deleted file mode 100644 index b31dd73f0a..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxDisabled.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxFocused.svg deleted file mode 100644 index bfd95c4b3d..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxFocused.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxIndeterminateSelected.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxIndeterminateSelected.svg deleted file mode 100644 index 9ece9c7271..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxIndeterminateSelected.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxIndeterminateSelectedDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxIndeterminateSelectedDisabled.svg deleted file mode 100644 index 12858acbcb..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxIndeterminateSelectedDisabled.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxIndeterminateSelectedFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxIndeterminateSelectedFocused.svg deleted file mode 100644 index 3d0ee0aa5e..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxIndeterminateSelectedFocused.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxSelected.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxSelected.svg deleted file mode 100644 index a264540a4f..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxSelected.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxSelectedDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxSelectedDisabled.svg deleted file mode 100644 index b97dd2ac98..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxSelectedDisabled.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxSelectedFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxSelectedFocused.svg deleted file mode 100644 index 03b812c506..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkBoxSelectedFocused.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmark.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmark.svg deleted file mode 100644 index 1b4e68e7d0..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkDisabled.svg deleted file mode 100644 index 3bb339b91b..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkDisabled.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkDisabled_dark.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkDisabled_dark.svg deleted file mode 100644 index 76e4218957..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkDisabled_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkSelected.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkSelected.svg deleted file mode 100644 index 4961545059..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkSelected.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkSelected_dark.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkSelected_dark.svg deleted file mode 100644 index c0a68987a4..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmarkSelected_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmark_dark.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmark_dark.svg deleted file mode 100644 index 7ead71f9a8..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/checkmark_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radio.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radio.svg deleted file mode 100644 index 8bbe96b33e..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radio.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioDisabled.svg deleted file mode 100644 index 232d005702..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioDisabled.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioFocused.svg deleted file mode 100644 index 6a20176ca7..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioFocused.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioSelected.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioSelected.svg deleted file mode 100644 index 2b2b272d5a..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioSelected.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioSelectedDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioSelectedDisabled.svg deleted file mode 100644 index b656b06937..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioSelectedDisabled.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioSelectedFocused.svg b/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioSelectedFocused.svg deleted file mode 100644 index 4035c9b834..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/com/intellij/ide/ui/laf/icons/intellij/radioSelectedFocused.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/add.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/add.svg deleted file mode 100644 index 57eaaf561d..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/add.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/add_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/add_dark.svg deleted file mode 100644 index 397e9321b1..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/add_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDown.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDown.svg deleted file mode 100644 index 3bed7d65a0..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDown.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDownLarge.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDownLarge.svg deleted file mode 100644 index f8a8475631..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDownLarge.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDownLargeWhite.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDownLargeWhite.svg deleted file mode 100644 index 7ec9421a4c..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDownLargeWhite.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDownLarge_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDownLarge_dark.svg deleted file mode 100644 index 70a43560d7..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDownLarge_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDown_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDown_dark.svg deleted file mode 100644 index 375ab4dd87..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronDown_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronLeft.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronLeft.svg deleted file mode 100644 index c6c4fa0419..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronLeft.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronLeft_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronLeft_dark.svg deleted file mode 100644 index d4284d2345..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronLeft_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronRight.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronRight.svg deleted file mode 100644 index 5120ed891d..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronRight.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronRight_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronRight_dark.svg deleted file mode 100644 index 8381421065..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronRight_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUp.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUp.svg deleted file mode 100644 index e40a745d70..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUp.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUpLarge.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUpLarge.svg deleted file mode 100644 index c681a5d26f..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUpLarge.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUpLarge_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUpLarge_dark.svg deleted file mode 100644 index bb98e4add7..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUpLarge_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUp_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUp_dark.svg deleted file mode 100644 index 5ecca2a0ce..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/chevronUp_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/close.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/close.svg deleted file mode 100644 index 9027624dd1..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/close.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmall.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmall.svg deleted file mode 100644 index c375b93313..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmall.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmallHovered.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmallHovered.svg deleted file mode 100644 index cc358ef93b..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmallHovered.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmallHovered_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmallHovered_dark.svg deleted file mode 100644 index e03d4bd639..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmallHovered_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmall_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmall_dark.svg deleted file mode 100644 index 237d6d45d2..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/closeSmall_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/general/close_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/general/close_dark.svg deleted file mode 100644 index 22bb872bcc..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/general/close_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/ide/externalLink.svg b/int-ui/int-ui-standalone/src/main/resources/expui/ide/externalLink.svg deleted file mode 100644 index 24846b20df..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/ide/externalLink.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/expui/ide/externalLink_dark.svg b/int-ui/int-ui-standalone/src/main/resources/expui/ide/externalLink_dark.svg deleted file mode 100644 index de3c1480ec..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/expui/ide/externalLink_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Black.ttf b/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Black.ttf deleted file mode 100644 index 5aecf7dc41..0000000000 Binary files a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Black.ttf and /dev/null differ diff --git a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Bold.ttf b/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Bold.ttf deleted file mode 100644 index 8e82c70d10..0000000000 Binary files a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Bold.ttf and /dev/null differ diff --git a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-ExtraBold.ttf b/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-ExtraBold.ttf deleted file mode 100644 index cb4b8217fc..0000000000 Binary files a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-ExtraBold.ttf and /dev/null differ diff --git a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-ExtraLight.ttf b/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-ExtraLight.ttf deleted file mode 100644 index 64aee30a4e..0000000000 Binary files a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-ExtraLight.ttf and /dev/null differ diff --git a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Light.ttf b/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Light.ttf deleted file mode 100644 index 9e265d8905..0000000000 Binary files a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Light.ttf and /dev/null differ diff --git a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Medium.ttf b/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Medium.ttf deleted file mode 100644 index b53fb1c4ac..0000000000 Binary files a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Medium.ttf and /dev/null differ diff --git a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Regular.ttf b/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Regular.ttf deleted file mode 100644 index 8d4eebf206..0000000000 Binary files a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Regular.ttf and /dev/null differ diff --git a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-SemiBold.ttf b/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-SemiBold.ttf deleted file mode 100644 index c6aeeb16a6..0000000000 Binary files a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-SemiBold.ttf and /dev/null differ diff --git a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Thin.ttf b/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Thin.ttf deleted file mode 100644 index 7aed55d560..0000000000 Binary files a/int-ui/int-ui-standalone/src/main/resources/fonts/inter/Inter-Thin.ttf and /dev/null differ diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBox.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBox.svg deleted file mode 100644 index f6a69e272d..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBox.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxDisabled.svg deleted file mode 100644 index 54369e3934..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxDisabled.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxFocused.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxFocused.svg deleted file mode 100644 index cd844a2a4b..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxFocused.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxFocusedTemp.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxFocusedTemp.svg deleted file mode 100644 index 8615c4cc45..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxFocusedTemp.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxIndeterminateSelected.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxIndeterminateSelected.svg deleted file mode 100644 index fa7ec87d18..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxIndeterminateSelected.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxIndeterminateSelectedDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxIndeterminateSelectedDisabled.svg deleted file mode 100644 index b4390406d3..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxIndeterminateSelectedDisabled.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxIndeterminateSelectedFocused.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxIndeterminateSelectedFocused.svg deleted file mode 100644 index 52fff945f1..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxIndeterminateSelectedFocused.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxSelected.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxSelected.svg deleted file mode 100644 index e45634c828..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxSelected.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxSelectedDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxSelectedDisabled.svg deleted file mode 100644 index f8bcd2ae59..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxSelectedDisabled.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxSelectedFocused.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxSelectedFocused.svg deleted file mode 100644 index 0023014d26..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxSelectedFocused.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxTemp.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxTemp.svg deleted file mode 100644 index 0a87d5a3d0..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/checkBoxTemp.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radio.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radio.svg deleted file mode 100644 index 736c4d3f2d..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radio.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioDisabled.svg deleted file mode 100644 index da3a396a0a..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioDisabled.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioFocused.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioFocused.svg deleted file mode 100644 index 2d23cdfe86..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioFocused.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioFocusedTemp.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioFocusedTemp.svg deleted file mode 100644 index 2e303ca374..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioFocusedTemp.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioSelected.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioSelected.svg deleted file mode 100644 index 6b9b836dfe..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioSelected.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioSelectedDisabled.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioSelectedDisabled.svg deleted file mode 100644 index df5695d44a..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioSelectedDisabled.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioSelectedFocused.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioSelectedFocused.svg deleted file mode 100644 index fc446c25b5..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioSelectedFocused.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioTemp.svg b/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioTemp.svg deleted file mode 100644 index c59b724291..0000000000 --- a/int-ui/int-ui-standalone/src/main/resources/themes/expUI/icons/dark/radioTemp.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/build.gradle.kts b/samples/standalone/build.gradle.kts deleted file mode 100644 index 219e85078e..0000000000 --- a/samples/standalone/build.gradle.kts +++ /dev/null @@ -1,54 +0,0 @@ -@file:Suppress("UnstableApiUsage") - -import org.jetbrains.compose.desktop.application.dsl.TargetFormat - -plugins { - jewel - alias(libs.plugins.composeDesktop) -} - -dependencies { - implementation(libs.kotlin.reflect) - implementation(projects.intUi.intUiStandalone) - implementation(projects.intUi.intUiDecoratedWindow) - implementation(compose.desktop.currentOs) { - exclude(group = "org.jetbrains.compose.material") - } -} - -compose.desktop { - application { - mainClass = "org.jetbrains.jewel.samples.standalone.MainKt" - - jvmArgs("-Dorg.jetbrains.jewel.debug=true") - - nativeDistributions { - targetFormats(TargetFormat.Dmg) - packageName = "Jewel Sample" - packageVersion = "1.0" - description = "Jewel Sample Application" - vendor = "JetBrains" - licenseFile = rootProject.file("LICENSE") - - macOS { - dockName = "Jewel Sample" - bundleID = "org.jetbrains.jewel.sample.standalone" - iconFile = file("icons/jewel.icns") - } - } - } -} - -tasks { - withType { - // afterEvaluate is needed because the Compose Gradle Plugin - // register the task in the afterEvaluate block - afterEvaluate { - javaLauncher = project.javaToolchains.launcherFor { - languageVersion = JavaLanguageVersion.of(17) - vendor = JvmVendorSpec.JETBRAINS - } - setExecutable(javaLauncher.map { it.executablePath.asFile.absolutePath }.get()) - } - } -} diff --git a/samples/standalone/icons/jewel.icns b/samples/standalone/icons/jewel.icns deleted file mode 100644 index 71978feb37..0000000000 Binary files a/samples/standalone/icons/jewel.icns and /dev/null differ diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/IntUiThemes.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/IntUiThemes.kt deleted file mode 100644 index b76f83a96e..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/IntUiThemes.kt +++ /dev/null @@ -1,20 +0,0 @@ -package org.jetbrains.jewel.samples.standalone - -import org.jetbrains.skiko.SystemTheme -import org.jetbrains.skiko.currentSystemTheme - -enum class IntUiThemes { - Light, LightWithLightHeader, Dark, System; - - fun isDark() = - (if (this == System) fromSystemTheme(currentSystemTheme) else this) == Dark - - fun isLightHeader() = - this == LightWithLightHeader - - companion object { - - fun fromSystemTheme(systemTheme: SystemTheme) = - if (systemTheme == SystemTheme.LIGHT) Light else Dark - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/Main.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/Main.kt deleted file mode 100644 index e911bb658d..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/Main.kt +++ /dev/null @@ -1,75 +0,0 @@ -package org.jetbrains.jewel.samples.standalone - -import androidx.compose.ui.graphics.painter.Painter -import androidx.compose.ui.res.ResourceLoader -import androidx.compose.ui.res.loadSvgPainter -import androidx.compose.ui.text.ExperimentalTextApi -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.unit.Density -import androidx.compose.ui.window.application -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.intui.standalone.theme.IntUiTheme -import org.jetbrains.jewel.intui.standalone.theme.darkThemeDefinition -import org.jetbrains.jewel.intui.standalone.theme.lightThemeDefinition -import org.jetbrains.jewel.intui.window.decoratedWindow -import org.jetbrains.jewel.intui.window.styling.dark -import org.jetbrains.jewel.intui.window.styling.light -import org.jetbrains.jewel.intui.window.styling.lightWithLightHeader -import org.jetbrains.jewel.samples.standalone.view.TitleBarView -import org.jetbrains.jewel.samples.standalone.viewmodel.MainViewModel -import org.jetbrains.jewel.ui.ComponentStyling -import org.jetbrains.jewel.window.DecoratedWindow -import org.jetbrains.jewel.window.styling.TitleBarStyle -import java.io.InputStream - -@OptIn(ExperimentalTextApi::class) -fun main() { - val icon = svgResource("icons/jewel-logo.svg") - - application { - val textStyle = TextStyle(fontFamily = FontFamily("Inter")) - - val themeDefinition = - if (MainViewModel.theme.isDark()) { - JewelTheme.darkThemeDefinition(defaultTextStyle = textStyle) - } else { - JewelTheme.lightThemeDefinition(defaultTextStyle = textStyle) - } - - IntUiTheme( - themeDefinition, - ComponentStyling.decoratedWindow( - titleBarStyle = when (MainViewModel.theme) { - IntUiThemes.Light -> TitleBarStyle.light() - IntUiThemes.LightWithLightHeader -> TitleBarStyle.lightWithLightHeader() - IntUiThemes.Dark -> TitleBarStyle.dark() - IntUiThemes.System -> if (MainViewModel.theme.isDark()) { - TitleBarStyle.dark() - } else { - TitleBarStyle.light() - } - }, - ), - MainViewModel.swingCompat, - ) { - DecoratedWindow( - onCloseRequest = { exitApplication() }, - title = "Jewel component catalog", - icon = icon, - ) { - TitleBarView() - MainViewModel.currentView.content() - } - } - } -} - -private fun svgResource( - resourcePath: String, - loader: ResourceLoader = ResourceLoader.Default, -): Painter = - loader.load(resourcePath) - .use { stream: InputStream -> - loadSvgPainter(stream, Density(1f)) - } diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/StandaloneSampleIcons.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/StandaloneSampleIcons.kt deleted file mode 100644 index bbf0bc6e97..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/StandaloneSampleIcons.kt +++ /dev/null @@ -1,3 +0,0 @@ -package org.jetbrains.jewel.samples.standalone - -object StandaloneSampleIcons diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/reflection/Views.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/reflection/Views.kt deleted file mode 100644 index 8080034282..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/reflection/Views.kt +++ /dev/null @@ -1,67 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.reflection - -import androidx.compose.runtime.Composable -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.samples.standalone.viewmodel.ViewInfo -import java.nio.file.FileSystemNotFoundException -import java.nio.file.FileSystems -import java.nio.file.Files -import java.nio.file.Paths -import kotlin.io.path.absolutePathString -import kotlin.io.path.name -import kotlin.reflect.jvm.kotlinFunction - -internal fun findViews(packageName: String): List { - val path = "/" + packageName.replace('.', '/').removePrefix("/") - - val uri = Class.forName("org.jetbrains.jewel.samples.standalone.reflection.ViewsKt") - .getResource(path)?.toURI() ?: return emptyList() - - val directory = if (uri.scheme == "jar") { - val fileSystem = try { - FileSystems.getFileSystem(uri) - } catch (_: FileSystemNotFoundException) { - FileSystems.newFileSystem(uri, emptyMap()) - } - fileSystem.getPath(path) - } else { - Paths.get(uri) - } - - val result = mutableListOf() - - if (Files.exists(directory)) { - Files.list(directory) - .filter { f -> Files.isRegularFile(f) && !f.name.contains('$') && f.name.endsWith("Kt.class") } - .forEach { f -> - val fullyQualifiedClassName = packageName + - f.absolutePathString().removePrefix(directory.absolutePathString()) - .dropLast(6) // remove .class - .replace('/', '.') - try { - result += Class.forName(fullyQualifiedClassName).methods.mapNotNull { - val annotation = it.getAnnotation(View::class.java) ?: return@mapNotNull null - val kFunc = it.kotlinFunction ?: return@mapNotNull null - if (kFunc.parameters.isNotEmpty() || kFunc.returnType.classifier != Unit::class) return@mapNotNull null - - ViewInfo( - title = annotation.title, - position = annotation.position, - icon = annotation.icon, - content = it.kotlinFunction as @Composable () -> Unit, - ) - } - } catch (e: ClassNotFoundException) { - System.err.println(e) - } catch (ignore: InstantiationException) { - // We try to instantiate an interface - // or an object that does not have a - // default constructor - } catch (ignore: IllegalAccessException) { - // The class is not public - } - } - } - - return result.sortedBy { it.position } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/ComponentsView.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/ComponentsView.kt deleted file mode 100644 index 4e50af6e30..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/ComponentsView.kt +++ /dev/null @@ -1,70 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxHeight -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.width -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp -import org.jetbrains.jewel.foundation.modifier.trackActivation -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons -import org.jetbrains.jewel.samples.standalone.viewmodel.ComponentsViewModel -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.samples.standalone.viewmodel.ViewInfo -import org.jetbrains.jewel.ui.Orientation -import org.jetbrains.jewel.ui.component.Divider -import org.jetbrains.jewel.ui.component.Icon -import org.jetbrains.jewel.ui.component.SelectableIconButton -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.component.Tooltip -import org.jetbrains.jewel.ui.component.styling.LocalIconButtonStyle -import org.jetbrains.jewel.ui.painter.hints.Size -import org.jetbrains.jewel.ui.painter.hints.Stroke -import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider - -@Composable -@View(title = "Components", position = 1, icon = "icons/structure.svg") -fun ComponentsView() { - Row(Modifier.trackActivation().fillMaxSize().background(JewelTheme.globalColors.paneBackground)) { - ComponentsToolBar() - Divider(Orientation.Vertical) - ComponentView(ComponentsViewModel.currentView) - } -} - -@Composable -fun ComponentsToolBar() { - Column(Modifier.fillMaxHeight().width(40.dp)) { - ComponentsViewModel.views.forEach { - Tooltip({ - Text("Show ${it.title}") - }) { - SelectableIconButton(ComponentsViewModel.currentView == it, { - ComponentsViewModel.currentView = it - }, Modifier.size(40.dp).padding(5.dp)) { state -> - val tint by LocalIconButtonStyle.current.colors.foregroundFor(state) - val painterProvider = rememberResourcePainterProvider(it.icon, StandaloneSampleIcons::class.java) - val painter by painterProvider.getPainter(Size(20), Stroke(tint)) - Icon(painter = painter, "icon") - } - } - } - } -} - -@Composable -fun ComponentView(view: ViewInfo) { - Column(Modifier.fillMaxSize().padding(24.dp), verticalArrangement = Arrangement.spacedBy(24.dp)) { - Text(view.title, fontSize = 20.sp) - view.content() - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/TitleBarView.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/TitleBarView.kt deleted file mode 100644 index 81890857e9..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/TitleBarView.kt +++ /dev/null @@ -1,131 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.samples.standalone.IntUiThemes -import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons -import org.jetbrains.jewel.samples.standalone.viewmodel.MainViewModel -import org.jetbrains.jewel.ui.component.Dropdown -import org.jetbrains.jewel.ui.component.Icon -import org.jetbrains.jewel.ui.component.IconButton -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.component.Tooltip -import org.jetbrains.jewel.ui.painter.hints.Size -import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider -import org.jetbrains.jewel.window.DecoratedWindowScope -import org.jetbrains.jewel.window.TitleBar -import org.jetbrains.jewel.window.newFullscreenControls -import java.awt.Desktop -import java.net.URI - -@Composable -fun DecoratedWindowScope.TitleBarView() { - TitleBar(Modifier.newFullscreenControls(), gradientStartColor = MainViewModel.projectColor) { - Row(Modifier.align(Alignment.Start)) { - Dropdown(Modifier.height(30.dp), menuContent = { - MainViewModel.views.forEach { - selectableItem( - selected = MainViewModel.currentView == it, - onClick = { - MainViewModel.currentView = it - }, - ) { - Row( - horizontalArrangement = Arrangement.spacedBy(4.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - val painterProvider = - rememberResourcePainterProvider(it.icon, StandaloneSampleIcons::class.java) - val painter by painterProvider.getPainter(Size(20)) - Icon(painter, "icon") - Text(it.title) - } - } - } - }) { - Row( - horizontalArrangement = Arrangement.spacedBy(3.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Row( - horizontalArrangement = Arrangement.spacedBy(4.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - val painterProvider = - rememberResourcePainterProvider( - MainViewModel.currentView.icon, - StandaloneSampleIcons::class.java, - ) - val painter by painterProvider.getPainter(Size(20)) - Icon(painter, "icon") - Text(MainViewModel.currentView.title) - } - } - } - } - - Text(title) - - Row(Modifier.align(Alignment.End)) { - Tooltip({ - Text("Open Jewel Github repository") - }) { - IconButton({ - Desktop.getDesktop().browse(URI.create("https://github.com/JetBrains/jewel")) - }, Modifier.size(40.dp).padding(5.dp)) { - Icon("icons/github@20x20.svg", "Github", StandaloneSampleIcons::class.java) - } - } - - Tooltip({ - when (MainViewModel.theme) { - IntUiThemes.Light -> Text("Switch to light theme with light header") - IntUiThemes.LightWithLightHeader -> Text("Switch to dark theme") - IntUiThemes.Dark, IntUiThemes.System -> Text("Switch to light theme") - } - }) { - IconButton({ - MainViewModel.theme = when (MainViewModel.theme) { - IntUiThemes.Light -> IntUiThemes.LightWithLightHeader - IntUiThemes.LightWithLightHeader -> IntUiThemes.Dark - IntUiThemes.Dark, IntUiThemes.System -> IntUiThemes.Light - } - }, Modifier.size(40.dp).padding(5.dp)) { - when (MainViewModel.theme) { - IntUiThemes.Light -> Icon( - "icons/lightTheme@20x20.svg", - "Themes", - StandaloneSampleIcons::class.java, - ) - - IntUiThemes.LightWithLightHeader -> Icon( - "icons/lightWithLightHeaderTheme@20x20.svg", - "Themes", - StandaloneSampleIcons::class.java, - ) - - IntUiThemes.Dark -> Icon( - "icons/darkTheme@20x20.svg", - "Themes", - StandaloneSampleIcons::class.java, - ) - - IntUiThemes.System -> Icon( - "icons/systemTheme@20x20.svg", - "Themes", - StandaloneSampleIcons::class.java, - ) - } - } - } - } - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/WelcomeView.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/WelcomeView.kt deleted file mode 100644 index adb693ada6..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/WelcomeView.kt +++ /dev/null @@ -1,110 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view - -import androidx.compose.foundation.Image -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi -import androidx.compose.foundation.layout.FlowRow -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.widthIn -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.ui.Modifier -import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp -import org.jetbrains.jewel.foundation.modifier.trackActivation -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.samples.standalone.IntUiThemes -import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons -import org.jetbrains.jewel.samples.standalone.viewmodel.MainViewModel -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.component.CheckboxRow -import org.jetbrains.jewel.ui.component.Icon -import org.jetbrains.jewel.ui.component.RadioButtonChip -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.component.styling.LocalCheckboxStyle -import org.jetbrains.jewel.ui.painter.hints.Selected -import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider - -@OptIn(ExperimentalLayoutApi::class) -@Composable -@View(title = "Welcome", position = 0, icon = "icons/meetNewUi.svg") -fun WelcomeView() { - Column( - modifier = Modifier.trackActivation() - .fillMaxSize() - .background(JewelTheme.globalColors.paneBackground) - .padding(24.dp), - verticalArrangement = Arrangement.spacedBy(24.dp), - ) { - val meetNewUiImage = - rememberResourcePainterProvider("images/New UI Image.png", StandaloneSampleIcons::class.java) - val meetNewUiImagePainter by meetNewUiImage.getPainter() - Image( - painter = meetNewUiImagePainter, - contentDescription = null, - modifier = Modifier.widthIn(max = 500.dp), - contentScale = ContentScale.Crop, - ) - - Text("Meet Jewel", fontSize = 20.sp) - - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - Text("Theme:") - - FlowRow( - horizontalArrangement = Arrangement.spacedBy(8.dp), - verticalArrangement = Arrangement.spacedBy(8.dp), - ) { - ThemeSelectionChip(IntUiThemes.Dark, "Dark", "icons/darkTheme.svg") - - ThemeSelectionChip(IntUiThemes.Light, "Light", "icons/lightTheme.svg") - - ThemeSelectionChip( - IntUiThemes.LightWithLightHeader, - "Light with Light Header", - "icons/lightWithLightHeaderTheme.svg", - ) - - ThemeSelectionChip(IntUiThemes.System, "System", "icons/systemTheme.svg") - } - } - - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - CheckboxRow( - text = "Swing compatibility", - checked = MainViewModel.swingCompat, - onCheckedChange = { MainViewModel.swingCompat = it }, - colors = LocalCheckboxStyle.current.colors, - metrics = LocalCheckboxStyle.current.metrics, - icons = LocalCheckboxStyle.current.icons, - ) - } - } -} - -@Composable -fun ThemeSelectionChip(theme: IntUiThemes, name: String, icon: String) { - RadioButtonChip( - selected = MainViewModel.theme == theme, - onClick = { MainViewModel.theme = theme }, - enabled = true, - ) { - val painterProvider = rememberResourcePainterProvider( - icon, - StandaloneSampleIcons::class.java, - ) - val painter by painterProvider.getPainter(Selected(MainViewModel.theme == theme)) - Row( - horizontalArrangement = Arrangement.spacedBy(5.dp), - verticalAlignment = androidx.compose.ui.Alignment.CenterVertically, - ) { - Icon(painter, name) - Text(name) - } - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Borders.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Borders.kt deleted file mode 100644 index 159664c849..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Borders.kt +++ /dev/null @@ -1,124 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.shape.CircleShape -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.RectangleShape -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.Stroke -import org.jetbrains.jewel.foundation.modifier.border -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.ui.component.GroupHeader -import org.jetbrains.jewel.ui.component.OutlinedButton -import org.jetbrains.jewel.ui.component.RadioButtonRow -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.theme.colorPalette - -@Composable -internal fun Borders() { - GroupHeader("Borders") - var borderAlignment by remember { mutableStateOf(Stroke.Alignment.Center) } - - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - RadioButtonRow( - text = "Inside", - selected = borderAlignment == Stroke.Alignment.Inside, - onClick = { borderAlignment = Stroke.Alignment.Inside }, - ) - RadioButtonRow( - text = "Center", - selected = borderAlignment == Stroke.Alignment.Center, - onClick = { borderAlignment = Stroke.Alignment.Center }, - ) - RadioButtonRow( - text = "Outside", - selected = borderAlignment == Stroke.Alignment.Outside, - onClick = { borderAlignment = Stroke.Alignment.Outside }, - ) - } - var width by remember { mutableStateOf(1.dp) } - var expand by remember { mutableStateOf(0.dp) } - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - OutlinedButton({ - width += 1.dp - }) { - Text("+width") - } - OutlinedButton({ - width -= 1.dp - }, enabled = width > 1.dp) { - Text("-width") - } - OutlinedButton({ - expand += 1.dp - }) { - Text("+expand") - } - OutlinedButton({ - expand -= 1.dp - }) { - Text("-expand") - } - } - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Box( - Modifier.size(28.dp, 28.dp) - .border( - borderAlignment, - width, - JewelTheme.colorPalette.blue(4), - CircleShape, - expand, - ), - ) - Box( - Modifier.size(72.dp, 28.dp) - .border( - borderAlignment, - width, - JewelTheme.colorPalette.blue(4), - RectangleShape, - expand, - ), - ) - Box( - Modifier.size(72.dp, 28.dp) - .border( - borderAlignment, - width, - JewelTheme.colorPalette.blue(4), - RoundedCornerShape(4.dp), - expand, - ), - ) - Box( - Modifier.size(72.dp, 28.dp) - .border( - borderAlignment, - width, - JewelTheme.colorPalette.blue(4), - RoundedCornerShape(4.dp, 0.dp, 4.dp, 0.dp), - expand, - ), - ) - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Buttons.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Buttons.kt deleted file mode 100644 index 45ae38ac17..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Buttons.kt +++ /dev/null @@ -1,50 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.component.DefaultButton -import org.jetbrains.jewel.ui.component.Icon -import org.jetbrains.jewel.ui.component.IconButton -import org.jetbrains.jewel.ui.component.OutlinedButton -import org.jetbrains.jewel.ui.component.Text - -@Composable -@View(title = "Buttons", position = 0) -fun Buttons() { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.spacedBy(16.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - OutlinedButton(onClick = { }) { - Text("Outlined") - } - - OutlinedButton(onClick = {}, enabled = false) { - Text("Outlined Disabled") - } - - DefaultButton(onClick = {}) { - Text("Default") - } - - DefaultButton(onClick = {}, enabled = false) { - Text("Default disabled") - } - - IconButton(onClick = {}) { - Icon( - resource = "icons/close.svg", - "icon", - StandaloneSampleIcons::class.java, - ) - } - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Checkboxes.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Checkboxes.kt deleted file mode 100644 index 917bfe3fde..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Checkboxes.kt +++ /dev/null @@ -1,48 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.state.ToggleableState -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.Outline -import org.jetbrains.jewel.ui.component.TriStateCheckboxRow - -@Composable -@View(title = "Checkboxes", position = 1) -fun Checkboxes() { - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - var checked by remember { mutableStateOf(ToggleableState.On) } - TriStateCheckboxRow("Checkbox", checked, { - checked = when (checked) { - ToggleableState.On -> ToggleableState.Off - ToggleableState.Off -> ToggleableState.Indeterminate - ToggleableState.Indeterminate -> ToggleableState.On - } - }) - TriStateCheckboxRow("Error", checked, { - checked = when (checked) { - ToggleableState.On -> ToggleableState.Off - ToggleableState.Off -> ToggleableState.Indeterminate - ToggleableState.Indeterminate -> ToggleableState.On - } - }, outline = Outline.Error) - TriStateCheckboxRow("Warning", checked, { - checked = when (checked) { - ToggleableState.On -> ToggleableState.Off - ToggleableState.Off -> ToggleableState.Indeterminate - ToggleableState.Indeterminate -> ToggleableState.On - } - }, outline = Outline.Warning) - TriStateCheckboxRow("Disabled", checked, {}, enabled = false) - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/ChipsAndTree.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/ChipsAndTree.kt deleted file mode 100644 index 8786b915ba..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/ChipsAndTree.kt +++ /dev/null @@ -1,225 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.VerticalScrollbar -import androidx.compose.foundation.background -import androidx.compose.foundation.border -import androidx.compose.foundation.clickable -import androidx.compose.foundation.focusable -import androidx.compose.foundation.interaction.MutableInteractionSource -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.rememberScrollbarAdapter -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.dp -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch -import org.jetbrains.jewel.foundation.lazy.SelectableLazyColumn -import org.jetbrains.jewel.foundation.lazy.SelectionMode -import org.jetbrains.jewel.foundation.lazy.rememberSelectableLazyListState -import org.jetbrains.jewel.foundation.lazy.tree.buildTree -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.component.Chip -import org.jetbrains.jewel.ui.component.CircularProgressIndicator -import org.jetbrains.jewel.ui.component.GroupHeader -import org.jetbrains.jewel.ui.component.LazyTree -import org.jetbrains.jewel.ui.component.RadioButtonChip -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.component.ToggleableChip -import org.jetbrains.jewel.ui.theme.colorPalette - -@Composable -@View(title = "ChipsAndTree", position = 11) -fun ChipsAndTree() { - Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(16.dp)) { - Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(8.dp)) { - GroupHeader(text = "Chips", modifier = Modifier.fillMaxWidth()) - ChipsSample(Modifier.padding(8.dp)) - } - - Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(8.dp)) { - GroupHeader("Tree", modifier = Modifier.fillMaxWidth()) - TreeSample() - } - - Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(8.dp)) { - GroupHeader("SelectableLazyColumn", modifier = Modifier.width(300.dp)) - SelectableLazyColumnSample() - } - } -} - -@Composable -fun SelectableLazyColumnSample() { - var listOfItems by remember { - mutableStateOf(emptyList()) - } - - LaunchedEffect(Unit) { - @Suppress("InjectDispatcher") // Ok for demo code - launch(Dispatchers.Default) { - listOfItems = List(5_000_000) { "Item $it" } - } - } - - val interactionSource = remember { MutableInteractionSource() } - val state = rememberSelectableLazyListState() - Box( - modifier = Modifier.size(200.dp, 200.dp), - ) { - if (listOfItems.isEmpty()) { - CircularProgressIndicator(Modifier.align(Alignment.Center)) - } else { - SelectableLazyColumn( - selectionMode = SelectionMode.Multiple, - modifier = Modifier.focusable(interactionSource = interactionSource), - state = state, - content = { - items( - count = listOfItems.size, - key = { index -> listOfItems[index] }, - ) { index -> - Text( - text = listOfItems[index], - modifier = Modifier.fillMaxWidth() - .then( - when { - isSelected && isActive -> Modifier.background(Color.Blue) - isSelected && !isActive -> Modifier.background(Color.Gray) - else -> Modifier - }, - ).clickable { - println("click on $index") - }, - ) - } - }, - interactionSource = remember { MutableInteractionSource() }, - ) - VerticalScrollbar( - rememberScrollbarAdapter(state.lazyListState), - modifier = Modifier.align(Alignment.CenterEnd), - ) - } - } -} - -@Composable -fun ChipsSample(modifier: Modifier = Modifier) { - Column(modifier, verticalArrangement = Arrangement.spacedBy(8.dp)) { - Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { - var selectedIndex by remember { mutableStateOf(-1) } - RadioButtonChip( - selected = selectedIndex == 0, - onClick = { selectedIndex = 0 }, - enabled = true, - ) { - Text("First") - } - - RadioButtonChip( - selected = selectedIndex == 1, - onClick = { selectedIndex = 1 }, - enabled = true, - ) { - Text("Second") - } - - RadioButtonChip( - selected = selectedIndex == 2, - onClick = { selectedIndex = 2 }, - enabled = true, - ) { - Text("Third") - } - } - - Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { - var isChecked by remember { mutableStateOf(false) } - ToggleableChip( - checked = isChecked, - onClick = { - isChecked = it - }, - enabled = true, - ) { - Text("Toggleable") - } - - var count by remember { mutableStateOf(1) } - Chip( - enabled = true, - onClick = { count++ }, - ) { - Text("Clicks: $count") - } - } - - Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { - Chip( - enabled = false, - onClick = {}, - ) { - Text("Disabled") - } - } - } -} - -@Composable -fun TreeSample(modifier: Modifier = Modifier) { - val tree = remember { - buildTree { - addNode("root 1") { - addLeaf("leaf 1") - addLeaf("leaf 2") - } - addNode("root 2") { - addLeaf("leaf 2.1") - addNode("node 1") { - addLeaf("subleaf 1") - addLeaf("subleaf 2") - } - } - addNode("root 3") { - addLeaf("leaf 3.1") - addLeaf("leaf 3.2") - } - } - } - - val borderColor = - if (JewelTheme.isDark) { - JewelTheme.colorPalette.grey(3) - } else { - JewelTheme.colorPalette.grey(12) - } - - Box(modifier.border(1.dp, borderColor, RoundedCornerShape(2.dp))) { - LazyTree( - tree = tree, - modifier = Modifier.size(200.dp, 200.dp), - onElementClick = {}, - onElementDoubleClick = {}, - ) { element -> - Box(Modifier.fillMaxWidth()) { - Text(element.data, Modifier.padding(2.dp)) - } - } - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Dropdowns.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Dropdowns.kt deleted file mode 100644 index 6d07f071bd..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Dropdowns.kt +++ /dev/null @@ -1,191 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.Outline -import org.jetbrains.jewel.ui.component.Dropdown -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.component.separator -import org.jetbrains.jewel.ui.component.styling.DropdownStyle -import kotlin.random.Random - -@Composable -@View(title = "Dropdowns", position = 3) -fun Dropdowns() { - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - val items = remember { - listOf( - "Light", - "Dark", - "---", - "High Contrast", - "Darcula", - "IntelliJ Light", - ) - } - var selected by remember { mutableStateOf(items.first()) } - - Dropdown( - enabled = false, - menuContent = {}, - ) { - Text("Disabled") - } - Dropdown( - menuContent = { - items.forEach { - if (it == "---") { - separator() - } else { - selectableItem( - selected = selected == it, - onClick = { selected = it }, - ) { - Text(it) - } - } - } - separator() - submenu(submenu = { - items.forEach { - if (it == "---") { - separator() - } else { - selectableItem( - selected = selected == it, - onClick = { selected = it }, - ) { - Text(it) - } - } - } - separator() - submenu(submenu = { - items.forEach { - if (it == "---") { - separator() - } else { - selectableItem( - selected = selected == it, - onClick = { selected = it }, - ) { - Text(it) - } - } - } - }) { - Text("Submenu2") - } - }) { - Text("Submenu") - } - }, - ) { - Text(selected) - } - Dropdown( - outline = Outline.Error, - menuContent = { - items.forEach { - if (it == "---") { - separator() - } else { - selectableItem( - selected = selected == it, - onClick = { selected = it }, - ) { - Text(it) - } - } - } - }, - ) { - Text(selected) - } - Dropdown( - menuContent = { - items.forEach { - if (it == "---") { - separator() - } else { - selectableItem( - iconResource = dropdownIconsSample.random(), - iconClass = DropdownStyle::class.java, - keybinding = if (Random.nextBoolean()) { - null - } else { - dropdownKeybindingsSample.shuffled() - .take(2) - .toSet() - }, - selected = false, - onClick = { }, - ) { - Text(it) - } - } - } - submenu(submenu = { - items.forEach { - if (it == "---") { - separator() - } else { - selectableItem( - iconResource = dropdownIconsSample.random(), - iconClass = DropdownStyle::class.java, - keybinding = if (Random.nextBoolean()) { - null - } else { - dropdownKeybindingsSample.shuffled() - .take(2) - .toSet() - }, - selected = false, - onClick = { }, - ) { - Text(it) - } - } - } - separator() - submenu(submenu = { - items.forEach { - if (it == "---") { - separator() - } else { - selectableItem( - iconResource = dropdownIconsSample.random(), - iconClass = DropdownStyle::class.java, - selected = false, - onClick = { }, - ) { - Text(it) - } - } - } - }) { - Text("Submenu2") - } - }) { - Text("Submenu") - } - }, - ) { - Text("With icons") - } - } -} - -private val dropdownIconsSample = listOf("icons/search.svg", "icons/close.svg", null) -private val dropdownKeybindingsSample = setOf('A', 'B', '↑', '→', '␡') diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Icons.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Icons.kt deleted file mode 100644 index 418fc6fd30..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Icons.kt +++ /dev/null @@ -1,90 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.BlendMode -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.ColorFilter -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.component.Icon -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.painter.badge.DotBadgeShape -import org.jetbrains.jewel.ui.painter.hints.Badge -import org.jetbrains.jewel.ui.painter.hints.Size -import org.jetbrains.jewel.ui.painter.hints.Stroke -import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider -import org.jetbrains.jewel.ui.theme.colorPalette - -@Composable -@View(title = "Icons", position = 6) -internal fun Icons() { - Row( - modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp), - horizontalArrangement = Arrangement.spacedBy(16.dp), - ) { - val iconProvider = rememberResourcePainterProvider("icons/jewel-logo.svg", StandaloneSampleIcons::class.java) - val logo by iconProvider.getPainter() - - Icon(logo, "Jewel Logo", Modifier.size(16.dp)) - Icon(logo, "Jewel Logo", Modifier.size(32.dp)) - Icon(logo, "Jewel Logo", Modifier.size(64.dp)) - Icon(logo, "Jewel Logo", Modifier.size(128.dp)) - Icon( - logo, - "Jewel Logo", - ColorFilter.tint(Color.Magenta, BlendMode.Multiply), - Modifier.size(128.dp), - ) - } - - Text("Hints:") - - Row( - modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp), - horizontalArrangement = Arrangement.spacedBy(16.dp), - ) { - val iconProvider = - rememberResourcePainterProvider("icons/taskGroup.svg", StandaloneSampleIcons::class.java) - - val normal by iconProvider.getPainter() - val stroked by iconProvider.getPainter(Stroke(Color.White)) - val badged by iconProvider.getPainter(Badge(Color.Red, DotBadgeShape.Default)) - val strokedAndBadged by iconProvider.getPainter(Badge(Color.Red, DotBadgeShape.Default), Stroke(Color.White)) - val resized by iconProvider.getPainter(Size(20)) - - Box(Modifier.size(24.dp), contentAlignment = Alignment.Center) { - Icon(normal, "taskGroup") - } - Box(Modifier.size(24.dp), contentAlignment = Alignment.Center) { - Icon(badged, "taskGroup") - } - Box( - Modifier.size(24.dp).background(JewelTheme.colorPalette.blue(4), shape = RoundedCornerShape(4.dp)), - contentAlignment = Alignment.Center, - ) { - Icon(stroked, "taskGroup") - } - Box( - Modifier.size(24.dp).background(JewelTheme.colorPalette.blue(4), shape = RoundedCornerShape(4.dp)), - contentAlignment = Alignment.Center, - ) { - Icon(strokedAndBadged, "taskGroup") - } - Box(Modifier.size(24.dp), contentAlignment = Alignment.Center) { - Icon(resized, "taskGroup") - } - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Links.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Links.kt deleted file mode 100644 index c8133508cb..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Links.kt +++ /dev/null @@ -1,69 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.component.DropdownLink -import org.jetbrains.jewel.ui.component.ExternalLink -import org.jetbrains.jewel.ui.component.Link -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.component.separator - -@Composable -@View(title = "Links", position = 4) -fun Links() { - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Link("Link", {}) - - ExternalLink("ExternalLink", {}) - - val items = remember { - listOf( - "Light", - "Dark", - "---", - "High Contrast", - "Darcula", - "IntelliJ Light", - ) - } - var selected by remember { mutableStateOf(items.first()) } - DropdownLink("DropdownLink") { - items.forEach { - if (it == "---") { - separator() - } else { - selectableItem( - selected = selected == it, - onClick = { - selected = it - }, - ) { - Text(it) - } - } - } - } - } - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Link("Link", {}, enabled = false) - - ExternalLink("ExternalLink", {}, enabled = false) - - DropdownLink("DropdownLink", enabled = false) { - } - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/ProgressBar.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/ProgressBar.kt deleted file mode 100644 index 96a58e2662..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/ProgressBar.kt +++ /dev/null @@ -1,117 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.animation.core.animateFloat -import androidx.compose.animation.core.infiniteRepeatable -import androidx.compose.animation.core.keyframes -import androidx.compose.animation.core.rememberInfiniteTransition -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.width -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import kotlinx.coroutines.delay -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.component.CircularProgressIndicator -import org.jetbrains.jewel.ui.component.CircularProgressIndicatorBig -import org.jetbrains.jewel.ui.component.HorizontalProgressBar -import org.jetbrains.jewel.ui.component.IndeterminateHorizontalProgressBar -import org.jetbrains.jewel.ui.component.Text - -@Composable -@View(title = "ProgressBar", position = 5) -fun ProgressBar() { - val transition = rememberInfiniteTransition() - val currentOffset by transition.animateFloat( - initialValue = 0f, - targetValue = 1f, - animationSpec = infiniteRepeatable( - animation = keyframes { - durationMillis = 4000 - 0f at 1000 - 1f at 3000 - }, - ), - ) - var intermittentProgress by remember { mutableStateOf(0f) } - LaunchedEffect(Unit) { - while (true) { - delay(800) - if (intermittentProgress >= .9) { - intermittentProgress = 0f - } else { - intermittentProgress += .25f - } - } - } - Column { - Text("HorizontalProgressBar - linear progress") - Row( - Modifier.width(600.dp), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - HorizontalProgressBar(modifier = Modifier.width(500.dp), progress = currentOffset) - Text("${(currentOffset * 100).toInt()} %") - } - } - Column { - Text("HorizontalProgressBar - non linear progress") - Row( - Modifier.width(600.dp), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - HorizontalProgressBar(modifier = Modifier.width(500.dp), progress = intermittentProgress) - Text("${(intermittentProgress * 100).toInt()} %") - } - } - Column { - Text("HorizontalProgressBar - smoothed non linear progress") - Row( - Modifier.width(600.dp), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - val smoothedProgress by androidx.compose.animation.core.animateFloatAsState(intermittentProgress) - HorizontalProgressBar(modifier = Modifier.width(500.dp), progress = smoothedProgress) - Text("${(intermittentProgress * 100).toInt()} %") - } - } - Column { - Text("IndeterminateHorizontalProgressBar") - Row( - Modifier.width(600.dp), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - IndeterminateHorizontalProgressBar(modifier = Modifier.width(500.dp)) - Text("----") - } - } - Column { - Row( - Modifier.width(600.dp), - horizontalArrangement = Arrangement.spacedBy(8.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Text("CircularProgress (16x16)") - CircularProgressIndicator() - } - Row( - Modifier.width(600.dp), - horizontalArrangement = Arrangement.spacedBy(8.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Text("CircularProgressBig (32x32) - Big") - CircularProgressIndicatorBig() - } - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/RadioButtons.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/RadioButtons.kt deleted file mode 100644 index a74e516471..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/RadioButtons.kt +++ /dev/null @@ -1,51 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.Outline -import org.jetbrains.jewel.ui.component.RadioButtonRow - -@Composable -@View(title = "RadioButtons", position = 2) -fun RadioButtons() { - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - var index by remember { mutableStateOf(0) } - RadioButtonRow( - text = "Default", - selected = index == 0, - onClick = { index = 0 }, - ) - - RadioButtonRow( - text = "Error", - selected = index == 1, - onClick = { index = 1 }, - outline = Outline.Error, - ) - - RadioButtonRow( - text = "Warning", - selected = index == 2, - onClick = { index = 2 }, - outline = Outline.Warning, - ) - - RadioButtonRow( - text = "Disabled", - selected = index == 3, - onClick = { index = 3 }, - enabled = false, - ) - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Slider.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Slider.kt deleted file mode 100644 index 659ec46977..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Slider.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.component.Slider - -@Composable -@View(title = "Sliders", position = 12) -fun Sliders() { - var value1 by remember { mutableStateOf(.45f) } - Slider( - value = value1, - onValueChange = { value1 = it }, - ) - - var value2 by remember { mutableStateOf(.7f) } - Slider( - value = value2, - onValueChange = { value2 = it }, - enabled = false, - ) - - var value3 by remember { mutableStateOf(33f) } - Slider( - value = value3, - onValueChange = { value3 = it }, - steps = 10, - valueRange = 0f..100f, - ) - - var value4 by remember { mutableStateOf(23f) } - Slider( - value = value4, - onValueChange = { value4 = it }, - steps = 10, - valueRange = 0f..100f, - enabled = false, - ) -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Tabs.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Tabs.kt deleted file mode 100644 index 588ea61b0e..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Tabs.kt +++ /dev/null @@ -1,171 +0,0 @@ -@file:Suppress("MagicNumber") - -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.size -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.drawWithCache -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.component.Icon -import org.jetbrains.jewel.ui.component.IconButton -import org.jetbrains.jewel.ui.component.SimpleTabContent -import org.jetbrains.jewel.ui.component.TabData -import org.jetbrains.jewel.ui.component.TabStrip -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.painter.hints.Stateful -import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider -import org.jetbrains.jewel.ui.theme.defaultTabStyle -import org.jetbrains.jewel.ui.util.thenIf -import kotlin.math.max - -@Composable -@View(title = "Tabs", position = 7) -fun Tabs() { - Text("Default tabs", Modifier.fillMaxWidth()) - DefaultTabShowcase() - - Spacer(Modifier.height(16.dp)) - Text("Editor tabs", Modifier.fillMaxWidth()) - EditorTabShowcase() -} - -@Composable -private fun DefaultTabShowcase() { - var selectedTabIndex by remember { mutableStateOf(0) } - - var tabIds by remember { mutableStateOf((1..12).toList()) } - val maxId = remember(tabIds) { tabIds.maxOrNull() ?: 0 } - - val tabs = remember(tabIds, selectedTabIndex) { - tabIds.mapIndexed { index, id -> - TabData.Default( - selected = index == selectedTabIndex, - content = { tabState -> - val iconProvider = - rememberResourcePainterProvider("icons/search.svg", StandaloneSampleIcons::class.java) - val icon by iconProvider.getPainter(Stateful(tabState)) - SimpleTabContent( - label = "Default Tab $id", - state = tabState, - icon = icon, - ) - }, - onClose = { - tabIds = tabIds.toMutableList().apply { removeAt(index) } - if (selectedTabIndex >= index) { - val maxPossibleIndex = max(0, tabIds.lastIndex) - selectedTabIndex = (selectedTabIndex - 1) - .coerceIn(0..maxPossibleIndex) - } - }, - onClick = { selectedTabIndex = index }, - ) - } - } - - TabStripWithAddButton(tabs) { - val insertionIndex = (selectedTabIndex + 1).coerceIn(0..tabIds.size) - val nextTabId = maxId + 1 - - tabIds = tabIds.toMutableList() - .apply { add(insertionIndex, nextTabId) } - selectedTabIndex = insertionIndex - } -} - -@Composable -private fun EditorTabShowcase() { - var selectedTabIndex by remember { mutableStateOf(0) } - - var tabIds by remember { mutableStateOf((1..12).toList()) } - val maxId = remember(tabIds) { tabIds.maxOrNull() ?: 0 } - - val tabs = remember(tabIds, selectedTabIndex) { - tabIds.mapIndexed { index, id -> - TabData.Editor( - selected = index == selectedTabIndex, - content = { tabState -> - SimpleTabContent( - state = tabState, - modifier = Modifier, - icon = { - Icon( - resource = "icons/search.svg", - contentDescription = null, - iconClass = StandaloneSampleIcons::class.java, - modifier = Modifier.size(16.dp).tabContentAlpha(state = tabState), - tint = Color.Magenta, - ) - }, - label = { Text("Editor tab $id") }, - ) - Box( - modifier = Modifier - .size(12.dp) - .thenIf(tabState.isHovered) { - drawWithCache { - onDrawBehind { - drawCircle(color = Color.Magenta.copy(alpha = .4f), radius = 6.dp.toPx()) - } - } - }, - ) - }, - onClose = { - tabIds = tabIds.toMutableList().apply { removeAt(index) } - if (selectedTabIndex >= index) { - val maxPossibleIndex = max(0, tabIds.lastIndex) - selectedTabIndex = (selectedTabIndex - 1) - .coerceIn(0..maxPossibleIndex) - } - }, - onClick = { selectedTabIndex = index }, - ) - } - } - - TabStripWithAddButton(tabs) { - val insertionIndex = (selectedTabIndex + 1).coerceIn(0..tabIds.size) - val nextTabId = maxId + 1 - - tabIds = tabIds.toMutableList() - .apply { add(insertionIndex, nextTabId) } - selectedTabIndex = insertionIndex - } -} - -@Composable -private fun TabStripWithAddButton( - tabs: List, - onAddClick: () -> Unit, -) { - Row(verticalAlignment = Alignment.CenterVertically) { - TabStrip(tabs, modifier = Modifier.weight(1f)) - - IconButton( - onClick = onAddClick, - modifier = Modifier.size(JewelTheme.defaultTabStyle.metrics.tabHeight), - ) { - Icon( - resource = "expui/general/add.svg", - contentDescription = "Add a tab", - StandaloneSampleIcons::class.java, - ) - } - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/TextAreas.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/TextAreas.kt deleted file mode 100644 index 8a93949fad..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/TextAreas.kt +++ /dev/null @@ -1,65 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.Outline -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.component.TextArea - -@Suppress("SpellCheckingInspection") -private const val LOREM_IPSUM = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. \n" + - "Sed auctor, neque in accumsan vehicula, enim purus vestibulum odio, non tristique dolor quam vel ipsum. \n" + - "Proin egestas, orci id hendrerit bibendum, nisl neque imperdiet nisl, a euismod nibh diam nec lectus. \n" + - "Duis euismod, quam nec aliquam iaculis, dolor lorem bibendum turpis, vel malesuada augue sapien vel mi. \n" + - "Quisque ut facilisis nibh. Maecenas euismod hendrerit sem, ac scelerisque odio auctor nec. \n" + - "Sed sit amet consequat eros. Donec nisl tellus, accumsan nec ligula in, eleifend sodales sem. \n" + - "Sed malesuada, nulla ac eleifend fermentum, nibh mi consequat quam, quis convallis lacus nunc eu dui. \n" + - "Pellentesque eget enim quis orci porttitor consequat sed sed quam. \n" + - "Sed aliquam, nisl et lacinia lacinia, diam nunc laoreet nisi, sit amet consectetur dolor lorem et sem. \n" + - "Duis ultricies, mauris in aliquam interdum, orci nulla finibus massa, a tristique urna sapien vel quam. \n" + - "Sed nec sapien nec dui rhoncus bibendum. Sed blandit bibendum libero." - -@Composable -@View(title = "TextAreas", position = 8) -fun TextAreas() { - Row( - Modifier.padding(horizontal = 16.dp).height(150.dp), - horizontalArrangement = Arrangement.spacedBy(16.dp), - verticalAlignment = Alignment.Top, - ) { - var text1 by remember { mutableStateOf(LOREM_IPSUM) } - TextArea(text1, { text1 = it }, modifier = Modifier.weight(1f)) - - var text2 by remember { mutableStateOf(LOREM_IPSUM) } - TextArea(text2, { text2 = it }, modifier = Modifier.weight(1f), enabled = false) - - var text3 by remember { mutableStateOf("") } - TextArea( - text3, - { text3 = it }, - modifier = Modifier.weight(1f), - outline = Outline.Error, - placeholder = { Text("Text area with error") }, - ) - - var text4 by remember { mutableStateOf("") } - TextArea( - text4, - { text4 = it }, - modifier = Modifier.weight(1f), - outline = Outline.Warning, - placeholder = { Text("Text area with warning") }, - ) - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/TextFields.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/TextFields.kt deleted file mode 100644 index 1bdb06dfc2..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/TextFields.kt +++ /dev/null @@ -1,153 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.animation.AnimatedVisibility -import androidx.compose.animation.fadeIn -import androidx.compose.animation.fadeOut -import androidx.compose.animation.slideInHorizontally -import androidx.compose.animation.slideOutHorizontally -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.size -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.input.pointer.PointerIcon -import androidx.compose.ui.input.pointer.pointerHoverIcon -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.intui.standalone.styling.dark -import org.jetbrains.jewel.intui.standalone.styling.defaults -import org.jetbrains.jewel.intui.standalone.styling.light -import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.Outline -import org.jetbrains.jewel.ui.component.Icon -import org.jetbrains.jewel.ui.component.IconButton -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.component.TextField -import org.jetbrains.jewel.ui.component.styling.IconButtonColors -import org.jetbrains.jewel.ui.component.styling.IconButtonMetrics -import org.jetbrains.jewel.ui.component.styling.IconButtonStyle -import org.jetbrains.jewel.ui.painter.hints.Stateful -import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider - -@Composable -@View(title = "TextFields", position = 9) -fun TextFields() { - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - var text1 by remember { mutableStateOf("TextField") } - TextField(text1, { text1 = it }) - - var text2 by remember { mutableStateOf("") } - TextField(text2, { text2 = it }, placeholder = { Text("Placeholder") }) - - var text3 by remember { mutableStateOf("") } - TextField(text3, { text3 = it }, outline = Outline.Error, placeholder = { Text("Error outline") }) - - var text4 by remember { mutableStateOf("") } - TextField(text4, { text4 = it }, outline = Outline.Warning, placeholder = { Text("Warning outline") }) - - var text5 by remember { mutableStateOf("Disabled") } - TextField(text5, { text5 = it }, enabled = false) - } - - Row( - horizontalArrangement = Arrangement.spacedBy(16.dp), - verticalAlignment = Alignment.Top, - ) { - var text1 by remember { mutableStateOf("") } - TextField( - value = text1, - onValueChange = { text1 = it }, - placeholder = { - Text("With leading icon") - }, - leadingIcon = { - Icon( - resource = "icons/search.svg", - contentDescription = "SearchIcon", - iconClass = StandaloneSampleIcons::class.java, - modifier = Modifier.size(16.dp), - ) - }, - ) - - var text2 by remember { mutableStateOf("") } - TextField( - value = text2, - onValueChange = { text2 = it }, - placeholder = { - Text("With trailing button") - }, - trailingIcon = { - CloseIconButton(text2.isNotEmpty()) { text2 = "" } - }, - ) - } -} - -@Composable -private fun CloseIconButton( - isVisible: Boolean, - onClick: () -> Unit, -) { - Box(Modifier.size(16.dp)) { - AnimatedVisibility( - visible = isVisible, - enter = fadeIn() + slideInHorizontally { it / 2 }, - exit = fadeOut() + slideOutHorizontally { it / 2 }, - ) { - // TODO replace when IconButton supports no-background style - val isDark = JewelTheme.isDark - - val colors = noBackgroundIconButtonColors(isDark) - val style = remember(isDark, colors) { - IconButtonStyle(colors, IconButtonMetrics.defaults()) - } - - IconButton( - onClick, - style = style, - modifier = Modifier.pointerHoverIcon(PointerIcon.Default), - ) { state -> - val painterProvider = - rememberResourcePainterProvider("icons/close.svg", StandaloneSampleIcons::class.java) - val painter by painterProvider.getPainter(Stateful(state)) - - Icon(painter, contentDescription = "Clear") - } - } - } -} - -@Composable -private fun noBackgroundIconButtonColors(isDark: Boolean) = if (isDark) { - IconButtonColors.dark( - background = Color.Unspecified, - backgroundDisabled = Color.Unspecified, - backgroundSelected = Color.Unspecified, - backgroundSelectedActivated = Color.Unspecified, - backgroundFocused = Color.Unspecified, - backgroundPressed = Color.Unspecified, - backgroundHovered = Color.Unspecified, - ) -} else { - IconButtonColors.light( - background = Color.Unspecified, - backgroundDisabled = Color.Unspecified, - backgroundSelected = Color.Unspecified, - backgroundSelectedActivated = Color.Unspecified, - backgroundFocused = Color.Unspecified, - backgroundPressed = Color.Unspecified, - backgroundHovered = Color.Unspecified, - ) -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Tooltips.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Tooltips.kt deleted file mode 100644 index d8de039ffc..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Tooltips.kt +++ /dev/null @@ -1,21 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.view.component - -import androidx.compose.foundation.border -import androidx.compose.foundation.layout.padding -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.samples.standalone.viewmodel.View -import org.jetbrains.jewel.ui.component.Text -import org.jetbrains.jewel.ui.component.Tooltip - -@Composable -@View(title = "Tooltips", position = 10) -fun Tooltips() { - Tooltip(tooltip = { - Text("This is a tooltip") - }) { - Text(modifier = Modifier.border(1.dp, JewelTheme.globalColors.borders.normal).padding(4.dp), text = "Hover Me!") - } -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/viewmodel/ComponentsViewModel.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/viewmodel/ComponentsViewModel.kt deleted file mode 100644 index 073b6f14da..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/viewmodel/ComponentsViewModel.kt +++ /dev/null @@ -1,14 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.viewmodel - -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.setValue -import androidx.compose.runtime.toMutableStateList -import org.jetbrains.jewel.samples.standalone.reflection.findViews - -object ComponentsViewModel { - - val views = findViews("org.jetbrains.jewel.samples.standalone.view.component").toMutableStateList() - - var currentView by mutableStateOf(views.first()) -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/viewmodel/MainViewModel.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/viewmodel/MainViewModel.kt deleted file mode 100644 index c45f0bfbf5..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/viewmodel/MainViewModel.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.viewmodel - -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.setValue -import androidx.compose.runtime.toMutableStateList -import androidx.compose.ui.graphics.Color -import org.jetbrains.jewel.samples.standalone.IntUiThemes -import org.jetbrains.jewel.samples.standalone.reflection.findViews - -object MainViewModel { - - var theme: IntUiThemes by mutableStateOf(IntUiThemes.Light) - - var swingCompat: Boolean by mutableStateOf(false) - - val projectColor - get() = if (theme.isLightHeader()) { - Color(0xFFF5D4C1) - } else { - Color(0xFF654B40) - } - - val views = findViews("org.jetbrains.jewel.samples.standalone.view").toMutableStateList() - - var currentView by mutableStateOf(views.first()) -} diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/viewmodel/View.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/viewmodel/View.kt deleted file mode 100644 index aec63c969a..0000000000 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/viewmodel/View.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.jetbrains.jewel.samples.standalone.viewmodel - -import androidx.compose.runtime.Composable - -data class ViewInfo( - val title: String, - val position: Int, - val icon: String, - val content: @Composable () -> Unit, -) - -@Target(AnnotationTarget.FUNCTION) -annotation class View( - val title: String, - val position: Int = 0, - val icon: String = "icons/stub.svg", -) diff --git a/samples/standalone/src/main/resources/expui/icons/close.svg b/samples/standalone/src/main/resources/expui/icons/close.svg deleted file mode 100644 index fe30bb83c8..0000000000 --- a/samples/standalone/src/main/resources/expui/icons/close.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/expui/icons/closeHovered.svg b/samples/standalone/src/main/resources/expui/icons/closeHovered.svg deleted file mode 100644 index a430bc8b28..0000000000 --- a/samples/standalone/src/main/resources/expui/icons/closeHovered.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/expui/icons/closeHovered_dark.svg b/samples/standalone/src/main/resources/expui/icons/closeHovered_dark.svg deleted file mode 100644 index d4c4ae0012..0000000000 --- a/samples/standalone/src/main/resources/expui/icons/closeHovered_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/expui/icons/close_dark.svg b/samples/standalone/src/main/resources/expui/icons/close_dark.svg deleted file mode 100644 index 14077166f2..0000000000 --- a/samples/standalone/src/main/resources/expui/icons/close_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/expui/icons/search.svg b/samples/standalone/src/main/resources/expui/icons/search.svg deleted file mode 100644 index bdcd000f01..0000000000 --- a/samples/standalone/src/main/resources/expui/icons/search.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/expui/icons/search_dark.svg b/samples/standalone/src/main/resources/expui/icons/search_dark.svg deleted file mode 100644 index 533a8d80b2..0000000000 --- a/samples/standalone/src/main/resources/expui/icons/search_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/fonts/Roboto/LICENSE.txt b/samples/standalone/src/main/resources/fonts/Roboto/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/samples/standalone/src/main/resources/fonts/Roboto/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Black.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Black.ttf deleted file mode 100644 index 2d45238365..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Black.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-BlackItalic.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-BlackItalic.ttf deleted file mode 100644 index 29a4359ed0..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-BlackItalic.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Bold.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Bold.ttf deleted file mode 100644 index d998cf5b46..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Bold.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-BoldItalic.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-BoldItalic.ttf deleted file mode 100644 index b4e2210393..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-BoldItalic.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Italic.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Italic.ttf deleted file mode 100644 index 5b390ff950..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Italic.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Light.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Light.ttf deleted file mode 100644 index 35267989de..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Light.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-LightItalic.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-LightItalic.ttf deleted file mode 100644 index 46e9bf7c95..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-LightItalic.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Medium.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Medium.ttf deleted file mode 100644 index f714a514d9..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Medium.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-MediumItalic.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-MediumItalic.ttf deleted file mode 100644 index 5dc6a2dc6c..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-MediumItalic.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Regular.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Regular.ttf deleted file mode 100644 index 2b6392ffe8..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Regular.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Thin.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Thin.ttf deleted file mode 100644 index 4e797cf7ef..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-Thin.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-ThinItalic.ttf b/samples/standalone/src/main/resources/fonts/Roboto/Roboto-ThinItalic.ttf deleted file mode 100644 index eea836f4a3..0000000000 Binary files a/samples/standalone/src/main/resources/fonts/Roboto/Roboto-ThinItalic.ttf and /dev/null differ diff --git a/samples/standalone/src/main/resources/icons/close.svg b/samples/standalone/src/main/resources/icons/close.svg deleted file mode 100644 index 4bfa01f23d..0000000000 --- a/samples/standalone/src/main/resources/icons/close.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/closeHovered.svg b/samples/standalone/src/main/resources/icons/closeHovered.svg deleted file mode 100644 index 21a6d4a52e..0000000000 --- a/samples/standalone/src/main/resources/icons/closeHovered.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/cwmAccess.svg b/samples/standalone/src/main/resources/icons/cwmAccess.svg deleted file mode 100644 index 5bf782005d..0000000000 --- a/samples/standalone/src/main/resources/icons/cwmAccess.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/cwmAccess@20x20.svg b/samples/standalone/src/main/resources/icons/cwmAccess@20x20.svg deleted file mode 100644 index 4d7dfd0984..0000000000 --- a/samples/standalone/src/main/resources/icons/cwmAccess@20x20.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/cwmAccess@20x20_dark.svg b/samples/standalone/src/main/resources/icons/cwmAccess@20x20_dark.svg deleted file mode 100644 index aaf65f88ee..0000000000 --- a/samples/standalone/src/main/resources/icons/cwmAccess@20x20_dark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/cwmAccess_dark.svg b/samples/standalone/src/main/resources/icons/cwmAccess_dark.svg deleted file mode 100644 index ad42caeccd..0000000000 --- a/samples/standalone/src/main/resources/icons/cwmAccess_dark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/darkTheme.svg b/samples/standalone/src/main/resources/icons/darkTheme.svg deleted file mode 100644 index 5ada6d350f..0000000000 --- a/samples/standalone/src/main/resources/icons/darkTheme.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/standalone/src/main/resources/icons/darkTheme@20x20.svg b/samples/standalone/src/main/resources/icons/darkTheme@20x20.svg deleted file mode 100644 index 5804d0e7fa..0000000000 --- a/samples/standalone/src/main/resources/icons/darkTheme@20x20.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/standalone/src/main/resources/icons/darkTheme@20x20_dark.svg b/samples/standalone/src/main/resources/icons/darkTheme@20x20_dark.svg deleted file mode 100644 index 512a748f01..0000000000 --- a/samples/standalone/src/main/resources/icons/darkTheme@20x20_dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/standalone/src/main/resources/icons/darkThemeSelected.svg b/samples/standalone/src/main/resources/icons/darkThemeSelected.svg deleted file mode 100644 index 0aeff6cdf4..0000000000 --- a/samples/standalone/src/main/resources/icons/darkThemeSelected.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/standalone/src/main/resources/icons/darkThemeSelected_dark.svg b/samples/standalone/src/main/resources/icons/darkThemeSelected_dark.svg deleted file mode 100644 index ee7aad5dc2..0000000000 --- a/samples/standalone/src/main/resources/icons/darkThemeSelected_dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/standalone/src/main/resources/icons/darkTheme_dark.svg b/samples/standalone/src/main/resources/icons/darkTheme_dark.svg deleted file mode 100644 index 4d65a04e27..0000000000 --- a/samples/standalone/src/main/resources/icons/darkTheme_dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/standalone/src/main/resources/icons/folderIcon.svg b/samples/standalone/src/main/resources/icons/folderIcon.svg deleted file mode 100644 index f55cba2ea9..0000000000 --- a/samples/standalone/src/main/resources/icons/folderIcon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/samples/standalone/src/main/resources/icons/folderIcon_dark.svg b/samples/standalone/src/main/resources/icons/folderIcon_dark.svg deleted file mode 100644 index a47d777543..0000000000 --- a/samples/standalone/src/main/resources/icons/folderIcon_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/samples/standalone/src/main/resources/icons/github.svg b/samples/standalone/src/main/resources/icons/github.svg deleted file mode 100644 index 0c7982bf9e..0000000000 --- a/samples/standalone/src/main/resources/icons/github.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/github@20x20.svg b/samples/standalone/src/main/resources/icons/github@20x20.svg deleted file mode 100644 index bf2e15399d..0000000000 --- a/samples/standalone/src/main/resources/icons/github@20x20.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/github@20x20_dark.svg b/samples/standalone/src/main/resources/icons/github@20x20_dark.svg deleted file mode 100644 index f4a865d257..0000000000 --- a/samples/standalone/src/main/resources/icons/github@20x20_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/github_dark.svg b/samples/standalone/src/main/resources/icons/github_dark.svg deleted file mode 100644 index d86c445535..0000000000 --- a/samples/standalone/src/main/resources/icons/github_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/gradleIcon.svg b/samples/standalone/src/main/resources/icons/gradleIcon.svg deleted file mode 100644 index a527ff7172..0000000000 --- a/samples/standalone/src/main/resources/icons/gradleIcon.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/gradleIcon_dark.svg b/samples/standalone/src/main/resources/icons/gradleIcon_dark.svg deleted file mode 100644 index 1b575a0879..0000000000 --- a/samples/standalone/src/main/resources/icons/gradleIcon_dark.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/jewel-logo.svg b/samples/standalone/src/main/resources/icons/jewel-logo.svg deleted file mode 100644 index 6ba5f71ece..0000000000 --- a/samples/standalone/src/main/resources/icons/jewel-logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/kotlin.svg b/samples/standalone/src/main/resources/icons/kotlin.svg deleted file mode 100644 index c2a7cfc39b..0000000000 --- a/samples/standalone/src/main/resources/icons/kotlin.svg +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightTheme.svg b/samples/standalone/src/main/resources/icons/lightTheme.svg deleted file mode 100644 index 7c43d86009..0000000000 --- a/samples/standalone/src/main/resources/icons/lightTheme.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightTheme@20x20.svg b/samples/standalone/src/main/resources/icons/lightTheme@20x20.svg deleted file mode 100644 index 0ce5e3e2a6..0000000000 --- a/samples/standalone/src/main/resources/icons/lightTheme@20x20.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightTheme@20x20_dark.svg b/samples/standalone/src/main/resources/icons/lightTheme@20x20_dark.svg deleted file mode 100644 index 52e715437d..0000000000 --- a/samples/standalone/src/main/resources/icons/lightTheme@20x20_dark.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightThemeSelected.svg b/samples/standalone/src/main/resources/icons/lightThemeSelected.svg deleted file mode 100644 index d54579f2e6..0000000000 --- a/samples/standalone/src/main/resources/icons/lightThemeSelected.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightThemeSelected_dark.svg b/samples/standalone/src/main/resources/icons/lightThemeSelected_dark.svg deleted file mode 100644 index 8c30307891..0000000000 --- a/samples/standalone/src/main/resources/icons/lightThemeSelected_dark.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightTheme_dark.svg b/samples/standalone/src/main/resources/icons/lightTheme_dark.svg deleted file mode 100644 index 9f06549540..0000000000 --- a/samples/standalone/src/main/resources/icons/lightTheme_dark.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme.svg b/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme.svg deleted file mode 100644 index be7f99bc5d..0000000000 --- a/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme@20x20.svg b/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme@20x20.svg deleted file mode 100644 index 64bd60a605..0000000000 --- a/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme@20x20.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme@20x20_dark.svg b/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme@20x20_dark.svg deleted file mode 100644 index 5f8493c9e1..0000000000 --- a/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme@20x20_dark.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightWithLightHeaderThemeSelected.svg b/samples/standalone/src/main/resources/icons/lightWithLightHeaderThemeSelected.svg deleted file mode 100644 index f894648f16..0000000000 --- a/samples/standalone/src/main/resources/icons/lightWithLightHeaderThemeSelected.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightWithLightHeaderThemeSelected_dark.svg b/samples/standalone/src/main/resources/icons/lightWithLightHeaderThemeSelected_dark.svg deleted file mode 100644 index eb72230ce1..0000000000 --- a/samples/standalone/src/main/resources/icons/lightWithLightHeaderThemeSelected_dark.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme_dark.svg b/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme_dark.svg deleted file mode 100644 index 69d7d5af95..0000000000 --- a/samples/standalone/src/main/resources/icons/lightWithLightHeaderTheme_dark.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/meetNewUi.svg b/samples/standalone/src/main/resources/icons/meetNewUi.svg deleted file mode 100644 index df2ebe276b..0000000000 --- a/samples/standalone/src/main/resources/icons/meetNewUi.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/meetNewUi@20x20.svg b/samples/standalone/src/main/resources/icons/meetNewUi@20x20.svg deleted file mode 100644 index 3f037124a7..0000000000 --- a/samples/standalone/src/main/resources/icons/meetNewUi@20x20.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/meetNewUi@20x20_dark.svg b/samples/standalone/src/main/resources/icons/meetNewUi@20x20_dark.svg deleted file mode 100644 index f050604054..0000000000 --- a/samples/standalone/src/main/resources/icons/meetNewUi@20x20_dark.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/meetNewUi_dark.svg b/samples/standalone/src/main/resources/icons/meetNewUi_dark.svg deleted file mode 100644 index 7c3060e6fa..0000000000 --- a/samples/standalone/src/main/resources/icons/meetNewUi_dark.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/nodejsIcon.svg b/samples/standalone/src/main/resources/icons/nodejsIcon.svg deleted file mode 100644 index ee5c03aac3..0000000000 --- a/samples/standalone/src/main/resources/icons/nodejsIcon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/samples/standalone/src/main/resources/icons/restart.svg b/samples/standalone/src/main/resources/icons/restart.svg deleted file mode 100644 index db7a114018..0000000000 --- a/samples/standalone/src/main/resources/icons/restart.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/restart_dark.svg b/samples/standalone/src/main/resources/icons/restart_dark.svg deleted file mode 100644 index 661a7661a3..0000000000 --- a/samples/standalone/src/main/resources/icons/restart_dark.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/search.svg b/samples/standalone/src/main/resources/icons/search.svg deleted file mode 100644 index bdcd000f01..0000000000 --- a/samples/standalone/src/main/resources/icons/search.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/search@20x20.svg b/samples/standalone/src/main/resources/icons/search@20x20.svg deleted file mode 100644 index 183a6100ce..0000000000 --- a/samples/standalone/src/main/resources/icons/search@20x20.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/search@20x20_dark.svg b/samples/standalone/src/main/resources/icons/search@20x20_dark.svg deleted file mode 100644 index 27f0332d13..0000000000 --- a/samples/standalone/src/main/resources/icons/search@20x20_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/search_dark.svg b/samples/standalone/src/main/resources/icons/search_dark.svg deleted file mode 100644 index 533a8d80b2..0000000000 --- a/samples/standalone/src/main/resources/icons/search_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/settings.svg b/samples/standalone/src/main/resources/icons/settings.svg deleted file mode 100644 index c30de82092..0000000000 --- a/samples/standalone/src/main/resources/icons/settings.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/settings@20x20.svg b/samples/standalone/src/main/resources/icons/settings@20x20.svg deleted file mode 100644 index fbe2af4df0..0000000000 --- a/samples/standalone/src/main/resources/icons/settings@20x20.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/settings@20x20_dark.svg b/samples/standalone/src/main/resources/icons/settings@20x20_dark.svg deleted file mode 100644 index cc63783053..0000000000 --- a/samples/standalone/src/main/resources/icons/settings@20x20_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/settings_dark.svg b/samples/standalone/src/main/resources/icons/settings_dark.svg deleted file mode 100644 index 62f328167a..0000000000 --- a/samples/standalone/src/main/resources/icons/settings_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/structure.svg b/samples/standalone/src/main/resources/icons/structure.svg deleted file mode 100644 index 2eb5c259db..0000000000 --- a/samples/standalone/src/main/resources/icons/structure.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/structure@20x20.svg b/samples/standalone/src/main/resources/icons/structure@20x20.svg deleted file mode 100644 index 4f653505b0..0000000000 --- a/samples/standalone/src/main/resources/icons/structure@20x20.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/structure@20x20_dark.svg b/samples/standalone/src/main/resources/icons/structure@20x20_dark.svg deleted file mode 100644 index 5b05e888e9..0000000000 --- a/samples/standalone/src/main/resources/icons/structure@20x20_dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/icons/structure_dark.svg b/samples/standalone/src/main/resources/icons/structure_dark.svg deleted file mode 100644 index 6b57d14ff7..0000000000 --- a/samples/standalone/src/main/resources/icons/structure_dark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/stub.svg b/samples/standalone/src/main/resources/icons/stub.svg deleted file mode 100644 index 97bacc6fdf..0000000000 --- a/samples/standalone/src/main/resources/icons/stub.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/stub@20x20.svg b/samples/standalone/src/main/resources/icons/stub@20x20.svg deleted file mode 100644 index 5a1b46de82..0000000000 --- a/samples/standalone/src/main/resources/icons/stub@20x20.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/stub@20x20_dark.svg b/samples/standalone/src/main/resources/icons/stub@20x20_dark.svg deleted file mode 100644 index bb99ab03b8..0000000000 --- a/samples/standalone/src/main/resources/icons/stub@20x20_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/stub_dark.svg b/samples/standalone/src/main/resources/icons/stub_dark.svg deleted file mode 100644 index 967cfcf58a..0000000000 --- a/samples/standalone/src/main/resources/icons/stub_dark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/systemTheme.svg b/samples/standalone/src/main/resources/icons/systemTheme.svg deleted file mode 100644 index 64913c1726..0000000000 --- a/samples/standalone/src/main/resources/icons/systemTheme.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/systemTheme@20x20.svg b/samples/standalone/src/main/resources/icons/systemTheme@20x20.svg deleted file mode 100644 index fddffc9295..0000000000 --- a/samples/standalone/src/main/resources/icons/systemTheme@20x20.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/systemTheme@20x20_dark.svg b/samples/standalone/src/main/resources/icons/systemTheme@20x20_dark.svg deleted file mode 100644 index c84e09a2e9..0000000000 --- a/samples/standalone/src/main/resources/icons/systemTheme@20x20_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/icons/systemThemeSelected.svg b/samples/standalone/src/main/resources/icons/systemThemeSelected.svg deleted file mode 100644 index 33d57f0513..0000000000 --- a/samples/standalone/src/main/resources/icons/systemThemeSelected.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/systemThemeSelected_dark.svg b/samples/standalone/src/main/resources/icons/systemThemeSelected_dark.svg deleted file mode 100644 index e4bd8c294f..0000000000 --- a/samples/standalone/src/main/resources/icons/systemThemeSelected_dark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/systemTheme_dark.svg b/samples/standalone/src/main/resources/icons/systemTheme_dark.svg deleted file mode 100644 index e319b40865..0000000000 --- a/samples/standalone/src/main/resources/icons/systemTheme_dark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/icons/taskGroup.svg b/samples/standalone/src/main/resources/icons/taskGroup.svg deleted file mode 100644 index bf4283762e..0000000000 --- a/samples/standalone/src/main/resources/icons/taskGroup.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/samples/standalone/src/main/resources/icons/taskGroup_dark.svg b/samples/standalone/src/main/resources/icons/taskGroup_dark.svg deleted file mode 100644 index e065e8c4d2..0000000000 --- a/samples/standalone/src/main/resources/icons/taskGroup_dark.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/samples/standalone/src/main/resources/images/New UI Image.png b/samples/standalone/src/main/resources/images/New UI Image.png deleted file mode 100644 index 5123034aad..0000000000 Binary files a/samples/standalone/src/main/resources/images/New UI Image.png and /dev/null differ diff --git a/samples/standalone/src/main/resources/images/New UI Image@2x.png b/samples/standalone/src/main/resources/images/New UI Image@2x.png deleted file mode 100644 index 107f01890b..0000000000 Binary files a/samples/standalone/src/main/resources/images/New UI Image@2x.png and /dev/null differ diff --git a/samples/standalone/src/main/resources/images/android-head.svg b/samples/standalone/src/main/resources/images/android-head.svg deleted file mode 100644 index 5a4c937a56..0000000000 --- a/samples/standalone/src/main/resources/images/android-head.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/samples/standalone/src/main/resources/images/android-head_dark.svg b/samples/standalone/src/main/resources/images/android-head_dark.svg deleted file mode 100644 index 5a4c937a56..0000000000 --- a/samples/standalone/src/main/resources/images/android-head_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/samples/standalone/src/main/resources/images/android-studio.svg b/samples/standalone/src/main/resources/images/android-studio.svg deleted file mode 100644 index 9dfcb756c9..0000000000 --- a/samples/standalone/src/main/resources/images/android-studio.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/standalone/src/main/resources/images/help.svg b/samples/standalone/src/main/resources/images/help.svg deleted file mode 100644 index 01724167b4..0000000000 --- a/samples/standalone/src/main/resources/images/help.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/images/help_dark.svg b/samples/standalone/src/main/resources/images/help_dark.svg deleted file mode 100644 index 823a96f5f5..0000000000 --- a/samples/standalone/src/main/resources/images/help_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/organization/avatar.svg b/samples/standalone/src/main/resources/organization/avatar.svg deleted file mode 100644 index 770efe4a0d..0000000000 --- a/samples/standalone/src/main/resources/organization/avatar.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/organization/dashboard.svg b/samples/standalone/src/main/resources/organization/dashboard.svg deleted file mode 100644 index 5cff5244f0..0000000000 --- a/samples/standalone/src/main/resources/organization/dashboard.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/samples/standalone/src/main/resources/organization/notifications.svg b/samples/standalone/src/main/resources/organization/notifications.svg deleted file mode 100644 index 0f3f5e5821..0000000000 --- a/samples/standalone/src/main/resources/organization/notifications.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/standalone/src/main/resources/organization/projects.svg b/samples/standalone/src/main/resources/organization/projects.svg deleted file mode 100644 index e3da854713..0000000000 --- a/samples/standalone/src/main/resources/organization/projects.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/samples/standalone/src/main/resources/organization/teams.svg b/samples/standalone/src/main/resources/organization/teams.svg deleted file mode 100644 index fae7102a53..0000000000 --- a/samples/standalone/src/main/resources/organization/teams.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/standalone/src/main/resources/organization/toolbox.svg b/samples/standalone/src/main/resources/organization/toolbox.svg deleted file mode 100644 index 9780dac5ab..0000000000 --- a/samples/standalone/src/main/resources/organization/toolbox.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/settings.gradle.kts b/settings.gradle.kts index 3e3ec89387..9998e45099 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -32,11 +32,7 @@ plugins { include( ":ui", ":foundation", - ":decorated-window", - ":int-ui:int-ui-decorated-window", - ":int-ui:int-ui-standalone", ":ide-laf-bridge", - ":samples:standalone", ":samples:ide-plugin", )