Sorry this is a huge commit, this actually includes a ton of stuff. Text color is now readable, multiple accounts are supported alongside end-to-end encryption but no cross-signing yet :-) There's also a whole lot of other small changes, such as choosing the server you want to request a room directory from.
28 lines
580 B
C++
Executable file
28 lines
580 B
C++
Executable file
#pragma once
|
|
|
|
#include <QSystemTrayIcon>
|
|
#include <QApplication>
|
|
|
|
class Desktop : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Q_INVOKABLE void showTrayIcon(const bool shouldHide) {
|
|
QApplication::setQuitOnLastWindowClosed(shouldHide);
|
|
|
|
if(shouldHide)
|
|
icon->show();
|
|
else
|
|
icon->hide();
|
|
}
|
|
|
|
Q_INVOKABLE void showMessage(const QString title, const QString content) {
|
|
icon->showMessage(title, content);
|
|
}
|
|
|
|
Q_INVOKABLE bool isTrayIconEnabled() {
|
|
return icon->isVisible();;
|
|
}
|
|
|
|
QSystemTrayIcon* icon;
|
|
};
|