Init theming support.

This commit is contained in:
Black Hat
2018-09-10 15:01:01 +08:00
parent 4b9c416b4a
commit f66e62d499
10 changed files with 46 additions and 13 deletions

View File

@@ -222,3 +222,11 @@ QImage Controller::safeImage(QImage image) {
if (image.isNull()) return QImage();
return image;
}
QColor Controller::color(QString userId) {
return QColor(SettingsGroup("UI/Color").value(userId, "#498882").toString());
}
void Controller::setColor(QString userId, QColor newColor) {
SettingsGroup("UI/Color").setValue(userId, newColor.name());
}