picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.62k stars 328 forks source link

WinForms: Show icon when set in Dialog #2599

Closed cyanfish closed 9 months ago

cyanfish commented 9 months ago

In DialogHandler ShowIcon is set to false: https://github.com/picoe/Eto/blob/5fb78c03d5c55043b95951640d69030e93c94eeb/src/Eto.WinForms/Forms/DialogHandler.cs#L18

If an icon is manually set it should be displayed.

Using an "if" instead of just setting to true to avoid unnecessary redrawing.

cwensley commented 9 months ago

Great, thanks for the contribution!

Would it make sense to set ShowIcon = false if it was then set to null? (I guess the code would have to be updated to allow a null icon too).

cyanfish commented 9 months ago

Yeah, we'd need to update WinForms/WPF/GTK to handle nulls. I could do it if you want, but IMO an Icon is generally a set-once-at-construction thing and I don't think there'd be much use for that.