[PATCH] shell32: Use SetRect() instead of open coding it

Michael Stefaniuc mstefani at winehq.org
Fri Dec 7 14:57:15 CST 2018


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
 dlls/shell32/ebrowser.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/dlls/shell32/ebrowser.c b/dlls/shell32/ebrowser.c
index 2d5a30aabb..637104c58d 100644
--- a/dlls/shell32/ebrowser.c
+++ b/dlls/shell32/ebrowser.c
@@ -314,9 +314,7 @@ static void update_layout(ExplorerBrowserImpl *This)
 
     if(navpane_width_actual)
     {
-        This->navpane.rc.left = This->navpane.rc.top = 0;
-        This->navpane.rc.right = navpane_width_actual;
-        This->navpane.rc.bottom = rc.bottom;
+        SetRect(&This->navpane.rc, 0, 0, navpane_width_actual, rc.bottom);
 
         if(!This->navpane.hwnd_splitter)
             initialize_navpane(This, This->hwnd_main, &This->navpane.rc);
@@ -324,10 +322,8 @@ static void update_layout(ExplorerBrowserImpl *This)
     else
         ZeroMemory(&This->navpane.rc, sizeof(RECT));
 
-    This->sv_rc.left   = navpane_width_actual;
-    This->sv_rc.top    = 0;
-    This->sv_rc.right  = This->sv_rc.left + shellview_width_actual;
-    This->sv_rc.bottom = rc.bottom;
+    SetRect(&This->sv_rc, navpane_width_actual, 0, navpane_width_actual + shellview_width_actual,
+            rc.bottom);
 }
 
 static void size_panes(ExplorerBrowserImpl *This)
-- 
2.19.2




More information about the wine-devel mailing list