Procházet zdrojové kódy

More logical (and optimal) condition order

Source commit: 2c9a6d77654d3936ef62f8842ba88c11530bb082
Martin Prikryl před 5 roky
rodič
revize
40c6ed8fe5
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      source/packages/filemng/CustomDirView.pas

+ 4 - 4
source/packages/filemng/CustomDirView.pas

@@ -922,11 +922,11 @@ end;
 procedure TCustomDirView.WMNotify(var Msg: TWMNotify);
 begin
   // This all is to make header text white in dark mode.
-  if DarkMode and SupportsDarkMode and
-     GetSysDarkTheme and // When system app theme is light, headers are not dark
-     (FHeaderHandle <> 0) and (Msg.NMHdr^.hWndFrom = FHeaderHandle) then
+  if Msg.NMHdr.code = NM_CUSTOMDRAW then
   begin
-    if Msg.NMHdr.code = NM_CUSTOMDRAW then
+    if DarkMode and SupportsDarkMode and
+       GetSysDarkTheme and // When system app theme is light, headers are not dark
+       (FHeaderHandle <> 0) and (Msg.NMHdr^.hWndFrom = FHeaderHandle) then
     begin
       with PNMLVCustomDraw(Msg.NMHdr)^ do
       begin