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 2a15af6334c3c..cdfede21b134a 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 @@ -27,6 +27,11 @@ public interface EditorColors { ColorKey SCROLLBAR_THUMB_COLOR = ColorKey.createColorKey(SystemInfo.isMac ? "ScrollBar.Mac.thumbColor" : "ScrollBar.thumbColor"); ColorKey SCROLLBAR_THUMB_WHILE_SCROLLING_COLOR = ColorKey.createColorKey(SystemInfo.isMac ? "ScrollBar.Mac.hoverThumbColor" : "ScrollBar.hoverThumbColor"); + TextAttributesKey TAB_SELECTED = TextAttributesKey.createTextAttributesKey("TAB_SELECTED"); + TextAttributesKey TAB_SELECTED_INACTIVE = TextAttributesKey.createTextAttributesKey("TAB_SELECTED_INACTIVE"); + ColorKey TAB_UNDERLINE = ColorKey.createColorKey("TAB_UNDERLINE"); + ColorKey TAB_UNDERLINE_INACTIVE = ColorKey.createColorKey("TAB_UNDERLINE_INACTIVE"); + TextAttributesKey REFERENCE_HYPERLINK_COLOR = TextAttributesKey.createTextAttributesKey("CTRL_CLICKABLE", new TextAttributes(JBColor.blue, null, JBColor.blue, EffectType.LINE_UNDERSCORE, Font.PLAIN)); 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 eba87aee1b9e9..6bc33f12567a3 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 @@ -107,6 +107,9 @@ public class GeneralColorsPage implements ColorSettingsPage, InspectionColorSett 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), + new AttributesDescriptor(OptionsBundle.message("options.general.color.descriptor.tabs.selected.tab"), EditorColors.TAB_SELECTED), + new AttributesDescriptor(OptionsBundle.message("options.general.color.descriptor.tabs.selected.tab.inactive"), EditorColors.TAB_SELECTED_INACTIVE), + new AttributesDescriptor(OptionsBundle.message("options.general.color.descriptor.popups.lens"), EditorColors.CODE_LENS_BORDER_COLOR) }; @@ -120,6 +123,8 @@ public class GeneralColorsPage implements ColorSettingsPage, InspectionColorSett new ColorDescriptor(OptionsBundle.message("options.general.color.descriptor.selection.foreground"), EditorColors.SELECTION_FOREGROUND_COLOR, ColorDescriptor.Kind.FOREGROUND), new ColorDescriptor(OptionsBundle.message("options.general.color.descriptor.scrollbar.thumb.while.scrolling"), EditorColors.SCROLLBAR_THUMB_WHILE_SCROLLING_COLOR, ColorDescriptor.Kind.BACKGROUND_WITH_TRANSPARENCY), new ColorDescriptor(OptionsBundle.message("options.general.color.descriptor.scrollbar.thumb"), EditorColors.SCROLLBAR_THUMB_COLOR, ColorDescriptor.Kind.BACKGROUND_WITH_TRANSPARENCY), + new ColorDescriptor(OptionsBundle.message("options.general.color.descriptor.tabs.selected.underline"), EditorColors.TAB_UNDERLINE, ColorDescriptor.Kind.BACKGROUND), + new ColorDescriptor(OptionsBundle.message("options.general.color.descriptor.tabs.selected.underline.inactive"), EditorColors.TAB_UNDERLINE_INACTIVE, ColorDescriptor.Kind.BACKGROUND), new ColorDescriptor(OptionsBundle.message("options.general.color.descriptor.caret"), EditorColors.CARET_COLOR, ColorDescriptor.Kind.FOREGROUND), new ColorDescriptor(OptionsBundle.message("options.general.color.descriptor.caret.row"), EditorColors.CARET_ROW_COLOR, ColorDescriptor.Kind.BACKGROUND), new ColorDescriptor(OptionsBundle.message("options.general.color.descriptor.right.margin"), EditorColors.RIGHT_MARGIN_COLOR, ColorDescriptor.Kind.FOREGROUND), diff --git a/platform/platform-api/src/com/intellij/ui/tabs/impl/themes/TabTheme.kt b/platform/platform-api/src/com/intellij/ui/tabs/impl/themes/TabTheme.kt index d17eb13093e5c..06584555a0adf 100644 --- a/platform/platform-api/src/com/intellij/ui/tabs/impl/themes/TabTheme.kt +++ b/platform/platform-api/src/com/intellij/ui/tabs/impl/themes/TabTheme.kt @@ -1,6 +1,9 @@ // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.ui.tabs.impl.themes +import com.intellij.openapi.editor.colors.EditorColors +import com.intellij.openapi.editor.colors.EditorColorsManager +import com.intellij.openapi.editor.colors.EditorColorsScheme import com.intellij.util.ui.JBUI import java.awt.Color @@ -37,29 +40,39 @@ open class DefaultTabTheme : TabTheme { } class EditorTabTheme : TabTheme { + val globalScheme: EditorColorsScheme + get() = EditorColorsManager.getInstance().globalScheme + override val background: Color? get() = JBUI.CurrentTheme.EditorTabs.background() override val borderColor: Color get() = JBUI.CurrentTheme.EditorTabs.borderColor() + override val underlineColor: Color - get() = JBUI.CurrentTheme.EditorTabs.underlineColor() + get() = globalScheme.getColor(EditorColors.TAB_UNDERLINE) ?: JBUI.CurrentTheme.EditorTabs.underlineColor() + override val inactiveUnderlineColor: Color - get() = JBUI.CurrentTheme.EditorTabs.inactiveUnderlineColor() + get() = globalScheme.getColor(EditorColors.TAB_UNDERLINE_INACTIVE) ?: JBUI.CurrentTheme.EditorTabs.inactiveUnderlineColor() + override val hoverBackground: Color get() = JBUI.CurrentTheme.EditorTabs.hoverBackground() override val underlinedTabBackground: Color? - get() = JBUI.CurrentTheme.EditorTabs.underlinedTabBackground() + get() = globalScheme.getAttributes(EditorColors.TAB_SELECTED).backgroundColor?: JBUI.CurrentTheme.EditorTabs.underlinedTabBackground() + override val underlinedTabForeground: Color - get() = JBUI.CurrentTheme.EditorTabs.underlinedTabForeground() + get() = globalScheme.getAttributes(EditorColors.TAB_SELECTED).foregroundColor?: JBUI.CurrentTheme.EditorTabs.underlinedTabForeground() + override val underlineHeight: Int get() = JBUI.CurrentTheme.EditorTabs.underlineHeight() override val hoverInactiveBackground: Color? get() = hoverBackground + override val underlinedTabInactiveBackground: Color? - get() = underlinedTabBackground + get() = globalScheme.getAttributes(EditorColors.TAB_SELECTED_INACTIVE).backgroundColor?: underlinedTabBackground + override val underlinedTabInactiveForeground: Color - get() = underlinedTabForeground + get() = globalScheme.getAttributes(EditorColors.TAB_SELECTED_INACTIVE).foregroundColor?: underlinedTabForeground val inactiveColoredFileBackground: Color? get() = JBUI.CurrentTheme.EditorTabs.inactiveColoredFileBackground() diff --git a/platform/platform-resources-en/src/messages/OptionsBundle.properties b/platform/platform-resources-en/src/messages/OptionsBundle.properties index 880780eab3c06..3552aac97c955 100644 --- a/platform/platform-resources-en/src/messages/OptionsBundle.properties +++ b/platform/platform-resources-en/src/messages/OptionsBundle.properties @@ -136,6 +136,10 @@ options.general.color.descriptor.selection.background=Editor//Selection backgrou options.general.color.descriptor.selection.foreground=Editor//Selection foreground options.general.color.descriptor.scrollbar.thumb.while.scrolling=Editor//Vertical Scrollbar//Thumb while scrolling options.general.color.descriptor.scrollbar.thumb=Editor//Vertical Scrollbar//Thumb +options.general.color.descriptor.tabs.selected.tab=Editor//Tabs//Selected Tab +options.general.color.descriptor.tabs.selected.tab.inactive=Editor//Tabs//Selected Tab inactive +options.general.color.descriptor.tabs.selected.underline=Editor//Tabs//Underline +options.general.color.descriptor.tabs.selected.underline.inactive=Editor//Tabs//Underline inactive options.general.color.descriptor.caret=Editor//Caret options.general.color.descriptor.caret.row=Editor//Caret row options.general.color.descriptor.right.margin=Editor//Guides//Hard wrap guide