private void CalculateTabs(DockState dockState)
{
Rectangle rectTabStrip = this.GetLogicalTabStripRectangle(dockState);
int imageHeight = rectTabStrip.Height - ImageGapTop - ImageGapBottom;
int imageWidth = ImageWidth;
if (imageHeight > ImageHeight)
imageWidth = ImageWidth * (imageHeight / ImageHeight);
int x = TabGapLeft + rectTabStrip.X;
foreach (Pane pane in GetPanes(dockState))
{
foreach (TabVS2005 tab in pane.AutoHideTabs)
{
int width = imageWidth + ImageGapLeft + ImageGapRight +
TextRenderer.MeasureText(tab.Content.DockHandler.TabText, this.TextFont).Width +
TextGapLeft + TextGapRight;
tab.TabX = x;
tab.TabWidth = width;
x += width;
}
x += TabGapBetween;
}
}