How-to use css to customise ECF views ? [message #1223157] |
Sun, 22 December 2013 10:56  |
Eclipse User |
|
|
|
Hello,
I have a RCP app, that includes some ECF view (chat room); it works fine.
I would like to customise the fonts of the messages visible in the chat room windows, if possible through a css file (Eclipse Theme).
According to the code of MessageRenderer.java, ECF does something like this (I simplified the code):
String RECEIVED_FONT = "org.eclipse.ecf.presence.ui.receivedFont";
(...)
ITheme theme = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
Font f = theme.getFontRegistry().get(RECEIVED_FONT);
(...)
Now my question is: what shall I add to my css file to change the font ?
I tried
#org.eclipse.ecf.presence.ui.receivedFont {
font-size: 16;
font-family: 'Arial';
}
but it had no effect (and I admit that I'm not a css expert).
Any suggestion welcome,
Best regards,
Bernard.
|
|
|
|
Re: How-to use css to customise ECF views ? [message #1224377 is a reply to message #1223424] |
Thu, 26 December 2013 09:30  |
Eclipse User |
|
|
|
Thank you for this reply.
Using e4 css file (and thanks to css spy), I could change some parameters of the chat view (eg. the background colour), but not the fonts.
I could nevertheless change the fonts by code, eg.:
PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getFontRegistry()
.put("org.eclipse.ecf.presence.ui.receivedFont", myFont);
so it's fine now.
Regards,
Bernard.
|
|
|
Powered by
FUDForum. Page generated in 0.06766 seconds