summaryrefslogtreecommitdiff
path: root/platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowLayout.java')
-rw-r--r--platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowLayout.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowLayout.java b/platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowLayout.java
index 4e5925d2a2ee..6bd2e1aa52bf 100644
--- a/platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowLayout.java
+++ b/platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowLayout.java
@@ -209,6 +209,7 @@ public class SingleRowLayout extends TabLayout {
protected void prepareLayoutPassInfo(SingleRowPassInfo data, TabInfo selected) {
data.insets = myTabs.getLayoutInsets();
+ data.insets.left += myTabs.getFirstTabOffset();
final JBTabsImpl.Toolbar selectedToolbar = myTabs.myInfo2Toolbar.get(selected);
data.hToolbar = selectedToolbar != null && myTabs.myHorizontalSide && !selectedToolbar.isEmpty() ? selectedToolbar : null;
@@ -216,7 +217,7 @@ public class SingleRowLayout extends TabLayout {
data.toFitLength = getStrategy().getToFitLength(data);
if (myTabs.isGhostsAlwaysVisible()) {
- data.toFitLength -= JBTabsImpl.getGhostTabLength() * 2 + (JBTabsImpl.getInterTabSpaceLength() * 2);
+ data.toFitLength -= myTabs.getGhostTabLength() * 2 + (myTabs.getInterTabSpaceLength() * 2);
}
}
@@ -236,9 +237,9 @@ public class SingleRowLayout extends TabLayout {
private void layoutLabelsAndGhosts(final SingleRowPassInfo data) {
if (data.firstGhostVisible || myTabs.isGhostsAlwaysVisible()) {
- data.firstGhost = getStrategy().getLayoutRect(data, data.position, JBTabsImpl.getGhostTabLength());
+ data.firstGhost = getStrategy().getLayoutRect(data, data.position, myTabs.getGhostTabLength());
myTabs.layout(myLeftGhost, data.firstGhost);
- data.position += getStrategy().getLengthIncrement(data.firstGhost.getSize()) + JBTabsImpl.getInterTabSpaceLength();
+ data.position += getStrategy().getLengthIncrement(data.firstGhost.getSize()) + myTabs.getInterTabSpaceLength();
}
int deltaToFit = 0;
@@ -275,9 +276,9 @@ public class SingleRowLayout extends TabLayout {
boolean continueLayout = applyTabLayout(data, label, length, deltaToFit);
data.position = getStrategy().getMaxPosition(label.getBounds());
- data.position += JBTabsImpl.getInterTabSpaceLength();
+ data.position += myTabs.getInterTabSpaceLength();
- totalLength = getStrategy().getMaxPosition(label.getBounds()) - positionStart + JBTabsImpl.getInterTabSpaceLength();
+ totalLength = getStrategy().getMaxPosition(label.getBounds()) - positionStart + myTabs.getInterTabSpaceLength();
if (!continueLayout) {
layoutStopped = true;
}
@@ -288,7 +289,7 @@ public class SingleRowLayout extends TabLayout {
}
if (data.lastGhostVisible || myTabs.isGhostsAlwaysVisible()) {
- data.lastGhost = getStrategy().getLayoutRect(data, data.position, JBTabsImpl.getGhostTabLength());
+ data.lastGhost = getStrategy().getLayoutRect(data, data.position, myTabs.getGhostTabLength());
myTabs.layout(myRightGhost, data.lastGhost);
}
}
@@ -366,7 +367,7 @@ public class SingleRowLayout extends TabLayout {
protected int getRequiredLength(TabInfo eachInfo) {
TabLabel label = myTabs.myInfo2Label.get(eachInfo);
return getStrategy().getLengthIncrement(label != null ? label.getPreferredSize() : new Dimension())
- + (myTabs.isEditorTabs() ? JBTabsImpl.getInterTabSpaceLength() : 0);
+ + (myTabs.isEditorTabs() ? myTabs.getInterTabSpaceLength() : 0);
}
@@ -417,13 +418,13 @@ public class SingleRowLayout extends TabLayout {
if (!data.firstGhostVisible && isFirstSide) {
data.firstGhostVisible = !myTabs.isEditorTabs();
if (!myTabs.isGhostsAlwaysVisible() && !myTabs.isEditorTabs()) {
- data.toFitLength -= JBTabsImpl.getGhostTabLength();
+ data.toFitLength -= myTabs.getGhostTabLength();
}
}
else if (!data.lastGhostVisible && !isFirstSide) {
data.lastGhostVisible = !myTabs.isEditorTabs();
if (!myTabs.isGhostsAlwaysVisible() && !myTabs.isEditorTabs()) {
- data.toFitLength -= JBTabsImpl.getGhostTabLength();
+ data.toFitLength -= myTabs.getGhostTabLength();
}
}
}