From: Zhiyi Zhang zzhang@codeweavers.com
The icon width and text offset are subtracted from the dialog max width and the result is then used for the expando button text rect calculation. When it's done, the expando button width should be the text width + icon width + text offset, not just the text width. --- dlls/comctl32_v6/taskdialog.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/comctl32_v6/taskdialog.c b/dlls/comctl32_v6/taskdialog.c index 91d971f7b42..9354a47083f 100644 --- a/dlls/comctl32_v6/taskdialog.c +++ b/dlls/comctl32_v6/taskdialog.c @@ -461,6 +461,8 @@ static void taskdialog_get_expando_size(struct taskdialog_info *dialog_info, HWN max_text_height = DrawTextW(hdc, dialog_info->collapsed_text, -1, &rect, style); size->cy = max(size->cy, max_text_height); size->cx = max(size->cx, rect.right - rect.left); + + size->cx += icon_width + text_offset; size->cx = min(size->cx, max_width);
if (old_hfont) SelectObject(hdc, old_hfont);