How to create a theme
Structure of a theme
A theme consists of two parts, 1) an XML definition file, and 2) image files
Theme XML Definition File
The theme definition file, usually named theme.xml, defines how the theme will look and what images files will be used.
The theme definition contains 5 states, Default, Discharging, LowBattery, CriticalBattery, and Charging.
Each state contains a definition for a BoxTile image of the Background, ProgressBar, Overlay, HoverOverlay, and PressedOverlay.
Images
Images in a BatteryBar theme are defined as BoxTiles.
A BoxTile image is made up of 9 separate images, 4 borders (top, left, bottom, right), 4 corners (top-left, top-right, bottom-left, bottom-right) and 1 center image.
The easiest way to create a BoxTile image is to first create a full-size version of the image and then slice the image into the 9 corresponding parts.
The 4 corner images are drawn exactly as-is. The 4 border images are tiled. The top and bottom images are titled horizontally and the left and right images are tiled vertically. The center image is stretched vertically and tiled horizontally.