Refresh custom colors once color scheme is changed

PR #20588.
This commit is contained in:
Vladimir Golovnev
2024-03-23 11:32:07 +03:00
committed by GitHub
parent 25b7972f88
commit ce013f132f
11 changed files with 195 additions and 126 deletions

View File

@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2015-2024 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2010 Christophe Dumez <chris@qbittorrent.org>
*
* This program is free software; you can redistribute it and/or
@@ -114,6 +114,7 @@ private slots:
private:
void configure();
void loadUIThemeResources();
QString displayValue(const BitTorrent::Torrent *torrent, int column) const;
QVariant internalValue(const BitTorrent::Torrent *torrent, int column, bool alt) const;
QIcon getIconByState(BitTorrent::TorrentState state) const;
@@ -122,7 +123,7 @@ private:
QHash<BitTorrent::Torrent *, int> m_torrentMap; // maps torrent handle to row number
const QHash<BitTorrent::TorrentState, QString> m_statusStrings;
// row text colors
const QHash<BitTorrent::TorrentState, QColor> m_stateThemeColors;
QHash<BitTorrent::TorrentState, QColor> m_stateThemeColors;
enum class HideZeroValuesMode
{