mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 14:48:15 +00:00
feat(Colors): add linphone friday colors
This commit is contained in:
parent
4e7320519a
commit
2e1a802d0f
1 changed files with 25 additions and 1 deletions
|
|
@ -29,11 +29,35 @@
|
|||
|
||||
#define COLORS_SECTION "ui_colors"
|
||||
|
||||
#ifndef LINPHONE_FRIDAY
|
||||
#define LINPHONE_FRIDAY 1
|
||||
#endif // ifndef LINPHONE_FRIDAY
|
||||
|
||||
#if LINPHONE_FRIDAY
|
||||
#include <QDate>
|
||||
#endif // if LINPHONE_FRIDAY
|
||||
|
||||
using namespace std;
|
||||
|
||||
// =============================================================================
|
||||
|
||||
Colors::Colors (QObject *parent) : QObject(parent) {}
|
||||
#if LINPHONE_FRIDAY
|
||||
|
||||
static void setLinphoneFridayColors (Colors &colors) {
|
||||
colors.setProperty("i", QColor("#F48D8D"));
|
||||
colors.setProperty("s", QColor("#F58585"));
|
||||
colors.setProperty("t", QColor("#FFC5C5"));
|
||||
}
|
||||
|
||||
#endif // if LINPHONE_FRIDAY
|
||||
|
||||
Colors::Colors (QObject *parent) : QObject(parent) {
|
||||
#if LINPHONE_FRIDAY
|
||||
if (QDate::currentDate().dayOfWeek() == 5)
|
||||
::setLinphoneFridayColors(*this);
|
||||
|
||||
#endif // if LINPHONE_FRIDAY
|
||||
}
|
||||
|
||||
void Colors::useConfig (const std::shared_ptr<linphone::Config> &config) {
|
||||
overrideColors(config);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue