diff options
author | Claudio Cambra <claudio.cambra@gmail.com> | 2022-01-28 19:03:39 +0300 |
---|---|---|
committer | Claudio Cambra <claudio.cambra@gmail.com> | 2022-03-16 15:57:45 +0300 |
commit | f585b8bd489444eed07fa86535a6835b780f237b (patch) | |
tree | 6e39ac8982d7166804affdb085705ac1d2c5a3df /src/gui/tray/usermodel.cpp | |
parent | 454ae37e8dc27b0749dab2cd34f99c9b1cab8592 (diff) |
Add support for server color theming by using server color as accentfeature/accent-color
color
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
Diffstat (limited to 'src/gui/tray/usermodel.cpp')
-rw-r--r-- | src/gui/tray/usermodel.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/tray/usermodel.cpp b/src/gui/tray/usermodel.cpp index 8adae3682..17eb51645 100644 --- a/src/gui/tray/usermodel.cpp +++ b/src/gui/tray/usermodel.cpp @@ -73,6 +73,10 @@ User::User(AccountStatePtr &account, const bool &isCurrent, QObject *parent) connect(_account->account().data(), &Account::userStatusChanged, this, &User::statusChanged); connect(_account.data(), &AccountState::desktopNotificationsAllowedChanged, this, &User::desktopNotificationsAllowedChanged); + connect(_account->account().data(), &Account::capabilitiesChanged, this, &User::headerColorChanged); + connect(_account->account().data(), &Account::capabilitiesChanged, this, &User::headerTextColorChanged); + connect(_account->account().data(), &Account::capabilitiesChanged, this, &User::accentColorChanged); + connect(_activityModel, &ActivityListModel::sendNotificationRequest, this, &User::slotSendNotificationRequest); } @@ -700,6 +704,21 @@ bool User::hasActivities() const return _account->account()->capabilities().hasActivities(); } +QColor User::headerColor() const +{ + return _account->account()->headerColor(); +} + +QColor User::headerTextColor() const +{ + return _account->account()->headerTextColor(); +} + +QColor User::accentColor() const +{ + return _account->account()->accentColor(); +} + AccountAppList User::appList() const { return _account->appList(); |