Converting a Microsoft Visual Style to a SkinLF themepack
I've been asked by a user how to convert a Microsoft Visual Style to SkinLF. My first answer was: you have to get the source code to get the converter, then to use StyleBuilderXP to extract the visual style, it generates an XML file along with a couple of BMP files, you run the converter on the xml, then there are final steps to perform by hand. I do not know if the user manages to create its own SkinLF themepack but I promess he will get a tutorial on creating a themepack from a visual style so here it is.
Step 1 - Find the Visual Style
There are several sites hosting visual styles, go to one of them and grab a visual style:
If your visual style comes in a ZIP file, unzip it. Once done, you should find a file ending with .msstyles extension. If you plan to distribute your themepack, make sure to get the agreement of the Visual Style creator first.
Step 2 - Extract the .msstyle
Download and install the evaluation of StyleBuilder at TGTSoft.com. Start StyleBuilder. From the File menu, select "Import .msstyles file". In the popup window, select the .msstyles previously downloaded and a folder when the theme will be extracted (make sure the folder exists - I usually created a folder named "extracted" in the folder of the .msstyles). If the import goes fine, a window will ask whether you want to open the theme, say "Yes".
In the "extracted" folder, you will find a bunch of files and folders. There are XML files describing the theme and png, bmp image files which are the actual pixmaps to paint the theme (as in a themepack, there is nothing new here).
Some visual styles embed several variations of the same theme, in such case there will be several .xml files, one for each variation.
Step 3 - Converting to themepack
The converters are bundled in the skinlf.jar. Most uptodate version is available when doing a checkout of the code from the CVS repository (See skinlf.dev.java.net).
To convert the visual style to a themepack, open a terminal from the "bin" folder of the SkinLF distribution and run:
java -cp skinlf.jar
com.l2fprod.tools.msstyles.MsStylesToSkinLF
<path-to-the-visualstyle-folder>
<path-to-the-visualstyle.xml>
<path-to-the-themepack-folder-to-create>
In the target folder, it will generate the directory
structure of a themepack including skinlf-themepack.xml, gtk,
icons, kde.
At this point, you should be able to get a preview of how your theme will look like. You can try it with the SkinLF demo:
demo.bat <path-to-the-themepack-folder-to-create>\skinlf-themepack.xml
Step 4 - Finalizing the themepack
However, the theme might not be usable yet as the converter is not yet top-class converter. It does the basic and let you do the fine tuning of the theme, this way you become an artist :).
The most common problems are:
- Combobox looks bad
- Menu border is the default border
- Internal frame border is incorrect
- Some transparency issues with check or radio buttons
- Icons for FileChooser, Internal Frames are set to default
- Font size is set to default
Combobox looks bad
TODO
Menu border is the default border
TODO
Internal frame border is incorrect
TODO
Step 5 - Ready for prime time
You have successfully created a new themepack. Make the community benefits from your effort by contributing the themepack to javootoo.com, send an email to webmaster at javootoo.com.