From 31144276f445bf2aca15a049ca1dfea8f2636e9d Mon Sep 17 00:00:00 2001 From: Sergei Tachenov Date: Mon, 1 Jul 2024 13:28:58 +0300 Subject: [PATCH] IJPL-148224 Update license info card design According to the new mockups, use radio buttons instead of multiple Activate buttons. Remove the separators. GitOrigin-RevId: c6d74699077340eb90b06ad3c241f447c56b5682 --- .../ide/ui/laf/darcula/ui/DarculaRadioButtonUI.java | 6 ++++++ .../src/themes/expUI/expUI_dark.theme.json | 3 +-- .../src/themes/expUI/expUI_light.theme.json | 3 +-- .../themes/metadata/IntelliJPlatform.themeMetadata.json | 4 ---- platform/util/ui/src/com/intellij/util/ui/JBUI.java | 7 ------- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaRadioButtonUI.java b/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaRadioButtonUI.java index bf3ca1c25efe..aeb5487a010b 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaRadioButtonUI.java +++ b/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaRadioButtonUI.java @@ -6,6 +6,7 @@ import com.intellij.ui.scale.JBUIScale; import com.intellij.util.ui.EmptyIcon; import com.intellij.util.ui.JBUI; import com.intellij.util.ui.LafIconLookup; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import javax.swing.*; @@ -77,6 +78,11 @@ public class DarculaRadioButtonUI extends MetalRadioButtonUI { paintIcon(c, g, layout.iconRect); } + @ApiStatus.Internal + public @NotNull Rectangle getTextRect(@NotNull JRadioButton b) { + return createLayout(b, b.getSize()).textRect; + } + protected boolean removeInsetsBeforeLayout(AbstractButton b) { return !(b.getBorder() instanceof DarculaRadioButtonBorder); } diff --git a/platform/platform-resources/src/themes/expUI/expUI_dark.theme.json b/platform/platform-resources/src/themes/expUI/expUI_dark.theme.json index 2c6a762d9add..1190345186ab 100644 --- a/platform/platform-resources/src/themes/expUI/expUI_dark.theme.json +++ b/platform/platform-resources/src/themes/expUI/expUI_dark.theme.json @@ -869,8 +869,7 @@ "termsAndConditionsForeground": "Gray7", "separatorColor": "Gray3", "LicenseList": { - "licenseDetailsForeground": "Gray9", - "separatorColor": "Gray6" + "licenseDetailsForeground": "Gray9" } }, diff --git a/platform/platform-resources/src/themes/expUI/expUI_light.theme.json b/platform/platform-resources/src/themes/expUI/expUI_light.theme.json index 81689088e0c0..22187cd497d2 100644 --- a/platform/platform-resources/src/themes/expUI/expUI_light.theme.json +++ b/platform/platform-resources/src/themes/expUI/expUI_light.theme.json @@ -920,8 +920,7 @@ "termsAndConditionsForeground": "Gray8", "separatorColor": "Gray12", "LicenseList": { - "licenseDetailsForeground": "Gray6", - "separatorColor": "Gray9" + "licenseDetailsForeground": "Gray6" } }, diff --git a/platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json b/platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json index 6884f508cf98..b3d560f47a16 100644 --- a/platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json +++ b/platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json @@ -2518,10 +2518,6 @@ { "key": "LicenseDialog.LicenseList.licenseDetailsForeground", "since": "2024.2" - }, - { - "key": "LicenseDialog.LicenseList.separatorColor", - "since": "2024.2" } ] } diff --git a/platform/util/ui/src/com/intellij/util/ui/JBUI.java b/platform/util/ui/src/com/intellij/util/ui/JBUI.java index 7eb45a5fa7e1..fdf1a246d7de 100644 --- a/platform/util/ui/src/com/intellij/util/ui/JBUI.java +++ b/platform/util/ui/src/com/intellij/util/ui/JBUI.java @@ -2456,16 +2456,9 @@ public final class JBUI { private static final @NotNull Color LICENSE_DETAILS_COLOR = JBColor.namedColor("LicenseDialog.LicenseList.licenseDetailsForeground", 0xC9CCD6, 0x9DA0A8); - private static final @NotNull Color SEPARATOR_COLOR = - JBColor.namedColor("LicenseDialog.LicenseList.separatorColor", 0x818594, 0x6F737A); - public static @NotNull Color getLicenseDetailsColor() { return LICENSE_DETAILS_COLOR; } - - public static @NotNull Color getSeparatorColor() { - return SEPARATOR_COLOR; - } } } }