Bug 574106 - MessageDialog.openConfirm does not use transparent image (making it incompatible to themes)
Summary: MessageDialog.openConfirm does not use transparent image (making it incompati...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-09 11:36 EDT by Wiebke Timm CLA
Modified: 2021-06-10 03:53 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot of the dialog on a colored background (43.71 KB, image/png)
2021-06-09 11:36 EDT, Wiebke Timm CLA
no flags Details
CSS file (576 bytes, text/plain)
2021-06-09 11:38 EDT, Wiebke Timm CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wiebke Timm CLA 2021-06-09 11:36:11 EDT
Created attachment 286550 [details]
Screenshot of the dialog on a colored background

When using a standard MessageDialog in combination with a css stylesheet that sets a background color, the question mark image shows a white, not transparent background. The text field does not have transparent background either.

This would make it imcompatible with CSS themes with a custom shell background.



Call for MessageDialog:

boolean result = MessageDialog.openConfirm(shell, "Close", "Close application?");


css statement:

Shell {
    background-color: #e3efff #c1d5ef 60%;
}



Note: I don't know the version of the "SWT" component, so I guessed the eclipse version instead. Feel free to correct the "Version" field of this issue. I am using the 2020-12 repository to retrieve the org.eclipse.e4.rcp feature. The jface bundle is "org.eclipse.jface_3.22.0.v20201106-0834", the SWT bundle is "org.eclipse.swt_3.115.100.v20201202-1103".
Comment 1 Wiebke Timm CLA 2021-06-09 11:38:01 EDT
Created attachment 286551 [details]
CSS file
Comment 2 Lars Vogel CLA 2021-06-10 03:53:37 EDT
Niraj, looks to me that the image is create in SWT from the OS with  the  display.getSystemImage(SWT.ICON_QUESTION)) call. 

Can this image be created with a transparent background?