Home » Eclipse Projects » Remote Application Platform (RAP) » Changing the global font
| |
Re: Changing the global font [message #854774 is a reply to message #854306] |
Tue, 24 April 2012 08:20 |
|
Hi Ben,
Glad that you like the new theme ;-)
The problem with the *-selector is that it really applies to all widgets
and sub-widgets. This has often some unwanted implications. Therefore
the default theme specifies properties specifically for every single widget.
This means that a *-rule in a theme contribution does not override the
default properties, because this is less specific. So currently, the
only way to override the fonts is to add a selector for every widget you
want to change, sorry.
Button,
Combo,
Label,
Shell-TitleBar,
.... {
font: 12px ...;
}
We'd have plans to look into less [1], which allows for variables in CSS
and see if this could help removing the redundancy.
Hope this makes it more clear.
Regards, Ralf
[1] http://lesscss.org/
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Re: Changing the global font [message #855432 is a reply to message #854774] |
Tue, 24 April 2012 20:26 |
Benjamin Wolff Messages: 136 Registered: July 2009 |
Senior Member |
|
|
Hi,
thanks for the clarification.
So then I'm going to identify the widgets that have a font and adjust these accordingly. Setting an overall font-size in px could indead lead to unwanted implications, as you mentioned it, so it seems that this is the best way to go for now. At least it should be an one time effort ;).
Nice would be some a ratio (em) based layout, where it would be possible to set the base font size and the other fonts would adapt. However, as I understand the RAP layouting is based on px, so I'd guess this is currently not possible...
Cheers,
Ben
Am 24.04.2012 10:20, schrieb Ralf Sternberg:
> Hi Ben,
>
> Glad that you like the new theme ;-)
>
> The problem with the *-selector is that it really applies to all widgets and sub-widgets. This has often some unwanted implications. Therefore the default theme specifies properties specifically for every single widget.
>
> This means that a *-rule in a theme contribution does not override the default properties, because this is less specific. So currently, the only way to override the fonts is to add a selector for every widget you want to change, sorry.
>
> Button,
> Combo,
> Label,
> Shell-TitleBar,
> .... {
> font: 12px ...;
> }
>
> We'd have plans to look into less [1], which allows for variables in CSS and see if this could help removing the redundancy.
>
> Hope this makes it more clear.
>
> Regards, Ralf
>
>
> [1] http://lesscss.org/
>
|
|
|
Re: Changing the global font [message #855898 is a reply to message #855432] |
Wed, 25 April 2012 07:34 |
|
> Nice would be some a ratio (em) based layout, where it would be possible to set the base font size and the other fonts would adapt. However, as I understand the RAP layouting is based on px, so I'd guess this is currently not possible...
Yes, the layout is based on pixels. And if we applied the percentages on
the server, we'd probably get some weird rounding issues. So, let's keep
this idea in mind for later ;-)
Regards, Ralf
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Re: Changing the global font [message #868199 is a reply to message #855898] |
Tue, 01 May 2012 17:45 |
Benjamin Wolff Messages: 136 Registered: July 2009 |
Senior Member |
|
|
I dug through the default.css theme and through the *.default.css files for the particular widgets to determine which fonts settings I have to adjust. So here are the CSS rules that should cover all font settings for the current RWT widget set (taken from the bundle org.eclipse.rap.rwt, RAP v1.5.0 M6). It should safe some time if someone else also wants to change the global font sizes:
*,
Button,
Combo, Combo[BORDER],
CCombo,
CLabel,
CTabItem,
Display,
DateTime, DateTime-Calendar-Navbar,
FileUpload,
Label,
Link,
List, List-Item,
Shell-Titlebar,
Spinner,
TabFolder,
Table, TableColumn,
Text,
ToolBar,
ToolTip, ToolTip-Message,
TreeColumn,
Widget-ToolTip {
font: 14px Verdana, "Lucida Sans", Arial, Helvetica, sans-serif;
}
Group {
font: 10px Verdana, "Lucida Sans", Arial, Helvetica, sans-serif;
}
ToolTip-Text {
font: bold 14px Verdana, "Lucida Sans", Arial, Helvetica, sans-serif;
}
Display {
rwt-fontlist: 14px 'Segoe UI', Corbel, Calibri, Tahoma, 'Lucida Sans Unicode';
}
Cheers,
Ben
Am 25.04.2012 09:34, schrieb Ralf Sternberg:
>> Nice would be some a ratio (em) based layout, where it would be possible to set the base font size and the other fonts would adapt. However, as I understand the RAP layouting is based on px, so I'd guess this is currently not possible...
>
> Yes, the layout is based on pixels. And if we applied the percentages on the server, we'd probably get some weird rounding issues. So, let's keep this idea in mind for later ;-)
>
> Regards, Ralf
>
|
|
|
Goto Forum:
Current Time: Tue May 21 16:55:10 GMT 2024
Powered by FUDForum. Page generated in 0.03914 seconds
|