Thank you for reporting this issue. It’s noticeable only when the Obsidian style is applied where the separator text has not the same color as the tab margin text. The separator also has an incorrect position in the Blue and Gray themes but these themes have the tab border color same as the separator color and incorrect separator intersection with the tab is not visible. You can fix it by updating the CExtPaintManagerOffice2007_Impl::PaintTabItem()
method:
void CExtPaintManagerOffice2007_Impl::PaintTabItem(
CDC & dc, CRect & rcTabItemsArea, bool bTopLeft, bool bHorz, bool bSelected, bool bCenteredText,
bool bGroupedMode, bool bInGroupActive, bool bInvertedVerticalMode, const CRect & rcEntireItem,
CSize sizeTextMeasured, CFont * pFont, __EXT_MFC_SAFE_LPCTSTR sText, CExtCmdIcon * pIcon,
CObject * pHelperSrc, LPARAM lParam, COLORREF clrForceText, COLORREF clrForceTabBk,
COLORREF clrForceTabBorderLT, COLORREF clrForceTabBorderRB, COLORREF clrForceTabSeparator
)
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
if( IsHighContrast() )
{
CExtPaintManagerXP::PaintTabItem( dc, rcTabItemsArea, bTopLeft, bHorz, bSelected, bCenteredText,
bGroupedMode, bInGroupActive, bInvertedVerticalMode, rcEntireItem, sizeTextMeasured, pFont,
sText, pIcon, pHelperSrc, lParam, clrForceText, clrForceTabBk, clrForceTabBorderLT,
clrForceTabBorderRB, clrForceTabSeparator );
return;
}
if( pHelperSrc == NULL
|| ( (! pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtTabWnd ) ) )
&& (! pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtBarButton ) ) )
)
|| IsHighContrast()
)
{
CExtPaintManager::PaintTabItem( dc, rcTabItemsArea, bTopLeft, bHorz, bSelected, bCenteredText,
bGroupedMode, bInGroupActive, bInvertedVerticalMode, rcEntireItem, sizeTextMeasured, pFont,
sText, pIcon, pHelperSrc, lParam, clrForceText, clrForceTabBk, clrForceTabBorderLT,
clrForceTabBorderRB, clrForceTabSeparator );
return;
}
CExtCmdIcon * pIconTabItemCloseButton = NULL;
CExtCmdIcon::e_paint_type_t ePaintStateITICB = (CExtCmdIcon::e_paint_type_t) CExtCmdIcon::__PAINT_INVISIBLE;
CRect rcTabItemCloseButton( 0, 0, 0, 0 );
CExtBarButton * pTBB = NULL;
CExtTabWnd * pTabs = NULL;
CExtTabWnd::TAB_ITEM_INFO * pTII = NULL;
if( pHelperSrc != NULL )
{
pTabs = DYNAMIC_DOWNCAST( CExtTabWnd, pHelperSrc );
if( pTabs != NULL )
{
ASSERT_VALID( pTabs );
pTII = pTabs->ItemGet( LONG( lParam ) );
ASSERT( pTII != NULL );
ASSERT_VALID( pTII );
pIconTabItemCloseButton = pTabs->OnTabWndQueryItemCloseButtonShape( pTII );
if( pIconTabItemCloseButton != NULL )
{
rcTabItemCloseButton = pTII->CloseButtonRectGet();
ePaintStateITICB = (CExtCmdIcon::e_paint_type_t) pTabs->OnTabWndQueryItemCloseButtonPaintState( pTII );
}
}
else
{
pTBB = DYNAMIC_DOWNCAST( CExtBarButton, pHelperSrc );
#ifdef _DEBUG
if( pTBB != NULL )
{
ASSERT_VALID( pTBB );
}
#endif
}
}
LPCTSTR _sText = LPCTSTR(sText);
bool bDrawIcon = ( pIcon != NULL && (! pIcon->IsEmpty() )
&& ( pTabs == NULL || (pTabs->GetTabWndStyle()&__ETWS_HIDE_ICONS) == 0 )
);
if( bGroupedMode )
bSelected = false;
bool bEnabled = true;
if( pTII != NULL )
bEnabled = pTII->EnabledGet();
else if( pTBB != NULL )
bEnabled = pTBB->IsEnabled();
bool bHover = false, bPressed = false;
INT nIdxTabShape = m_nIdxTabShapeDisabled;
if( pTabs != NULL && pTabs->ItemGet( LONG(lParam) )->EnabledGet() )
{
bHover = ( pTabs->GetHoverTrackingItem() == lParam ) ? true : false;
bPressed = ( pTabs->GetPushedTrackingItem() == lParam ) ? true : false;
}
else if( pTBB != NULL )
{
bHover = pTBB->IsHover();
bPressed = pTBB->IsPressed();
}
#if (!defined __EXT_MFC_NO_DYNAMIC_BAR_SITE)
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
bool bDetectedDynTPC = false;
#endif
if( pTII != NULL )
{
CObject * pObject = pTII->EventProviderGet();
if( pObject != NULL )
{
CExtDynamicControlBar * pBar = DYNAMIC_DOWNCAST( CExtDynamicControlBar, pObject );
if( pBar != NULL )
{
bool bFlashCaptionHighlightedState = false;
if( pBar->FlashCaptionIsInProgress( &bFlashCaptionHighlightedState ) )
{
if( bFlashCaptionHighlightedState )
{
clrForceText = pBar->m_clrFlashCaptionText;
clrForceTabBk = pBar->m_clrFlashCaptionBackground;
bSelected = true;
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
bDetectedDynTPC = true;
#endif
}
}
}
}
}
#endif
COLORREF clrText = QueryObjectTextColor( dc, bEnabled, false, bHover, bPressed, pHelperSrc, lParam );
if( clrText == COLORREF(-1L) )
clrText = bEnabled ? m_clrTabTextNormal : GetColor( CLR_TEXT_DISABLED, pHelperSrc, lParam );
nIdxTabShape = m_nIdxTabShapeNormal;
if( bSelected )
{
if( bEnabled )
clrText = m_clrTabTextSelected;
nIdxTabShape = m_nIdxTabShapeSelected;
if( bHover && (!bPressed) )
nIdxTabShape = m_nIdxTabShapeSelectedHover;
}
else
{
if( bPressed )
nIdxTabShape = m_nIdxTabShapePressed;
else if( bHover )
nIdxTabShape = m_nIdxTabShapeHover;
}
e_TabShapeOrientationIndex_t eTSOI = __ETSOI_TOP;
if( bTopLeft )
{
if( bHorz )
eTSOI = __ETSOI_TOP;
else
eTSOI = __ETSOI_LEFT;
}
else
{
if( bHorz )
eTSOI = __ETSOI_BOTTOM;
else
eTSOI = __ETSOI_RIGHT;
}
if( bGroupedMode )
{
switch( eTSOI )
{
case __ETSOI_TOP: eTSOI = __ETSOI_BOTTOM; break;
case __ETSOI_BOTTOM: eTSOI = __ETSOI_TOP; break;
case __ETSOI_LEFT: eTSOI = __ETSOI_RIGHT; break;
case __ETSOI_RIGHT: eTSOI = __ETSOI_LEFT; break;
}
}
COLORREF clrColorizeTabShape = COLORREF(-1L);
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
if( pHelperSrc != NULL
&& clrForceTabBk != COLORREF(-1L)
&& ( bDetectedDynTPC
|| pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtDynTabWnd ) )
|| pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtDynAutoHideArea ) )
)
)
{
if( clrForceText != COLORREF(-1L) )
clrText = clrForceText;
clrColorizeTabShape = clrForceTabBk;
}
#endif
#if (!defined __EXT_MFC_NO_TABMDI_CTRL)
if( pHelperSrc != NULL
&& clrForceTabBk != COLORREF(-1L)
&& pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtTabWnd ) )
&& ((CExtTabWnd*)pHelperSrc)->_IsMdiTabCtrl()
)
{
if( clrForceText != COLORREF(-1L) )
clrText = clrForceText;
clrColorizeTabShape = clrForceTabBk;
}
#endif
if( nIdxTabShape >= 0 )
{
bool bSelTrackingMode = false;
#if (!defined __EXT_MFC_NO_RIBBON_BAR)
if( pTBB != NULL
&& pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonTabPage ) )
&& ((CExtRibbonButtonTabPage*)pTBB)->IsSelectedRibbonPage()
)
{
CExtToolControlBar * pToolBar = pTBB->GetBar();
if( pToolBar != NULL )
{
CExtMenuControlBar * pMenuBar = DYNAMIC_DOWNCAST( CExtMenuControlBar, pToolBar );
if( pMenuBar != NULL
&& pMenuBar->IsMenuBarTracking()
)
{
int nFlatTrackingIndex = pMenuBar->_FlatTrackingIndexGet();
if( nFlatTrackingIndex >= 0 )
{
int nIndexOfTBB = pMenuBar->_GetIndexOf( pTBB );
if( nFlatTrackingIndex == nIndexOfTBB )
{
if(! m_arrBmpTabShapeSelArea[0].IsEmpty() )
bSelTrackingMode = true;
else
nIdxTabShape = m_nIdxTabShapeHover;
}
}
}
}
}
#endif
const CExtBitmap & _bmpTabShape =
bSelTrackingMode ? m_arrBmpTabShapeSelArea[ int(eTSOI) ] : m_arrBmpTabShapeNormal[ int(eTSOI) ] ;
if( ! _bmpTabShape.IsEmpty() )
{
CRect rcPadding = m_arrRectTabShapePadding[ int(eTSOI) ];
CRect rcSrc( 0, 0, m_arrSizeTabShape[int(eTSOI)].cx, m_arrSizeTabShape[int(eTSOI)].cy );
rcSrc.OffsetRect(
0,
m_arrSizeTabShape[int(eTSOI)].cy * nIdxTabShape
);
CRect rcPaintTabShape = rcEntireItem;
switch( eTSOI )
{
case __ETSOI_TOP:
case __ETSOI_BOTTOM: rcPaintTabShape.right --; break;
case __ETSOI_LEFT:
case __ETSOI_RIGHT: rcPaintTabShape.bottom --; break;
}
if( clrColorizeTabShape != COLORREF(-1L) )
{
CExtBitmap _bmpTabShape2 = _bmpTabShape;
_bmpTabShape2.Make32();
_bmpTabShape2.AdjustHLS( COLORREF(-1L), COLORREF(-1L), 0.0, -0.5, -1.0 );
_bmpTabShape2.MakeMono( clrColorizeTabShape );
_bmpTabShape2.AlphaBlendSkinParts( dc.m_hDC, rcPaintTabShape, rcSrc, rcPadding,
CExtBitmap::__EDM_STRETCH, true, true );
}
else
_bmpTabShape.AlphaBlendSkinParts( dc.m_hDC, rcPaintTabShape, rcSrc, rcPadding,
CExtBitmap::__EDM_STRETCH, true, true );
}
}
CRect rcEntireItemX = rcEntireItem;
rcEntireItemX.DeflateRect( 3, 3 );
CExtPaintManager::stat_PaintTabItemImpl( dc, rcTabItemsArea, bTopLeft, bHorz, bSelected, bEnabled,
bCenteredText, bGroupedMode, bInGroupActive, bInvertedVerticalMode, bDrawIcon, rcEntireItemX,
sizeTextMeasured, pFont, _sText, pIcon, pIconTabItemCloseButton, INT(ePaintStateITICB),
rcTabItemCloseButton, clrText, COLORREF(-1L), COLORREF(-1L), COLORREF(-1L), COLORREF(-1L),
( pTBB != NULL ) ? false : true, pHelperSrc );
const CExtBitmap & _bmpTabSeparator = m_arrBmpTabSeparator[ int(eTSOI) ];
if( ! _bmpTabSeparator.IsEmpty() )
{
CRect rcPaintSeparator = rcEntireItem;
CRect rcPadding = m_arrRectTabSeparatorPadding[ int(eTSOI) ];
CRect rcSrc( 0, 0, m_arrSizeTabSeparator[int(eTSOI)].cx, m_arrSizeTabSeparator[int(eTSOI)].cy );
e_paint_manager_name_t ePMN = OnQueryPaintManagerName();
switch( eTSOI )
{
case __ETSOI_TOP:
rcPaintSeparator.left = rcPaintSeparator.right - m_arrSizeTabSeparator[int(eTSOI)].cx;
rcPaintSeparator.bottom --;
if( ePMN == Office2007_R2_Obsidian )
rcPaintSeparator.bottom -= 2;
break;
case __ETSOI_BOTTOM:
rcPaintSeparator.left = rcPaintSeparator.right - m_arrSizeTabSeparator[int(eTSOI)].cx;
rcPaintSeparator.top ++;
break;
case __ETSOI_LEFT:
rcPaintSeparator.top = rcPaintSeparator.bottom - m_arrSizeTabSeparator[int(eTSOI)].cy;
rcPaintSeparator.right --;
break;
case __ETSOI_RIGHT:
rcPaintSeparator.top = rcPaintSeparator.bottom - m_arrSizeTabSeparator[int(eTSOI)].cy;
rcPaintSeparator.left ++;
break;
}
BYTE nSCA = BYTE(0x0FF);
#if (!defined __EXT_MFC_NO_RIBBON_BAR)
if( pTBB != NULL )
{
CExtRibbonButtonTabPage * pRibbonButtonTabPage =
DYNAMIC_DOWNCAST( CExtRibbonButtonTabPage, pTBB );
if( pRibbonButtonTabPage != NULL )
nSCA = pRibbonButtonTabPage->Get2007SeparatorAlpha();
}
#endif
_bmpTabSeparator.AlphaBlendSkinParts( dc.m_hDC, rcPaintSeparator, rcSrc, rcPadding,
CExtBitmap::__EDM_STRETCH, true, true, nSCA );
}
}