5

I am using Dolphin File Manger for obvious reasons (tabs, split views, remembers what's open, filters, functioning searches and tons others) on Windows and to this date I haven't been able to force it to use dark theme.

Since it's a KDE application (and in turn Qt), it's 100% possible to make it dark and it should be also pretty easy. I use Dolphin on Windows as "portable".

dolphin.exe --help-all

...contains also a list of Qt options, including --platformtheme <theme> option, which I would assume could be used to load a qss style sheet, so I downloaded Dark Monokai and run dolphin as:

dolphin.exe --platformtheme C:\Users\myhome\Downloads\DarkMonokai.qss

...but still no luck, Dolphin is "white". My assumption might be wrong and I couldn't find any documentation for this option.

Any ideas, please?

1 Answers1

5

I had the same problem. After a few hours of messing around with this, I was able to come up with a working solution.

TL;DR

Apparently Dolphin needs to be run like this:

dolphin.exe --stylesheet C:\Users\USER\path\to\grey.qss --platform windows:darkmode=2

Where grey.qss needs to be placed in the given path.

grey.qss:

QWidget {
    color: white;
    background-color: rgb(72, 72, 72);
}
QScrollBar {
    background: rgb(42, 42, 42);
}
/* Context menu buttons. */
QMenu::item:selected {
    background: black;
}
/* Makes some cickable things in the configuration menu look nicer. */
QAbstractButton:hover {
    background-color: rgb(66, 66, 66);
}
QAbstractButton:pressed {
    background-color: black;
}
/* Top menu bar buttons */
QToolButton {
    background-color: rgb(58, 58, 58);
}
QToolButton:hover {
    background-color: rgba(30, 30, 30, 0.505);
}
QToolButton:disabled {
    background-color: rgb(126, 126, 126);
}
QToolButton:checked {
    background-color: black;
}
QToolButton:selected {
    background-color: rgb(31, 28, 99);
}

Explanation

Instead of --platformtheme the option --stylesheet needs to be used. There is no mention of it in dolphin.exe --help-all, but it seems to be a standard option for Qt applications. With this option I was able to use the style as defined in an external .qss file. However, I wasn't able to find a way to change the color of some elements, namely the filename labels were still black just like they are in the light theme.

Black filename label

So that's where the other option comes in: --platform windows:darkmode=2. This changes the color to white, allowing us to use a darker background.

Now at first I tried using the file DarkMonokai.qss as mentioned in the question, but it didn't work for me. Since it's very long and I had no idea what the issue might be, I went ahead and created my own minimal stylesheet grey.qss. It's nothing special, but gets the job done giving us a dark theme.

In order to be as reproducible as possible, this is the Dolphin build I used.

Here is what my Dolphin looks with that stylesheet. Again, it's nothing special, but at least it doesn't burn my eyes.

Result

Improve

I also made a git repository in case anyone wants to fork/contribute and improve the solution.