painting glitch in bottom tabs

This commit is contained in:
Vassiliy.Kudryashov
2015-03-16 21:35:40 +03:00
parent 54277c88ab
commit b43bdebb4b
2 changed files with 3 additions and 2 deletions
@@ -271,7 +271,7 @@ public class JBEditorTabs extends JBTabsImpl {
shape.labelBottomY = shape.labelPath.getMaxY() - shape.labelPath.deltaY(getActiveTabUnderlineHeight() - 1);
shape.labelTopY =
shape.labelPath.getY() + (getPosition() == JBTabsPosition.top || getPosition() == JBTabsPosition.bottom ? shape.labelPath.deltaY(1) : 0) ;
shape.labelPath.getY() + (getPosition() == JBTabsPosition.top ? shape.labelPath.deltaY(1) : 0) ;
shape.labelLeftX = shape.labelPath.getX() + (getPosition() == JBTabsPosition.top || getPosition() == JBTabsPosition.bottom ? 0 : shape.labelPath.deltaX(
1));
shape.labelRightX = shape.labelPath.getMaxX() - shape.labelPath.deltaX(1);
@@ -16,6 +16,7 @@
package com.intellij.ui.tabs.impl.singleRow;
import com.intellij.icons.AllIcons;
import com.intellij.ui.tabs.JBTabsPosition;
import com.intellij.ui.tabs.impl.JBTabsImpl;
import com.intellij.ui.tabs.impl.ShapeTransform;
import com.intellij.ui.tabs.impl.TabLabel;
@@ -136,7 +137,7 @@ public abstract class SingleRowLayoutStrategy {
}
public Rectangle getLayoutRec(final int position, final int fixedPos, final int length, final int fixedFitLength) {
return new Rectangle(position, fixedPos, length, fixedFitLength);
return new Rectangle(position, fixedPos + (myTabs.getTabsPosition() == JBTabsPosition.bottom ? 1 : 0), length, fixedFitLength);
}
public int getStartPosition(final SingleRowPassInfo data) {