Creating custom themes
Last updated
Last updated
Audacity supports themes via files called ImageCache.png which can be shared and installed by users.
Audacity stores the source files for the built-in themes in as a group of individual files.
To create a custom theme out of this, use the following steps:
get a copy of the audacity source and set up a build environment. Details can be found in .
Copy an existing theme folder in lib-theme-resources to create a base for your own theme and rename it with your theme name (for this example, Yourtheme
).
Replace all relevant files with your own themed versions. Some files found in the sources are no longer (or not yet) used in current versions of Audacity. Note: Make sure to use an editor that's capable of handling transparencies - MSPaint will not work. Additionally, make sure to not resize any images.
Create a copy of ClassicThemeAsCeeCode.cpp and edit it:
Open lib-theme-resources' CMakeLists.txt file and add your theme like the others:
In libraries/lib-theme/Theme.cpp
's function GUITheme()
, add your theme to the list:
In src/Experimental.cmake, uncomment the THEME_PREFS flag (remove the #
before THEME_PREFS
):
Compile and run Audacity.
Open the preferences.
Press OK and restart Audacity.
To update an existing theme to work with a new version, you'll need to pull the latest master
from the audacity/audacity
repo.
Once you have updated your fork, simply build Audacity again and export the ImageCache.png again (steps 8-11).
In your Github fork, there usually is a button for this:
Alternatively, you can use git for this. Depending on your setup, it is likely to be one of the following
If you want to avoid the dance described above, you can also edit the ImageCache.png directly. A copy for the version found in 3.6.x can be found below.
Additionally, an accompanying HTML explains what each button is called. Simply download both the PNG and HTML into the same folder, open the HTML in a browser and mouseover a button or color to get its name.
But again, the version of the ImageCache above will likely only work for one version of Audacity.
You'll see an experimental option called Theme: From here, you can do various things. Most importantly, "Save Theme Cache" creates the ImageCache.png you can share with other people. It will be stored in the Theme folder of the Audacity settings (ie %appdata%\Audacity if on Windows).
Our contain info on how to use custom themes as a user.