-
13 Nov 2009 3:19 PM #31
Ignore my previous message. Won't work.
-
2 Feb 2010 6:48 AM #32
GWT 2.0
GXT 2.0.1
IntelliJ Idea 9.0
I never successfull add a theme.
- I add gxt-theme-olive-1.0.jar into my lib directory
- I add this line to myModule.gwt.xml : Code:
<inherits name='ext.ux.theme.olive.Olive'/>
- I add these imports to my entryPoint :
Code:import com.extjs.gxt.ui.client.GXT; import ext.ux.theme.olive.client.Olive;
- I add the followind code to myEntryPoint :
Code:public void onModuleLoad() { ThemeManager.register(Olive.OLIVE); GXT.setDefaultTheme(Olive.OLIVE, true); ...
I suppose I don't need to copy myself the files (images and css) ?
-
2 Feb 2010 8:35 AM #33
As i said previously :
1) Supposing your module's host page "index.html"
2) gxt base theme in a "gxt" folder at the same place,
3) Adding your module named "myModule" :
portion of index.html :
=> Injecting dependency for Olive theme module will inject module's resources (stylesheet and resources inside you'r" module base'url :Code:<head/> ... <link rel="stylesheet" type="text/css" href="gxt/css/gxt-all.css" /> .... </head> <body> ... <script language="javascript" type="text/javascript" src="myModule/myModule.nocache.js"></script> ... </body>
your stylesheet and images for olive will go in :
root/myModule/css/olive.css.
GXT's theme manager does not handle this correctly:
you have to change theme's filename before registering on manager (see previous post to find why)
Code:Theme theme = Theme.OLIVE; String filename = theme.getFile(); theme.set("file", GWT.getModuleBaseURL()+"css/"+filename); ThemeManager.register(theme); GXT.setDefaultTheme(Olive.OLIVE, true);
-
2 Feb 2010 11:37 PM #34
Thanks for your help, for myself I just
- add jars in the lib directory (TAKE THE ZIP FILES INCLUDED AT THE BOTTOM OF THE FIRST POST BECAUSE THESE REFERENCED AT THE TOP OF THIS POST DOESN'T WORK and the inherited/imported classes aren't found with these ones)
- import theme class in the entry point
- inherit themes in gwt.xml
- put this code in the entryPoint :
Code:Theme themes[] = {Black.BLACK, DarkGray.DARKGRAY, Olive.OLIVE, Purple.PURPLE, Slickness.SLICKNESS}; for (Theme theme : themes) { theme.set("file", GWT.getModuleBaseURL() + "css/" + theme.getFile()); ThemeManager.register(theme); }
-
2 Feb 2010 11:49 PM #35
Thats it.
Yes, you dont have do place images/css anywhere. Actually, each theme module's contains there resources files (in public folder) and they are automatically injected.
-
22 Feb 2010 1:36 PM #36
-
14 Jul 2010 3:56 PM #37
-
12 Sep 2011 1:17 PM #38
Slickness theme buttons not rendered properly
Slickness theme buttons not rendered properly
I have followed the various instructions in the threads that relate to the use of the slickness theme and am still not getting the black rendered buttons anywhere i.e. in message boxes, button groups, menu bars etc.
I have used the approach of:
- dropping the gxt-theme-slickness-1.0.jar into my project
- updating my gwt.xml to inherit the module
- alterring the file name of the theme before adding it to my theme manager:
Theme slickness = Slickness.SLICKNESS;
String filename = slickness.getFile();
slickness.set("file", GWT.getModuleBaseURL()+"css/"+filename);
ThemeManager.register(slickness);
GXT.setDefaultTheme(Slickness.SLICKNESS, true);
When I render the standard hello world example, I see:
slicknessButton.png
When I should be seeing buttons like:
slicknessButton2.png
Does anyone have any idea what might be going on?
I am using GXT 2.2.4.
Thanks,
Peter
-
12 Sep 2011 11:14 PM #39
You are in the GXT 1 forums here, so i guess your theme is for GXT 1 only. GXT 2 contained braking css changes which made old themes not fully compatible.I am using GXT 2.2.4.
-
13 Sep 2011 4:54 AM #40
Any dark themes for GXT 2.2
Any dark themes for GXT 2.2
Sven,
This was the only spot where I saw mention of the slickness theme - or any dark theme.
Are you aware of any darker themes that are compatible with GXT 2.2?
And thanks for a response on this ancient thread!
Cheers!
Peter


Reply With Quote