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

Bug 297892

Summary: [Theming] Some default styles not used when contributed at ThemableWidget ExtPoint
Product: [RT] RAP Reporter: Stefan Röck <stefan.roeck>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 1.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Sample project none

Description Stefan Röck CLA 2009-12-15 15:16:11 EST
I try to use the ThemeableWidget-Extension point to provide some theme variants that should be used in a custom control. (Talked to Ralf about this at EclipseSummit). However, it seems as if only some of the provided themes are applied (works for Labels, Composites but not for Buttons).

In the following example, the hover stuff works fine, however, disabling the border and using a transparent color in the default button state doesn't work.

Using the latest CVS HEAD.


Button.cmdSmall {
	background-color: transparent;
	font:12px 'Segoe UI';
	border: none;
	spacing: 6px;
}

Button:hover.cmdSmall {
	border: 1px solid #C8C8C8;
	border-radius: 4px;
	background-image: gradient(linear, left top, left bottom, from(#ffffff),
		color-stop(49%, #FFECAC), color-stop(50%, #FFDA59), to(#FFFCDF) );
}

Button:pressed.cmdSmall {
	border: 1px solid #A78E66;
	border-radius: 4px;
	background-image: gradient(linear, left top, left bottom, from(#EAD1B2),
		color-stop(49%, #FCD38A), color-stop(50%, #FBC05A), to(#FDE79B) );
  	padding: 5px 6px;
}
Comment 1 Stefan Röck CLA 2009-12-15 15:17:35 EST
Created attachment 154521 [details]
Sample project
Comment 2 Ivan Furnadjiev CLA 2009-12-18 11:03:51 EST
Stefan, I think that your CSS declaration is not correct. Here is the working one:
----------------------------------------------------------
Button[PUSH].cmdSmall {
	background-color: transparent;
	font:12px 'Segoe UI';
	border: none;
	spacing: 6px;
}

Button[PUSH].cmdSmall:hover {
	border: 1px solid #C8C8C8;
	border-radius: 4px;
	background-image: gradient(linear, left top, left bottom, from(#ffffff),
		color-stop(49%, #FFECAC), color-stop(50%, #FFDA59), to(#FFFCDF) );
}

Button[PUSH].cmdSmall:pressed {
	border: 1px solid #A78E66;
	border-radius: 4px;
	background-image: gradient(linear, left top, left bottom, from(#EAD1B2),
		color-stop(49%, #FCD38A), color-stop(50%, #FBC05A), to(#FDE79B) );
  	padding: 5px 6px;
}
----------------------------------------------------------
Comment 3 Ivan Furnadjiev CLA 2009-12-21 10:07:58 EST
I will close it as invalid. Stefan, please reopen if I you think that I'm wrong.