Improve color-coding for user disambiguation
See also: https://github.com/quotient-im/libQuotient/wiki/User-color-coding-standard-draft-proposal
This commit is contained in:
committed by
Carl Schwan
parent
e838f7423d
commit
d6e1a6a45b
@@ -10,17 +10,30 @@
|
||||
#include "room.h"
|
||||
#include "user.h"
|
||||
|
||||
namespace Kirigami
|
||||
{
|
||||
class PlatformTheme;
|
||||
}
|
||||
|
||||
using namespace Quotient;
|
||||
|
||||
class NeoChatUser : public User
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QColor color READ color CONSTANT)
|
||||
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
|
||||
public:
|
||||
NeoChatUser(QString userId, Connection *connection)
|
||||
: User(userId, connection)
|
||||
{
|
||||
}
|
||||
NeoChatUser(QString userId, Connection *connection);
|
||||
|
||||
public Q_SLOTS:
|
||||
QColor color();
|
||||
void setColor(QColor color);
|
||||
|
||||
Q_SIGNALS:
|
||||
void colorChanged(QColor color);
|
||||
|
||||
private:
|
||||
Kirigami::PlatformTheme *m_theme = nullptr;
|
||||
QColor m_color;
|
||||
|
||||
void polishColor();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user