-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: customize button text, Close #72 #74
feat: customize button text, Close #72 #74
Conversation
f067714
to
e8ee540
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to make common-controls-v6
the default feature? I don't care about any OS older than Windows 10 and maybe in extreme cases Windows 8.
EDIT: Or maybe remove the feature all together, I'll leave that for you to decide as I don't have a strong preference.
examples/msg-custom-buttons.rs
Outdated
let res = rfd::MessageDialog::new() | ||
.set_title("Msg!") | ||
.set_description("Description!") | ||
// .set_buttons(rfd::MessageButtons::Ok) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment looks unnecessary
Also WASM CI is complaining about wrong match patterns |
When an application use some other API from COMCTL32.dll, will this API be imcompatible? (It originally work well with COMCTL32.dll v5.8, but we force the app to use v6.) I don't know it because I am not a windows developer. I think it's better to keep the feature and make it default, collect feedback and consider to remove the feature and old API in the feature. |
e8ee540
to
b8a446f
Compare
b8a446f
to
ebc50a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the PR!
Use
TaskDialogIndirect
to show the message dialog because it supports customizing button texts.Besides,
TaskDialogIndirect
has a nicer look thanMessageBoxW
.MessageBoxW:
TaskDialogIndirect:
While
TaskDialogIndirect
is only available with comctl32 version 6, but the OS inbox version is stuck at 5.x. (ref microsoft/windows-rs#1294 (comment))So I added a cargo feature named
common-controls-v6
for enabling v6.The change has been tested on Windows, Linux and macOS, but not on WASM.