Skip to content

Commit

Permalink
Add TDF_SIZE_TO_CONTENT to Windows message dialog (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
Legend-Master authored Jul 4, 2024
1 parent 6f9062e commit fa24088
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/backend/win_cid/message_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};

Expand Down Expand Up @@ -135,7 +135,7 @@ impl WinMessageDialog {
let task_dialog_config = TASKDIALOGCONFIG {
cbSize: core::mem::size_of::<TASKDIALOGCONFIG>() 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 {
Expand Down

0 comments on commit fa24088

Please sign in to comment.