Skip to content
Snippets Groups Projects
Commit e5e34859 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Make StatusLabel beneath intensity map high DPI aware.

parent 4f3bcef3
No related branches found
No related tags found
No related merge requests found
......@@ -16,18 +16,24 @@
#include <QColor>
#include <QFont>
#include <QPainter>
#include "StyleUtils.h"
namespace
{
const int default_label_height = 20;
const int default_text_size = 11;
int default_text_size() {
return StyleUtils::SystemPointSize();
}
int default_label_height()
{
return StyleUtils::SizeOfLetterM().height()*1.75;
}
} // namespace
StatusLabel::StatusLabel(QWidget* parent)
: QFrame(parent), m_font("Monospace", default_text_size, QFont::Normal, false)
: QFrame(parent), m_font("Monospace", default_text_size(), QFont::Normal, false)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
setFixedHeight(default_label_height);
setFixedHeight(default_label_height());
}
void StatusLabel::setText(const QString& text)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment