Home » Eclipse Projects » Remote Application Platform (RAP) » How to change the font size of the title in a TitleAreaDialog?
How to change the font size of the title in a TitleAreaDialog? [message #522829] |
Wed, 24 March 2010 06:15 |
tingel christian Messages: 46 Registered: December 2009 |
Member |
|
|
Hi everyone:
I need to change the font size of the title string in a TitleAreaDialog.I have found that modifying the \org\eclipse\jface\resource\jfacefonts.properties in org.eclipse.rap.jface_1.2.0.20090616-1425.jar could make it work which means I have to make changes to the RAP config files directly in the jar file.
So I wish to know, can I change the font size without changing RAP itself or creating a new fragment project? And how? If I can achieve this by theme, what key word should I use?
Or, If I have to create a new fragement project, do I have to make it EPL and opensource?
Thanks and Best Regards
Tingel Christian
[Updated on: Wed, 24 March 2010 06:30] Report message to a moderator
|
|
| |
Re: How to change the font size of the title in a TitleAreaDialog [message #522885 is a reply to message #522861] |
Wed, 24 March 2010 10:47 |
tingel christian Messages: 46 Registered: December 2009 |
Member |
|
|
Hi Holger:
Thanks a lot for you information.
I followed your direction, but it did not work at all
Actually, I extended the org.eclipse.ui.newWizard extension point and the WizardDialog is instantiated within the NewWizardAction itself so I am not able to control the instance of WizardDialog directly, you know.
So I called the setData method in a subclass of WizardPage when override the createControl(Composite parent) method with the following code:
this.getContainer().getShell().setData(WidgetUtil.CUSTOM_VAR IANT, "mySample");
In the css file, I coded something like this:
Shell.mySample {
font: 12px Verdana, "Lucida Sans", Arial, Helvetica, sans-serif;
color: blue;
}
and the theme and branding are both extended.
But all these steps made no differences...
(I also tried to setData in subclass of Wizard, the effect was the same...)
Did I missed anything?
Thanks and Best Regards!
Tingel Christian
|
|
| |
Re: How to change the font size of the title in a TitleAreaDialog [message #522909 is a reply to message #522885] |
Wed, 24 March 2010 13:45 |
Holger Staudacher Messages: 166 Registered: July 2009 |
Senior Member |
|
|
Hi Christian,
ok this sounds not good. I tooked a closer look at TitleAreaDialog. it
seems that the title will be displayed in the private Label titleLabel.
To change this text you need to set a CustomVariant on this Label. The
bad thing is, you have no opportunity to access this field. Another
solution would be to change the global font of Labels. But I think this
is not what you want. So, the conclusion is, you have no clean
possibility to change this font.
Hope this helps.
Regards Holger
On 2010-03-24 11:47:03 +0100, tingel christian <jillhan520@126.com> said:
> Hi Holger:
>
> Thanks a lot for you information.
>
> I followed your direction, but it did not work at all :(
> Actually, I extended the org.eclipse.ui.newWizard extension point and
> the WizardDialog is instantiated within the NewWizardAction itself so I
> am not able to control the instance of WizardDialog directly, you know.
>
> So I called the setData method in a subclass of WizardPage when
> override the createControl(Composite parent) method with the following
> code:
>
> this.getContainer().getShell().setData(WidgetUtil.CUSTOM_VAR IANT,
> "mySample");
>
> In the css file, I coded something like this:
>
> Shell.mySample {
> font: 12px Verdana, "Lucida Sans", Arial, Helvetica, sans-serif;
> color: blue;
> }
>
> and the theme and branding are both extended.
>
> But all these steps made no differences...
>
> (I also tried to setData in subclass of Wizard, the effect was the same...)
>
> Did I missed anything?
>
> Thanks and Best Regards!
>
> Tingel Christian
--
-----------------------------------------
http://eclipsesource.com
http://twitter.com/eclipsesource
|
|
| |
Re: How to change the font size of the title in a TitleAreaDialog [message #523140 is a reply to message #522917] |
Thu, 25 March 2010 05:00 |
|
Christian,
you might also want to cc yourself on this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=280773
I think, until we have a solution for this one, the fragment approach is
probably the easiest workaround.
Best regards, Ralf
tingel christian wrote:
> Thank you Holger :)
> The fact is that...I do changed the font size globally and that made
> different to every label but the one in the title area of the wizard
> page.I think this is probably a bug...
>
> Finally I created a fragment project and moved the jfacefonts.properties
> to it and had the org.eclipse.jface.bannerfont.0=MS Sans Serif-bold-10
> configuration item changed to org.eclipse.jface.bannerfont.0=MS Sans
> Serif-bold-12.
>
> Anyway, thank you very much for you kind help :)
> Best Regards
>
> Tingel Christian
|
|
| |
Goto Forum:
Current Time: Sun Oct 13 07:38:42 GMT 2024
Powered by FUDForum. Page generated in 0.03914 seconds
|