blob: a8981ff2f05ab239d396f1c9c095aa4fd6c750b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "texteditorstatusbar.h"
#include <utils/theme/theme.h>
namespace QmlDesigner {
TextEditorStatusBar::TextEditorStatusBar(QWidget *parent) : QToolBar(parent), m_label(new QLabel(this))
{
QWidget *spacer = new QWidget(this);
spacer->setMinimumWidth(50);
addWidget(spacer);
addWidget(m_label);
/* We have to set another .css, since the central widget has already a style sheet */
m_label->setStyleSheet(QString("QLabel { color :%1 }").arg(Utils::creatorTheme()->color(Utils::Theme::TextColorError).name()));
}
void TextEditorStatusBar::clearText()
{
m_label->clear();
}
void TextEditorStatusBar::setText(const QString &text)
{
m_label->setText(text);
}
} // namespace QmlDesigner
|