瀏覽代碼

Issue 2257 – New tab icon is drawn incorrect on Explorer interface with Show selective text labels turned off

https://winscp.net/tracker/2257

Source commit: f94dcc775f1df3b742b9aebec8c9b744caaef051
Martin Prikryl 1 年之前
父節點
當前提交
a76f4130f4
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      source/components/ThemePageControl.cpp

+ 2 - 1
source/components/ThemePageControl.cpp

@@ -382,6 +382,7 @@ void TThemePageControl::DrawDropDown(HDC DC, int Radius, int X, int Y, COLORREF
 // draw tab item context: possible icon and text
 void __fastcall TThemePageControl::DrawTabItem(HDC DC, int Item, TRect Rect, int State, bool Shadowed)
 {
+  TRect OrigRect = Rect;
   ItemContentsRect(Item, Rect);
 
   UnicodeString Text = Pages[Item]->Caption;
@@ -396,7 +397,7 @@ void __fastcall TThemePageControl::DrawTabItem(HDC DC, int Item, TRect Rect, int
     }
     else
     {
-      Left = (Rect.Right - Images->Width - Rect.Left) / 2;
+      Left = OrigRect.Left + (OrigRect.Right - Images->Width - OrigRect.Left) / 2;
     }
     int Y = ((Rect.Top + Rect.Bottom - Images->Height) / 2) - 1 + (Selected ? 0 : -2);
     std::unique_ptr<TCanvas> Canvas(new TCanvas());