"|─── text ───|" group label: horizontal line, centred text, horizontal line.
| 50 | |
| 51 | // "|─── text ───|" group label: horizontal line, centred text, horizontal line. |
| 52 | QWidget* makeBracketLabel(const QString& text) |
| 53 | { |
| 54 | auto* w = new QWidget; |
| 55 | auto* h = new QHBoxLayout(w); |
| 56 | h->setContentsMargins(0, 0, 0, 0); |
| 57 | h->setSpacing(4); |
| 58 | |
| 59 | auto* leftLine = new QFrame; |
| 60 | leftLine->setFrameShape(QFrame::HLine); |
| 61 | leftLine->setFrameShadow(QFrame::Plain); |
| 62 | leftLine->setStyleSheet("QFrame { color: #4a5a6a; }"); |
| 63 | |
| 64 | auto* lbl = new QLabel(text); |
| 65 | AetherSDR::ThemeManager::instance().applyStyleSheet(lbl, "QLabel { color: {{color.text.primary}}; font-weight: bold; " |
| 66 | "font-size: 10px; }"); |
| 67 | lbl->setAlignment(Qt::AlignCenter); |
| 68 | |
| 69 | auto* rightLine = new QFrame; |
| 70 | rightLine->setFrameShape(QFrame::HLine); |
| 71 | rightLine->setFrameShadow(QFrame::Plain); |
| 72 | rightLine->setStyleSheet("QFrame { color: #4a5a6a; }"); |
| 73 | |
| 74 | h->addWidget(leftLine, 1); |
| 75 | h->addWidget(lbl); |
| 76 | h->addWidget(rightLine, 1); |
| 77 | return w; |
| 78 | } |
| 79 | |
| 80 | } // namespace |
| 81 |
no test coverage detected