23 int default_text_size()
27 int default_label_height()
36 , m_font(
"Monospace", default_text_size(), QFont::Normal, false)
38 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
39 setFixedHeight(default_label_height());
56 m_font.setPointSize(pointSize);
68 QWidget::paintEvent(event);
70 QPainter painter(
this);
71 painter.setBrush(QColor(Qt::black));
72 painter.setPen(QColor(Qt::black));
75 QRect textRect(0, 0, geometry().width(), geometry().height());
76 painter.fillRect(textRect, QColor(Qt::white));
Defines class StatusLabel.
Defines GUI::StyleUtils namespace.
void setText(const QString &text)
void paintEvent(QPaintEvent *event) override
void setPointSize(int pointSize)
void setFont(const QFont &font)
void setAlignment(Qt::Alignment)
StatusLabel(QWidget *parent=nullptr)
Qt::Alignment m_alignment
int SystemPointSize()
Returns size in points of default system font.
QSize SizeOfLetterM(const QWidget *widget=nullptr)
Returns size of largest letter of default system font.