Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Button CSS font not working in dialog button bar(font CSS style not applied to buttons in dilaog button bar)
Button CSS font not working in dialog button bar [message #671804] Thu, 19 May 2011 03:46 Go to next message
Penka  is currently offline Penka Friend
Messages: 7
Registered: July 2009
Junior Member
I have a custom theme with the following style for button:
Button {
font: bold 11px verdana, tahoma, helvetica;
color: white;
background-color: #3366cc;
}

The bold CSS property works for buttons displayed in a composite, but doesn't work for buttons in a dialog button bar. The background-color and color properties work.
Is there any special class, state etc I need to use for dialog button bar or this is a defect?
Re: Button CSS font not working in dialog button bar [message #671870 is a reply to message #671804] Thu, 19 May 2011 08:05 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
the font of JFace dialog buttons is set programmatically in
org.eclipse.jface.dialogs.Dialog#createButton to
JFaceResources.getDialogFont(). In RAP, the values set by the code
override the values from CSS. In order to get the CSS font, you have to
reset dialog button's font to null.
HTH,
Ivan

On 5/19/2011 6:46 AM, forums-noreply@eclipse.org wrote:
> I have a custom theme with the following style for button:
> Button { font: bold 11px verdana, tahoma, helvetica;
> color: white;
> background-color: #3366cc;
> }
>
> The bold CSS property works for buttons displayed in a composite, but
> doesn't work for buttons in a dialog button bar. The background-color
> and color properties work.
> Is there any special class, state etc I need to use for dialog button
> bar or this is a defect?
Re: Button CSS font not working in dialog button bar [message #672037 is a reply to message #671870] Thu, 19 May 2011 16:35 Go to previous message
Penka  is currently offline Penka Friend
Messages: 7
Registered: July 2009
Junior Member
Thanks Ivan,

Your suggestion works.
Now I have to go and fix all dialogs Sad, instead of blaming it on RAP Smile.

Penka
Previous Topic:Rap settingstore, own implementation configuration
Next Topic:CSS text-transform support for custom variants
Goto Forum:
  


Current Time: Tue Apr 16 05:17:27 GMT 2024

Powered by FUDForum. Page generated in 0.09864 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top