فهرست منبع

On Windows 10, our two ways to calculate tab height indeed differ, use the larger value

Source commit: b1eafecd73d8fda11a317dcc56903e76669d95a4
Martin Prikryl 8 سال پیش
والد
کامیت
c81bc18e59
1فایلهای تغییر یافته به همراه6 افزوده شده و 11 حذف شده
  1. 6 11
      source/components/ThemePageControl.cpp

+ 6 - 11
source/components/ThemePageControl.cpp

@@ -81,18 +81,13 @@ int __fastcall TThemePageControl::GetTabsHeight()
   {
     TRect Rect = TabRect(0);
     int Result2 = Rect.Bottom + 1;
-    if (Result != Result2)
+    // On Windows 10 with 200% scaling, the first is 40, the second is 42.
+    // With 250% scaling its 50 vs 53.
+    // Using the larger.
+    if (Result2 > Result)
     {
-      // On Windows 10 with 200% scaling, the first is 40, the second is 42.
-      // The correct size is probably 41. Will wait for final release before settling on solution.
-      if (DebugAlwaysTrue(IsWin10() && (Result - 2) == Result2))
-      {
-        Result--;
-      }
-      else
-      {
-        Result = Result2;
-      }
+      DebugAssert(IsWin10());
+      Result = Result2;
     }
   }