How to create a custom theme/skin/css.
I’ve searched through the posts and can’t find an adequate place that details how to create a custom theme. I have since figured it out and want to post how to do it so that others won’t have to spend time trying to figure it out.
1. Copy a smartgwt theme. (e.g. com.smartclient.theme.enterpriseblue).
2. Add that theme to your smargwt project java source code directory and rename the package. (e.g. com.yourstuff.theme.yourblue).
3. Rename the file EnterpriseBlue.gwt.xml. (e.g. YourBlue.gwt.xml)
4. Delete the EnterpriseBlueResources.gwt.xml file—you don’t need it.
5. Rename and find the folder, com.yourstuff.theme.yourblue.public.sc.skins.EnterpriseBlue and rename EnterpriseBlue to YourBlue.
6. Open the file under the YourBlue called load_skin.js and rename any reference of EnterpriseBlue to YourBlue.
7. In your Client.gwt.xml file add the lines:
<inherits name=”com.yourstuff.theme.yourblue.YourBlue” />
<source path=”theme” /> (this is assuming that Client.gwt.xml file is in the package com.yourstuff).
8. This is all you need to do. Update the images and skin_style.css to customize your look.
I’ve searched through the posts and can’t find an adequate place that details how to create a custom theme. I have since figured it out and want to post how to do it so that others won’t have to spend time trying to figure it out.
1. Copy a smartgwt theme. (e.g. com.smartclient.theme.enterpriseblue).
2. Add that theme to your smargwt project java source code directory and rename the package. (e.g. com.yourstuff.theme.yourblue).
3. Rename the file EnterpriseBlue.gwt.xml. (e.g. YourBlue.gwt.xml)
4. Delete the EnterpriseBlueResources.gwt.xml file—you don’t need it.
5. Rename and find the folder, com.yourstuff.theme.yourblue.public.sc.skins.EnterpriseBlue and rename EnterpriseBlue to YourBlue.
6. Open the file under the YourBlue called load_skin.js and rename any reference of EnterpriseBlue to YourBlue.
7. In your Client.gwt.xml file add the lines:
<inherits name=”com.yourstuff.theme.yourblue.YourBlue” />
<source path=”theme” /> (this is assuming that Client.gwt.xml file is in the package com.yourstuff).
8. This is all you need to do. Update the images and skin_style.css to customize your look.