[EXPLORER] CTrayNotifyWnd: Fix resizing when the clock is hidden
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 28 Jan 2018 20:38:48 +0000 (22:38 +0200)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 28 Jan 2018 20:38:48 +0000 (22:38 +0200)
base/shell/explorer/trayntfy.cpp

index 0a85685..4326ca7 100644 (file)
@@ -218,28 +218,28 @@ public:
                 szClock.cx,
                 szClock.cy,
                 SWP_NOZORDER);
+        }
 
-            POINT ptPager;
-
-            if (IsHorizontal)
-            {
-                ptPager.x = ContentMargin.cxLeftWidth;
-                ptPager.y = (pszClient->cy - szTrayNotify.cy)/2;
-            }
-            else
-            {
-                ptPager.x = (pszClient->cx - szTrayNotify.cx)/2;
-                ptPager.y = ContentMargin.cyTopHeight;
-            }
+        POINT ptPager;
 
-            ::SetWindowPos(m_hwndPager,
-                NULL,
-                ptPager.x,
-                ptPager.y,
-                szTrayNotify.cx,
-                szTrayNotify.cy,
-                SWP_NOZORDER);
+        if (IsHorizontal)
+        {
+            ptPager.x = ContentMargin.cxLeftWidth;
+            ptPager.y = (pszClient->cy - szTrayNotify.cy)/2;
         }
+        else
+        {
+            ptPager.x = (pszClient->cx - szTrayNotify.cx)/2;
+            ptPager.y = ContentMargin.cyTopHeight;
+        }
+
+        ::SetWindowPos(m_hwndPager,
+            NULL,
+            ptPager.x,
+            ptPager.y,
+            szTrayNotify.cx,
+            szTrayNotify.cy,
+            SWP_NOZORDER);
     }
 
     LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)