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

Bug 361799

Summary: [Theming] Ability to specify background position and repeat
Product: [RT] RAP Reporter: Stephan Leicht Vogt <stephan.leichtvogt>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: gunnar, hihn, ronald.so, stephan.leichtvogt, tbuschto
Version: 1.5   
Target Milestone: 2.1 M2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix for enhancment request
none
Correction of last patch none

Description Stephan Leicht Vogt CLA 2011-10-24 09:07:07 EDT
If a Icon is smaller than the widget, the icon is repeated inside the widget. We need the ability to set the background position and the background repeat.

Solution: Attached Patch.
Comment 1 Stephan Leicht Vogt CLA 2011-10-24 09:08:01 EDT
Created attachment 205810 [details]
Fix for enhancment request
Comment 2 Ralf Sternberg CLA 2011-10-25 06:26:15 EDT
This seems to be doable but the solution would have to work with all supported browsers. It's unclear to what extent these properties are supported in IE7 and IE8.

Resetting the target milestone attribute. Stephan, please allow the RAP team to make our own schedules. If you need a certain fixes quickly, please contact EclipseSource.
Comment 3 Stephan Leicht Vogt CLA 2011-10-25 06:49:36 EDT
(In reply to comment #2)
> Resetting the target milestone attribute. Stephan, please allow the RAP team to
> make our own schedules. If you need a certain fixes quickly, please contact
> EclipseSource.

I saw the target milestone as wish-milestone. I won't set it in future bug entries. Thanks for the hint.
Comment 4 Stephan Leicht Vogt CLA 2011-10-25 06:55:43 EDT
(In reply to comment #2)
> This seems to be doable but the solution would have to work with all supported
> browsers. It's unclear to what extent these properties are supported in IE7 and
> IE8.

As I didn't test it with IE7 I can't say for certain, but in IE8 it works. Here "CSS background-repeat Property":http://www.w3schools.com/cssref/pr_background-repeat.asp and here "CSS background-position Property":http://www.w3schools.com/cssref/pr_background-position.asp it says that its all supported in all major browsers safe the "inherit" property.
Comment 5 Gunnar Wagenknecht CLA 2012-05-23 16:06:34 EDT
I would love to see this supported in RAP. Is IE7 (and IE8) still an "A" grade browser?
Comment 6 Ralf Sternberg CLA 2012-05-25 11:19:22 EDT
Even though IE7's market share is constantly decreasing, I'm afraid it's too early to drop IE7 support in RAP 2.0.

If the properties work in IE8, maybe we could support them in the theming, and add a warning that they won't work with IE7?
Comment 7 Tim Buschtoens CLA 2012-05-25 13:18:44 EDT
Actually, the GraphicsMixin makes the entire topic somewhat more complex, but it might also help with that IE7 issue.
Comment 8 Stephan Leicht Vogt CLA 2012-06-15 10:04:44 EDT
Created attachment 217426 [details]
Correction of last patch

Works with current git-head
Comment 9 Ivan Furnadjiev CLA 2013-03-28 10:00:16 EDT
Added background-repeat and background-position CSS properties to Button, FileUpload, Composite, Label, CLabel and Link. No server-side API. Fixed with commits b5feb95c9c64e4ddc4f0d4ddc1312a1d43222065 and 315545ac5f83aba3d256970954e23230d3ab2b95. These properties have no effect if rounded borders are used in IE8 and IE7 (GraphicsMixin (VML)). If support for additional widgets is needed please open a separate bug.
Comment 10 Ivan Furnadjiev CLA 2013-03-28 10:26:56 EDT
One additional remark: background-position currently supports one of these values:
left top
left center
left bottom
right top
right center
right bottom
center top
center center
center bottom
Percents (background-position: 10% 20%) and positioning by pixels (background-position: 10px 20px) are currently not supported.