From 87d0e72d34af9eeb86b5ec4fd09de7d481c9c47d Mon Sep 17 00:00:00 2001 From: Rustam Vishnyakov Date: Wed, 12 Oct 2016 17:12:30 +0300 Subject: [PATCH] Breadcrumbs color settings [IDEA-CR-14449] --- .../openapi/editor/colors/EditorColors.java | 5 + .../colors/pages/GeneralColorsPage.java | 7 +- .../src/messages/OptionsBundle.properties | 4 + .../src/DefaultColorSchemesManager.xml | 92 +++++++++++++------ .../xml/breadcrumbs/BreadcrumbsComponent.java | 58 +++++------- 5 files changed, 104 insertions(+), 62 deletions(-) diff --git a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColors.java b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColors.java index dfa532ce3637..baeceb4a43c7 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColors.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColors.java @@ -66,4 +66,9 @@ public interface EditorColors { ColorKey BORDER_LINES_COLOR = ColorKey.createColorKey("BORDER_LINES_COLOR"); TextAttributesKey INJECTED_LANGUAGE_FRAGMENT = TextAttributesKey.createTextAttributesKey("INJECTED_LANGUAGE_FRAGMENT"); + + TextAttributesKey BREADCRUMBS_DEFAULT = TextAttributesKey.createTextAttributesKey("BREADCRUMBS_DEFAULT"); + TextAttributesKey BREADCRUMBS_HOVERED = TextAttributesKey.createTextAttributesKey("BREADCRUMBS_HOVERED"); + TextAttributesKey BREADCRUMBS_CURRENT = TextAttributesKey.createTextAttributesKey("BREADCRUMBS_CURRENT"); + TextAttributesKey BREADCRUMBS_INACTIVE = TextAttributesKey.createTextAttributesKey("BREADCRUMBS_INACTIVE"); } diff --git a/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/GeneralColorsPage.java b/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/GeneralColorsPage.java index e6e012e3e099..5b0841759ecf 100644 --- a/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/GeneralColorsPage.java +++ b/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/GeneralColorsPage.java @@ -97,7 +97,12 @@ public class GeneralColorsPage implements ColorSettingsPage, InspectionColorSett new AttributesDescriptor(OptionsBundle.message("options.java.color.descriptor.full.coverage"), CodeInsightColors.LINE_FULL_COVERAGE), new AttributesDescriptor(OptionsBundle.message("options.java.color.descriptor.partial.coverage"), CodeInsightColors.LINE_PARTIAL_COVERAGE), - new AttributesDescriptor(OptionsBundle.message("options.java.color.descriptor.none.coverage"), CodeInsightColors.LINE_NONE_COVERAGE) + new AttributesDescriptor(OptionsBundle.message("options.java.color.descriptor.none.coverage"), CodeInsightColors.LINE_NONE_COVERAGE), + + new AttributesDescriptor(OptionsBundle.message("options.general.color.descriptor.breadcrumbs.default"), EditorColors.BREADCRUMBS_DEFAULT), + new AttributesDescriptor(OptionsBundle.message("options.general.color.descriptor.breadcrumbs.hovered"), EditorColors.BREADCRUMBS_HOVERED), + new AttributesDescriptor(OptionsBundle.message("options.general.color.descriptor.breadcrumbs.current"), EditorColors.BREADCRUMBS_CURRENT), + new AttributesDescriptor(OptionsBundle.message("options.general.color.descriptor.breadcrumbs.inactive"), EditorColors.BREADCRUMBS_INACTIVE) }; private static final ColorDescriptor[] COLOR_DESCRIPTORS = { diff --git a/platform/platform-resources-en/src/messages/OptionsBundle.properties b/platform/platform-resources-en/src/messages/OptionsBundle.properties index c8aae0db91f9..d42b3dd515cb 100644 --- a/platform/platform-resources-en/src/messages/OptionsBundle.properties +++ b/platform/platform-resources-en/src/messages/OptionsBundle.properties @@ -153,6 +153,10 @@ options.general.color.descriptor.reference.hyperlink=Hyperlinks//Reference options.general.color.descriptor.todo.defaults=Code//TODO defaults options.general.color.descriptor.bookmarks=Editor//Bookmarks options.general.color.soft.wrap.sign=Text//Soft wrap sign +options.general.color.descriptor.breadcrumbs.default=Editor//Breadcrumbs//Default +options.general.color.descriptor.breadcrumbs.hovered=Editor//Breadcrumbs//Hovered +options.general.color.descriptor.breadcrumbs.current=Editor//Breadcrumbs//Current +options.general.color.descriptor.breadcrumbs.inactive=Editor//Breadcrumbs//Inactive options.language.defaults.display.name=Language Defaults diff --git a/platform/platform-resources/src/DefaultColorSchemesManager.xml b/platform/platform-resources/src/DefaultColorSchemesManager.xml index 5e9e248ce333..521e291dae00 100644 --- a/platform/platform-resources/src/DefaultColorSchemesManager.xml +++ b/platform/platform-resources/src/DefaultColorSchemesManager.xml @@ -58,19 +58,6 @@