fix handling of force-dark-mode when style is forced via style or env

This commit is contained in:
Martin Rotter 2022-03-03 08:14:01 +01:00
parent 45d7a78684
commit 45751381ec
3 changed files with 11 additions and 3 deletions

View File

@ -26,7 +26,7 @@
<url type="donation">https://github.com/sponsors/martinrotter</url>
<content_rating type="oars-1.1" />
<releases>
<release version="4.1.2" date="2022-03-02"/>
<release version="4.1.2" date="2022-03-03"/>
</releases>
<content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute>

View File

@ -65,6 +65,13 @@ void SkinFactory::loadSkinFromData(const Skin& skin) {
qWarningNN << LOGSEC_GUI << "Respecting forced style(s):\n"
<< " QT_STYLE_OVERRIDE: " QUOTE_NO_SPACE(env_forced_style) << "\n"
<< " CLI (-style): " QUOTE_NO_SPACE(cli_forced_style);
if (!cli_forced_style.isEmpty()) {
style_name = cli_forced_style;
}
else if (!env_forced_style.isEmpty()) {
style_name = env_forced_style;
}
}
if (isStyleGoodForDarkVariant(style_name) &&

View File

@ -206,9 +206,10 @@ class RSSGUARD_DLLSPEC RootItem : public QObject {
// automatically sorted and are always sorted by title.
//
// Sort order number cannot be negative but order of list of items with same
// parent does not have to form continuous series, for example:
// parent MUST form continuous series AND start with zero, for example:
// 0, 1, 2, 3, 4, ...
// 5, 7, 12, 13, 19
//
// NOTE: This is checked with DatabaseQueries::fixupOrders() method on app startup.
int sortOrder() const;
void setSortOrder(int sort_order);