Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » CTabFolder/CTabItem: Wrong font on CSS theme switch
CTabFolder/CTabItem: Wrong font on CSS theme switch [message #1818367] Fri, 13 December 2019 11:25
Reiner Wahnsinn is currently offline Reiner WahnsinnFriend
Messages: 1
Registered: December 2019
Junior Member

I try to switch (at runtime) between two css themes which I defined in extensions.
To do this, I use below code snippet:
final String themeId = ...;
final String currentThemeId = ThemeUtil.getCurrentThemeId();
if (!currentThemeId.equals(themeId)) {
	final String[] availableThemeIds = ThemeUtil.getAvailableThemeIds();
	final String newTheme = Arrays
			.filter(availableTheme -> availableTheme.equals(themeId))

	ThemeUtil.setCurrentThemeId(RWT.getUISession(), newTheme);

But after reload, some ui components, like CTabFolder/CTabItem, ignores the new theme and continue to use the defaut font.
I found out that change from 'CTabItem.this.font' to 'getFont()' in in getAdapter works for me but I'm not sure about that.

I know, use the ThemeUtil is not the best solution (because of internal and not api) but I don't know another way of solving the problem.

Is there neat solution? Or is not proposed that you can switch between css themes in RAP at runtime?

RAP 3.10
Previous Topic:RAP GEF endless redraw, no UI Access..
Next Topic:Is it possible to attach listeners to client objects?
Goto Forum:

Current Time: Sun Jul 14 13:33:01 GMT 2024

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

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

Back to the top