MCPcopy Create free account
hub / github.com/YACReader/yacreader / updateIndexLabelStyle

Method updateIndexLabelStyle

common/rhi/yacreader_flow_rhi.cpp:1498–1525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1496}
1497
1498void YACReaderFlow3D::updateIndexLabelStyle()
1499{
1500 int w = width();
1501 int h = height();
1502
1503 int newFontSize = static_cast<int>((w + h) * 0.010);
1504 if (newFontSize < 10)
1505 newFontSize = 10;
1506
1507 QFont font("Arial", newFontSize);
1508 indexLabel->setFont(font);
1509
1510 auto styleSheet = QString("QLabel { color: %1; }").arg(textColor.name());
1511 indexLabel->setStyleSheet(styleSheet);
1512
1513 indexLabel->move(10, 10);
1514 indexLabel->adjustSize();
1515
1516 // Position and style performance label below index label
1517#if defined(YACREADER_RHI_PERF)
1518 if (perfLabel) {
1519 perfLabel->setFont(font);
1520 perfLabel->setStyleSheet(styleSheet);
1521 perfLabel->move(10, 10 + indexLabel->height() + 4);
1522 perfLabel->adjustSize();
1523 }
1524#endif
1525}
1526
1527QSize YACReaderFlow3D::minimumSizeHint() const
1528{

Callers

nothing calls this directly

Calls 2

QStringClass · 0.50
nameMethod · 0.45

Tested by

no test coverage detected