From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/taskdialog.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c index 2f8f6de5a4e..91d971f7b42 100644 --- a/dlls/comctl32/taskdialog.c +++ b/dlls/comctl32/taskdialog.c @@ -990,7 +990,9 @@ static void taskdialog_layout(struct taskdialog_info *dialog_info) line_count++; } } - line_count++; + + if (dialog_info->button_count > 0) + line_count++;
/* Try to balance lines so they are about the same size */ for (i = 1; i < line_count - 1; i++) @@ -1040,7 +1042,8 @@ static void taskdialog_layout(struct taskdialog_info *dialog_info) }
/* Add height for last row button and spacing */ - dialog_height += size.cy + v_spacing; + if (dialog_info->button_count > 0) + dialog_height += size.cy + v_spacing; dialog_height = max(dialog_height, expando_bottom);
Free(button_layout_infos);
[test_taskdialog_no_button.zip](/uploads/109d9773d42bfd9e69d13f09abea2897/test_taskdialog_no_button.zip)
This merge request was approved by Nikolay Sivov.