#include <X11/extensions/XInput2.h>
#include <X11/Xutil.h>
+static QString colorToString(QColor col)
+{
+ return QString("#%1%2%3").arg(col.red(), 2, 16, QChar('0'))
+ .arg(col.green(), 2, 16, QChar('0'))
+ .arg(col.blue(), 2, 16, QChar('0'));
+}
+
MultypoWindow::MultypoWindow(QWidget *parent) :
QWidget(parent),
xiInited(false)
{
/* Prepare colors */
- setStyleSheet("background-color: black; color: green");
+ setStyleSheet("background-color: black; color: green; font-size: 30pt");
/* Prepare conents */
setLayout(new QVBoxLayout(this));
layout()->addWidget(label);
players[device] = label;
}
- players[device]->setText(players[device]->text() + string);
+ QColor textColor = QColor(Qt::blue);
+ players[device]->setText(players[device]->text() + "<span style='color:"+colorToString(textColor)+"'>"+string+"</span>");
}
bool MultypoWindow::handleX11Event(XEvent *event)