nheko/src/ui/ThemeManager.cpp

41 lines
1.2 KiB
C++
Raw Normal View History

2021-03-05 00:35:15 +01:00
// SPDX-FileCopyrightText: 2021 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
2017-04-06 01:06:42 +02:00
#include <QFontDatabase>
#include "ThemeManager.h"
2017-08-20 12:47:22 +02:00
QColor
ThemeManager::themeColor(const QString &key) const
2017-04-06 01:06:42 +02:00
{
if (key == QLatin1String("Black"))
2021-12-28 22:30:12 +01:00
return QColor(0x17, 0x19, 0x19);
2021-09-18 00:22:33 +02:00
else if (key == QLatin1String("BrightWhite"))
2021-12-28 22:30:12 +01:00
return QColor(0xEB, 0xEB, 0xEB);
else if (key == QLatin1String("FadedWhite"))
2021-12-28 22:30:12 +01:00
return QColor(0xC9, 0xC9, 0xC9);
else if (key == QLatin1String("MediumWhite"))
2021-12-28 22:30:12 +01:00
return QColor(0x92, 0x92, 0x92);
2021-09-18 00:22:33 +02:00
else if (key == QLatin1String("BrightGreen"))
2021-12-28 22:30:12 +01:00
return QColor(0x1C, 0x31, 0x33);
else if (key == QLatin1String("DarkGreen"))
2021-12-28 22:30:12 +01:00
return QColor(0x57, 0x72, 0x75);
else if (key == QLatin1String("LightGreen"))
2021-12-28 22:30:12 +01:00
return QColor(0x46, 0xA4, 0x51);
2021-09-18 00:22:33 +02:00
else if (key == QLatin1String("Gray"))
2021-12-28 22:30:12 +01:00
return QColor(0x5D, 0x65, 0x65);
else if (key == QLatin1String("Red"))
2021-12-28 22:30:12 +01:00
return QColor(0xE2, 0x28, 0x26);
else if (key == QLatin1String("Blue"))
2021-12-28 22:30:12 +01:00
return QColor(0x81, 0xB3, 0xA9);
2021-09-18 00:22:33 +02:00
else if (key == QLatin1String("Transparent"))
2021-09-18 00:22:33 +02:00
return QColor(0, 0, 0, 0);
return (QColor(0, 0, 0, 0));
2017-04-06 01:06:42 +02:00
}