cell selection color corrected

This commit is contained in:
Dennis Ushakov
2012-01-27 17:39:46 +04:00
parent e979928d2d
commit 2b7d2ffa63
2 changed files with 23 additions and 5 deletions
@@ -67,7 +67,17 @@ public class GridCellImpl implements GridCell {
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)) {
@@ -89,8 +99,8 @@ public class GridCellImpl implements GridCell {
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) {
@@ -1614,8 +1614,8 @@ public class JBTabsImpl extends JComponent
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;
@@ -1674,6 +1674,14 @@ public class JBTabsImpl extends JComponent
paintBorder(g2d, shapeInfo, borderColor);
}
protected Color getFocusedTopFillColor() {
return UIUtil.getFocusedFillColor();
}
protected Color getFocusedBottomFillColor() {
return UIUtil.getFocusedFillColor();
}
protected ShapeInfo computeSelectedLabelShape() {
final ShapeInfo shape = new ShapeInfo();