diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d3470d..899d2f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - Move from `objc` crates to `objc2` crates. - Fix `AsyncFileDialog` blocking the executor on Windows (#191) +- Add `TDF_SIZE_TO_CONTENT` to `TaskDialogIndirect` config so that it can display longer text without truncating/wrapping (80 characters instead of 55) (#202) ## 0.14.0 - i18n for GTK and XDG Portal diff --git a/src/backend/win_cid/message_dialog.rs b/src/backend/win_cid/message_dialog.rs index e2d128d..2803354 100644 --- a/src/backend/win_cid/message_dialog.rs +++ b/src/backend/win_cid/message_dialog.rs @@ -75,8 +75,8 @@ impl WinMessageDialog { UI::Controls::{ TaskDialogIndirect, TASKDIALOGCONFIG, TASKDIALOGCONFIG_0, TASKDIALOGCONFIG_1, TASKDIALOG_BUTTON, TDCBF_CANCEL_BUTTON, TDCBF_NO_BUTTON, TDCBF_OK_BUTTON, - TDCBF_YES_BUTTON, TDF_ALLOW_DIALOG_CANCELLATION, TD_ERROR_ICON, - TD_INFORMATION_ICON, TD_WARNING_ICON, + TDCBF_YES_BUTTON, TDF_ALLOW_DIALOG_CANCELLATION, TDF_SIZE_TO_CONTENT, + TD_ERROR_ICON, TD_INFORMATION_ICON, TD_WARNING_ICON, }, }; @@ -135,7 +135,7 @@ impl WinMessageDialog { let task_dialog_config = TASKDIALOGCONFIG { cbSize: core::mem::size_of::() as u32, hwndParent: self.parent.unwrap_or_default(), - dwFlags: TDF_ALLOW_DIALOG_CANCELLATION, + dwFlags: TDF_ALLOW_DIALOG_CANCELLATION | TDF_SIZE_TO_CONTENT, pszWindowTitle: self.caption.as_ptr(), pszContent: self.text.as_ptr(), Anonymous1: TASKDIALOGCONFIG_0 {