5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 19:21:21 +08:00

Bugfix for message dialog icons

This commit is contained in:
Lea Anthony 2021-01-08 11:39:02 +11:00
parent fbee9ba240
commit faa8f02b08
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -845,7 +845,7 @@ extern void MessageDialog(struct Application *app, char *callbackID, char *type,
}
// Determine what dialog icon we are looking for
id dialogImage;
id dialogImage = NULL;
// Look for `name-theme2x` first
char *themeIcon = concat(dialogIcon, (isDarkMode(app) ? "-dark" : "-light") );
if( isRetina(app) ) {
@ -878,7 +878,9 @@ extern void MessageDialog(struct Application *app, char *callbackID, char *type,
// if (dialogImage != NULL ) printf("Using %s\n", dialogIcon);
}
msg(alert, s("setIcon:"), dialogImage);
if (dialogImage != NULL ) {
msg(alert, s("setIcon:"), dialogImage);
}
// Run modal
char *buttonPressed;