MCPcopy Create free account
hub / github.com/MaartenBaert/ssr / ScreenLabelWindow

Method ScreenLabelWindow

src/GUI/PageInput.cpp:171–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169#endif
170
171ScreenLabelWindow::ScreenLabelWindow(QWidget* parent, const QString &text)
172 : QWidget(parent, TRANSPARENT_WINDOW_FLAGS) {
173 TRANSPARENT_WINDOW_ATTRIBUTES();
174 m_text = text;
175 m_font = QFont("Sans", 18, QFont::Bold);
176 QFontMetrics fm(m_font);
177 setFixedSize(fm.size(Qt::TextSingleLine, m_text) + QSize(60, 40));
178 setWindowOpacity(0.75);
179}
180
181void ScreenLabelWindow::paintEvent(QPaintEvent* event) {
182 Q_UNUSED(event);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected