[PATCH 8/8] comctl32/taskdialog: Fix center positioning.

Zhiyi Zhang zzhang at codeweavers.com
Thu Jul 19 20:56:02 CDT 2018


Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
 dlls/comctl32/taskdialog.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c
index 4f478d3eec..97ad825a0d 100644
--- a/dlls/comctl32/taskdialog.c
+++ b/dlls/comctl32/taskdialog.c
@@ -2,6 +2,7 @@
  * Task dialog control
  *
  * Copyright 2017 Fabian Maurer
+ * Copyright 2018 Zhiyi Zhang
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -1104,8 +1105,8 @@ static void taskdialog_layout(struct taskdialog_info *dialog_info)
 
     if (first_time)
     {
-        x = (ref_rect.left + ref_rect.right + dialog_width) / 2;
-        y = (ref_rect.top + ref_rect.bottom + dialog_height) / 2;
+        x = (ref_rect.left + ref_rect.right - dialog_width) / 2;
+        y = (ref_rect.top + ref_rect.bottom - dialog_height) / 2;
         SetWindowPos(dialog_info->hwnd, 0, x, y, dialog_width, dialog_height, SWP_NOZORDER);
         first_time = FALSE;
     }
-- 
2.18.0




More information about the wine-devel mailing list