cell selection color corrected
authorDennis Ushakov <dennis.ushakov@gmail.com>
Fri, 27 Jan 2012 11:39:48 +0000 (15:39 +0400)
committerDennis Ushakov <dennis.ushakov@gmail.com>
Fri, 27 Jan 2012 13:39:46 +0000 (17:39 +0400)
platform/lang-impl/src/com/intellij/execution/ui/layout/impl/GridCellImpl.java
platform/platform-api/src/com/intellij/ui/tabs/impl/JBTabsImpl.java

index 53df6f2e8ea8b7a8c4066b87924dbf04ecef6259..8a03f1bc543fcfd3b27e61cbee12f28ca9c570ca 100644 (file)
@@ -67,7 +67,17 @@ public class GridCellImpl implements GridCell {
 
     myPlaceInGrid = placeInGrid;
     myPlaceholder = placeholder;
 
     myPlaceInGrid = placeInGrid;
     myPlaceholder = placeholder;
-    myTabs = new JBTabsImpl(myContext.getProject(), myContext.getActionManager(), myContext.getFocusManager(), container).setDataProvider(new DataProvider() {
+    myTabs = new JBTabsImpl(myContext.getProject(), myContext.getActionManager(), myContext.getFocusManager(), container) {
+      @Override
+      protected Color getFocusedTopFillColor() {
+        return new Color(202, 211, 227);
+      }
+
+      @Override
+      protected Color getFocusedBottomFillColor() {
+        return new Color(194, 203, 219);
+      }
+    }.setDataProvider(new DataProvider() {
       @Nullable
       public Object getData(@NonNls final String dataId) {
         if (ViewContext.CONTENT_KEY.is(dataId)) {
       @Nullable
       public Object getData(@NonNls final String dataId) {
         if (ViewContext.CONTENT_KEY.is(dataId)) {
@@ -89,8 +99,8 @@ public class GridCellImpl implements GridCell {
         return new UiDecoration(null, new Insets(1, -1, 1, -1));
       }
     }).setSideComponentVertical(!context.getLayoutSettings().isToolbarHorizontal())
         return new UiDecoration(null, new Insets(1, -1, 1, -1));
       }
     }).setSideComponentVertical(!context.getLayoutSettings().isToolbarHorizontal())
-      .setStealthTabMode(true)
-      .setFocusCycle(false).setPaintFocus(true).setProvideSwitchTargets(false).setTabDraggingEnabled(true);
+      .setStealthTabMode(true).setFocusCycle(false).setPaintFocus(true)
+      .setProvideSwitchTargets(false).setTabDraggingEnabled(true);
 
     myTabs.addTabMouseListener(new MouseAdapter() {
       public void mousePressed(final MouseEvent e) {
 
     myTabs.addTabMouseListener(new MouseAdapter() {
       public void mousePressed(final MouseEvent e) {
index 6d49d1718d60c5beae3ce0f95042340d2dd3aa8a..a360e8af39ab44bd04fb476d860ba8fc19f9a677 100644 (file)
@@ -1614,8 +1614,8 @@ public class JBTabsImpl extends JComponent
     if (paintFocused) {
       final Color bgColor = getActiveTabColor(getActiveTabFillIn());
       if (bgColor == null) {
     if (paintFocused) {
       final Color bgColor = getActiveTabColor(getActiveTabFillIn());
       if (bgColor == null) {
-        shapeInfo.from = UIUtil.getFocusedFillColor();
-        shapeInfo.to = UIUtil.getFocusedFillColor();
+        shapeInfo.from = getFocusedTopFillColor();
+        shapeInfo.to = getFocusedBottomFillColor();
       }
       else {
         bgPreFill = bgColor;
       }
       else {
         bgPreFill = bgColor;
@@ -1674,6 +1674,14 @@ public class JBTabsImpl extends JComponent
     paintBorder(g2d, shapeInfo, borderColor);
   }
 
     paintBorder(g2d, shapeInfo, borderColor);
   }
 
+  protected Color getFocusedTopFillColor() {
+    return UIUtil.getFocusedFillColor();
+  }
+
+  protected Color getFocusedBottomFillColor() {
+    return UIUtil.getFocusedFillColor();
+  }
+
   protected ShapeInfo computeSelectedLabelShape() {
     final ShapeInfo shape = new ShapeInfo();
 
   protected ShapeInfo computeSelectedLabelShape() {
     final ShapeInfo shape = new ShapeInfo();