Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324436

Summary: [Theming] Implement themeable shadow effects
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P1 CC: ruediger.herrmann, tbuschto
Version: 1.4   
Target Milestone: 1.4 M7   
Hardware: PC   
OS: Linux   
Whiteboard: plan-version=1.4 plan-theme=theming-design plan-status=committed
Bug Depends on: 330823    
Bug Blocks:    
Attachments:
Description Flags
client implementation
none
server-side implementation
none
server-side implementation
none
Updated Patch none

Description Ralf Sternberg CLA 2010-09-03 11:29:51 EDT
We should enhance our look and feels with slight shadow effects around popups like dialogs, combo-popups, menus etc. Those shadow effects should be CSS-themeable.
Comment 1 Tim Buschtoens CLA 2011-02-22 14:57:55 EST
Created attachment 189536 [details]
client implementation

The client-implementation for shadows based on GraphicsMixin. I discovered some problems with IE9 and Safari relatively late, therefore this patch has some issues. The support is as follows:

- IE7,IE8 with no noticeable performance loss.
- Firefox 3.0+. Dragging a shell with a shadow is somewhat slower, otherwise ok.
- Chrome 5.0+ (Webkit 532.9) with no issues
- Opera 11 with no issues
Shadows are disable for older Versions of these browser.

IE9 RC: Overall performance gets worse if hardware acceleration is disabled/not supported (which is the case on my brand new laptop), therefore shadows are currently disabled. Hopefully this will be redolved in the final IE9 release. Also see http://support.microsoft.com/kb/2398082/en-us

Safari: Even though Safari 5.0.3 uses webkit 533.19.4, the blur-effect doesn't work. Therefore i have also disabled shadows here. 

Ignoring IE9, the Issue with Safari could be handled in 3 ways:
- Commit the patch now, enable shadows for Safari after fixing Bug 332509.
- Commit the patch now without a blur-effect for shadows in safari.
- Fix Bug 332509 first, then enable shadows.

The only reason i'm a bit uneasy with commiting the patch later is that adapting it to a later cvs-version might be a lot work. (Or none if we don't touch any of the affected files in the meantime.)
Comment 2 Ivan Furnadjiev CLA 2011-02-24 02:34:45 EST
Created attachment 189673 [details]
server-side implementation

This patch includes some changes to QxColor too to support "alpha" property.
Comment 3 Ivan Furnadjiev CLA 2011-02-24 03:10:24 EST
Created attachment 189674 [details]
server-side implementation

Small update to QxColor#hashCode.
Comment 4 Tim Buschtoens CLA 2011-03-28 11:24:13 EDT
Created attachment 192013 [details]
Updated Patch

Updated patch with the following changes:
- Combining server / client implementation into one patch
- Fixed a bug that crashed the application
- Enabled IE9 and Safari.
- Minor changes/formatting

After updating my laptops display driver, which was a real odyssey (i blame Toshiba), the GPU acceleration for IE9 could be enabled and performance was fine. It seems to be an issue specific to my GPU, specifically it affects Intel HD Graphics driver "Igdkmd32.sys"/"Igdkmd64.sys" versions 8.15.10.2104 to 8.15.10.2141. I therfore think most IE9-installations will run fine with GPU acceleration. Also, with the final release of IE9, the blur effect is now gone if GPU support is not available, so performance is still ok then. I therefore enabled IE9 again. 

As for Safari, since IE9 will not always render the blur-effect, i thought it fitting to allow safari to render the shadows without blur aswell. As soon as we support CSS3 this issue will be gone.
Comment 5 Tim Buschtoens CLA 2011-04-08 06:03:03 EDT
Commited to CVS HEAD.

For now only Shell can have a shadow. 

Sadly the blur effect is somewhat inconsistent: Safari has none, in IE9 it seems to be too weak, but only sometimes. As already said, using CSS3 could fix this.