How to Create Custom Frames - Kirocker Music Display
Kirocker Music Display 4.0 introduced themes.
However, there is no graphics way to create or modify frames.
This is omitted in order to save my developing time, and because creating new frames is not so common and not so hard to do by hand.
Here is how to create new frames manually.
Folder Location
The default frames are generally installed in sub-folders here: /usr/share/apps/kirocker/frames/.
To create a new frame, copy one of the folders to your home folder here: ~/.kde/share/apps/kirocker/frames/
.
If one or several sub-folders do not exist, create them.
Make sure the folder name of your new frame is different of the original folder and any other existing one.
Image & Configuration File
Provide an image named frame.png.
Then edit the file kirocker-frame.config:
The goal of this file is to let the application always position your frame so that the user do not have to enter any padding pixels. When the user choose your frame, for any part of the screen he wants, the frame should always be well placed as she meant. For that, Kirocker Music Display need to know the following information:
- FixedParts: the image is stretched to fit on screen. You can specify top, left, right and bottom fixed parts that will not be stretched. All four corners will always be represented with the same size, top and bottom corners will be stretched horizontally, and left and right borders will be stretched vertically, while the middle part will be stretched in both direction.
- Outside: those numbers are provided for semantically defining what appears on your frame image. Your image can have parts representing a shadow, a surrounding lightening or light glow effet... For instance, if the frame image represents a block with a shadow of 10 pixels at the bottom and the right, put "10" in Right and Bottom and "0" in Top and Bottom. Those Outside parts exclude borders: they are represented in the section bellow.
- Border: if your drawing have some borders, put their size here. Generally 0 (no border) or 1 (1 pixel of border), sometimes 2 or more. This information is used to always position the frame in a good way. The padding the user will set when choosing your frame is added to the outside and border areas. For instance, the cover rectangle is computed so that it is always at the middle of the cover area and the cover reflexion area. The bottom bar always have left, right and bottom borders outside of the screen...
- NoDefaultPaddingForBlocks: when the user choose a frame, Kirocker Music Display put decent default padding values so that the user seldomly need to change it. Sometimes, your frame only has a useful outside area, like a shadow or a lightning glow... For areas such as the progressbar, the cover and the lyrics, Kirocker Music Display must not add any padding: all relevant information of the frame is in the outside area, like the shadow. Put this setting to "true" in such cases, and to "false", in other cases (most frames have it to false).
Making the Frame Appear in Kirocker Music Display
To make the frame appear in the theme editor, you need to restart Kirocker Music Display or Kicker.
If you use the applet on your panel, use the command "dcop kicker default restart".
Overwise, simply close Kirocker Music Display and show it again.
Sharing
Your custom frames are automatically exported with themes that use them.
New frames will be installed on computers where they do not exist yet.