I just pushed that change to master along with this earlier snippet from Sigil's main.cpp as well:
Code:
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
// Unset platform theme plugins/styles environment variables immediately
// when forcing Sigil's own darkmode palette on Linux
if (!force_sigil_darkmode_palette.isEmpty() ||
!force_pageedit_darkmode_palette.isEmpty()) {
QStringList env_vars = {"QT_QPA_PLATFORMTHEME", "QT_STYLE_OVERRIDE"};
foreach(QString v, env_vars) {
bool irrel = qunsetenv(v.toUtf8().constData());
Q_UNUSED(irrel);
}
}
#endif
That appears to work on my Manjaro box under Qt6 and Qt5 with FORCE_PAGEEDIT_DARKMODE_PALETTE=1 set.
Hope that is okay.