Project

General

Profile

Windows dark theme guide

Added by Stephen Anderson 2 months ago

A few days ago I finally reached my tolerance level of the glaring white screen in the Windows version of Audacious, so I did something about it. This guide will let you do something about it too. If you follow these steps you can have a theme like the attached screenshot or even have your own customised colours/theme.

Note that this procedure involves doing very simple mods to source code and compiling yourself. If you've not done something like that before, do not be put off, because it will be worth it. It just takes time, so persist until the end.

This guide assumes you already have Audacious 4.1 installed under Windows and that you are using the QT interface (as defined in File > Settings > Appearance).

1. Get the latest version of the Audacious source code from https://github.com/audacious-media-player/audacious
  • To download it you can press the Code button and choose Download ZIP. Then extract it anywhere on your machine.
2. Open the win32/notes.html file in your web browser and follow those steps carefully to get MinGW installed, and Audacious and its dependencies compiled from source.
  • Use the latest versions (4.1) of the Audacious code (can be obtained from https://distfiles.audacious-media-player.org) rather than the older ones mentioned in the doc.
  • I ran "MSYS2 MinGW 32-bit" as Administrator, so I suggest you do the same to avoid any possible problems.
  • Note that it will take a very long time to do this part of the process, especially the GTK+ compilation; I suggest going off and doing something more interesting once you kick off the "make -j4 gtk" command.
  • You will see large numbers of warning messages during compilation but these can be ignored.
3. Copy the compiled audqt.dll from c:\audacious\src\libaudqt\ into the Audacious installation dir (c:\Program Files (x86)\Audacious\bin\) to test that Audacious still works before changes are made.
  • Make a copy of the existing audqt.dll as a backup before replacing.
  • If you already had Audacious open, restart it to test.
4. Edit C:\audacious\src\libaudqt\audqt.cc in your favourite text editor, and add the following lines of code before the qapp->setApplicationName(_("Audacious")); line in the init function.
  • In the current v4.1 version I added these at line 95; If using a different version they could be somewhere else.
    QFile f( "style.qss" );
    if ( !f.exists() )
    {
       //file not found, do nothing
    }
    else
    {
       f.open( QFile::ReadOnly | QFile::Text );
       QTextStream ts( &f );
       qApp->setStyleSheet( ts.readAll() );
    }
5. At the top of the same file, add the following code after the #include <QVBoxLayout> line.
  • In v4.1, I added these at line 29.
#include <QFile>
#include <QTextStream>
6. Re-compile Audacious by redoing the "make" command from the /C/audacious dir in MinGW.
  • It's really just one dll we're re-compiling here, so this will be quick.

7. Copy the new compiled audqt.dll from c:\audacious\src\libaudqt\ into the Audacious installation dir.

8. Now the fun bit. You'll need a QT stylesheet containing your desired theme saved as style.qss in the same Audacious installation dir.
  • You can pick a QT stylesheet you find on the internet or even create one from scratch if you like.
  • The style I am using in the attached screenshot was obtained from https://github.com/EClaesson/QTDark without any mods. If you want to try this one, just use the QTDark.stylesheet file at that URL as your style.qss file.
  • Another decent dark stylesheet can be found here: https://github.com/ColinDuquesnoy/QDarkStyleSheet/blob/master/qdarkstyle/dark/style.qss
  • Note that some QT stylesheets you find will look good for Audacious and others won't. Some that don't look good could potentially be modified to work well.

9. Once the new audqt.dll and your style.qss are in place, start (or restart) Audacious.

10. The new theme should now be applied.

If you want to change the theme, modify/replace style.qss and restart Audacious.
If you want to go back to the usual Audacious appearance, remove/rename style.qss and restart Audacious.

Enjoy living on the dark side!


Replies (2)

RE: Windows dark theme guide - Added by John Lindgren about 2 months ago

Very nice work! And thank you for putting in the effort to compile from source on Windows; I wrote up those instructions (win32/notes.html) and sometimes I wondered if anyone actually reads them :)

I took some time over the weekend to make a dark theme work "out of the box" for the next version; here are screenshots from the master branch:

RE: Windows dark theme guide - Added by Stephen Anderson about 2 months ago

Thank you very much. That flat dark theme looks great!

    (1-2/2)