mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 00:33:09 -07:00
parent
25b7972f88
commit
ce013f132f
11 changed files with 195 additions and 126 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue