mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
committed by
GitHub
parent
25b7972f88
commit
ce013f132f
@@ -114,8 +114,13 @@ QByteArray DefaultThemeSource::readStyleSheet()
|
||||
|
||||
QColor DefaultThemeSource::getColor(const QString &colorId, const ColorMode colorMode) const
|
||||
{
|
||||
const auto iter = m_colors.constFind(colorId);
|
||||
Q_ASSERT(iter != m_colors.constEnd());
|
||||
if (iter == m_colors.constEnd()) [[unlikely]]
|
||||
return {};
|
||||
|
||||
return (colorMode == ColorMode::Light)
|
||||
? m_colors.value(colorId).light : m_colors.value(colorId).dark;
|
||||
? iter.value().light : iter.value().dark;
|
||||
}
|
||||
|
||||
Path DefaultThemeSource::getIconPath(const QString &iconId, const ColorMode colorMode) const
|
||||
|
||||
Reference in New Issue
Block a user