JS8Call-Improved master
Loading...
Searching...
No Matches
styles.h
Go to the documentation of this file.
1
10
11#pragma once
12#include <QtCore/QOperatingSystemVersion>
13#include <QtCore/QString>
14#include <QtGlobal>
15#include <QtGui/QGuiApplication>
16#include <QHBoxLayout>
17#include <QSlider>
18#include <QLabel>
19#include <QWidget>
20
51static inline QString statusLabelStyle(const QString &bg = "#6699ff",
52 const QString &fg = "#000000") {
53#if defined(Q_OS_MACOS)
54 return QStringLiteral("QLabel{background-color: %1; color: %2; "
55 "border-radius: 6px; padding: 2px 8px; "
56 "border: 1px solid rgba(0,0,0,0.15)}")
57 .arg(bg, fg);
58#elif defined(Q_OS_WIN)
59 return QStringLiteral("QLabel{background-color:%1; color:%2; "
60 "border-radius:4px; padding:0px 8px; "
61 "border:1px solid rgba(0,0,0,0.25)}")
62 .arg(bg, fg);
63#else // Linux/other
64 return QStringLiteral("QLabel{background-color:%1; color:%2; "
65 "border-radius:1px; padding:1px 6px; "
66 "border:1px inset rgba(0,0,0,0.18)}")
67 .arg(bg, fg);
68#endif
69}
70
71enum class TxStatusAppearance {
72 Receiving, // green on black text
73 Transmitting, // red
74 Decoding, // same as Receiving
75 IdleTimeout // black bg, white fg
76};
77
78QString txStatusLabelStyle(TxStatusAppearance appearance);
79
80static inline QString makeStyle(const QString &bg, const QString &fg) {
81#if defined(Q_OS_LINUX)
82 return QString("QLabel{background-color:%1; color:%2; "
83 "border-radius:1px; padding:1px 6px; "
84 "border:1px inset rgba(0,0,0,0.18);}")
85 .arg(bg, fg);
86#elif defined(Q_OS_WIN)
87 return QString("QLabel{background-color:%1; color:%2; "
88 "border-radius:4px; padding:0px 8px; "
89 "border:1px solid rgba(0,0,0,0.25);}")
90 .arg(bg, fg);
91#elif defined(Q_OS_MACOS)
92 return QString("QLabel{background-color:%1; color:%2; "
93 "border-radius:6px; padding:2px 8px; "
94 "border:1px solid rgba(0,0,0,0.15);}")
95 .arg(bg, fg);
96#else
97 return QString("QLabel{background-color:%1; color:%2;}").arg(bg, fg);
98#endif
99}
100
101inline QString txStatusLabelStyle(TxStatusAppearance appearance) {
102 switch (appearance) {
103 case TxStatusAppearance::Receiving:
104 return makeStyle("#22ff22", "#000000");
105 case TxStatusAppearance::Transmitting:
106 return makeStyle("#ff2222", "#000000");
107 case TxStatusAppearance::Decoding:
108 return makeStyle("#22ff22", "#000000");
109 case TxStatusAppearance::IdleTimeout:
110 return makeStyle("#000000", "#ffffff");
111 default:
112 return QString(); // no style for compiler fallback
113 }
114}
115
132static inline QString progress_bar_stylesheet(bool small = false) {
133 const QString base = QString("QProgressBar {"
134 " border: 0px;"
135 " background-color: #ffffff;"
136 " color: #000000;"
137 " text-align: center;"
138 " padding: 0px;"
139 " %1"
140 "}"
141 "QProgressBar::chunk {"
142 " background-color: #a5cdff;"
143 " border-radius: %2px;"
144 " %3"
145 "}");
146
147 const int height = small ? 10 : 14; // overall control height
148 const int radius = small ? 3 : 5; // roundness of the bar ends
149 const QString barDim =
150 QString("min-height:%1px; max-height:%1px; border-radius:%2px;")
151 .arg(height)
152 .arg(radius);
153 const QString chunkDim = QString("min-height:%1px;").arg(height);
154 return base.arg(barDim, QString::number(radius), chunkDim);
155}
156
168inline QString buttonStyle() {
169#if defined(Q_OS_WIN)
170 return R"(
171 QPushButton, QToolButton {
172 background-color: #6699ff;
173 color: black;
174 border: none;
175 border-radius: 4px;
176 padding: 3px 9px;
177 min-height: 15px;
178 max-height: 15px;
179 font-family: "Segoe UI";
180 }
181 QPushButton:hover, QToolButton:hover {
182 background-color: #4d7fff;
183 color: white;
184 }
185 QPushButton:pressed, QToolButton:pressed {
186 background-color: #003EAA;
187 }
188 QPushButton:disabled, QToolButton:disabled {
189 background-color: #ececec;
190 color: #888888;
191 }
192 QToolButton#replyPushButton::menu-button {
193 width: 12px;
194 }
195 QToolButton#replyPushButton[popupMode="MenuButtonPopup"] {
196 padding-right: 21px;
197 }
198 QToolButton#replyPushButton[popupMode="MenuButtonPopup"][layoutDirection="RightToLeft"] {
199 padding-right: 9px;
200 padding-left: 21px;
201 }
202 )";
203
204#elif defined(Q_OS_MACOS)
205 return R"(
206 QPushButton, QToolButton {
207 background-color: #6699ff;
208 color: black;
209 border: none;
210 border-radius: 6px;
211 padding: 3px 9px;
212 min-height: 15px;
213 max-height: 15px;
214 font-family: "-apple-system";
215 }
216 QPushButton:hover, QToolButton:hover {
217 background-color: #4d7fff;
218 color: white;
219 }
220 QPushButton:pressed, QToolButton:pressed {
221 background-color: #003EAA;
222 }
223 QPushButton:disabled, QToolButton:disabled {
224 background-color: #ececec;
225 color: #888888;
226 }
227 QToolButton#replyPushButton::menu-button {
228 width: 12px;
229 }
230 QToolButton#replyPushButton[popupMode="MenuButtonPopup"] {
231 padding-right: 21px;
232 }
233 QToolButton#replyPushButton[popupMode="MenuButtonPopup"][layoutDirection="RightToLeft"] {
234 padding-right: 9px;
235 padding-left: 21px;
236 }
237 )";
238
239#elif defined(Q_OS_LINUX)
240 return R"(
241 QPushButton, QToolButton {
242 background-color: #6699ff;
243 color: black;
244 border: none;
245 border-radius: 5px;
246 padding: 3px 9px;
247 font-family: "Ubuntu", "Noto Sans";
248 }
249 QPushButton:hover, QToolButton:hover {
250 background-color: #4d7fff;
251 }
252 QPushButton:pressed, QToolButton:pressed {
253 background-color: #003EAA;
254 }
255 QPushButton:disabled, QToolButton:disabled {
256 background-color: #ececec;
257 color: #888888;
258 }
259 QToolButton#replyPushButton::menu-button {
260 width: 12px;
261 }
262 QToolButton#replyPushButton[popupMode="MenuButtonPopup"] {
263 padding-right: 21px;
264 }
265 QToolButton#replyPushButton[popupMode="MenuButtonPopup"][layoutDirection="RightToLeft"] {
266 padding-right: 9px;
267 padding-left: 21px;
268 }
269 )";
270
271#else
272 return QString();
273#endif
274}
275
276// defines the background, color, font and size of the header bar frequency
277// display, the #else section contains the definitions for linux
278static inline QString logFrameStyle() {
279#if defined(Q_OS_MACOS)
280 return QStringLiteral("QFrame#frame { background-color: #F2F2F0; }"
281 "QLabel#currentFreq {"
282 " color: #39FF14;"
283 " background-color: black;"
284 " border-radius:6px; padding:0px 8px; "
285 " font-family: Monaco, 'Courier New', monospace;"
286 " font-size: 20pt;"
287 " font-weight: bold;"
288 " min-width: 200px;"
289 " min-height: 40px;"
290 "}");
291#elif defined(Q_OS_WIN)
292 return QStringLiteral("QFrame#frame { background-color: #DDEEFF; }"
293 "QLabel#currentFreq {"
294 " color: #39FF14;"
295 " background-color: black;"
296 " border-radius:4px; padding:0px 8px; "
297 " font-family: Consolas, 'Courier New', monospace;"
298 " font-size: 20pt;"
299 " font-weight: bold;"
300 " min-width: 200px;"
301 " min-height: 40px;"
302 "}");
303#else
304 return QStringLiteral("QFrame#frame { background-color: #F2F2F0; }"
305 "QLabel#currentFreq {"
306 " color: #39FF14;"
307 " background-color: black;"
308 " border-radius:0px; padding:0px 8px; "
309 " font-size: 28pt;"
310 " font-weight: bold;"
311 " min-width: 200px;"
312 " min-height: 40px;"
313 "}");
314#endif
315}
316
334#if defined(Q_OS_MACOS)
335namespace Styles {
336
337constexpr const char *LogWidgetStyle =
338 "QFrame#logWidget { background-color: #F2F2F0; }";
339
340constexpr const char *DialFreqUpDownButtonStyle =
341 "QPushButton {"
342 " background-color: #000000;"
343 " color: #39FF14;"
344 " font-size: 10pt;"
345 " border:0px solid;"
346 " border-radius:2px;"
347 "}"
348 "QPushButton:pressed {"
349 " background-color: #222;"
350 "}";
351
352class OffsetSliderWidget : public QWidget {
353 public:
354 explicit OffsetSliderWidget(QWidget *parent = nullptr) : QWidget(parent) {
355 auto *layout = new QHBoxLayout(this);
356 auto *caption = new QLabel("Offset:", this);
357 caption->setStyleSheet("QLabel { color: black; }");
358 slider = new QSlider(Qt::Horizontal, this);
359 // Lock the QSlider's appearance regardless of the system theme
360 slider->setStyleSheet(R"(
361 QSlider {
362 background: transparent;
363 min-height: 24px;
364 }
365 QSlider::groove:horizontal {
366 border: 1px solid #b0b0b0;
367 height: 6px;
368 background: #a5cdff;
369 border-radius: 3px;
370 }
371 QSlider::handle:horizontal {
372 background: #6699ff;
373 border: 1px solid #c2c8d1;
374 width: 16px;
375 margin: -3px 0;
376 border-radius: 6px;
377 }
378 QSlider::sub-page:horizontal {
379 background: #a5cdff;
380 border-radius: 3px;
381 }
382 QSlider::add-page:horizontal {
383 background: #e0e0e0;
384 border-radius: 3px;
385 }
386 )");
387 slider->setRange(0, 3000);
388 slider->setValue(1500);
389 valueLabel = new QLabel("0 Hz", this);
390 valueLabel->setStyleSheet("QLabel { color: black; }");
391 valueLabel->setMinimumWidth(60);
392 layout->addWidget(caption);
393 layout->addWidget(slider, 1);
394 layout->addWidget(valueLabel);
395 connect(slider, &QSlider::valueChanged, this, [this](int val) {
396 valueLabel->setText(QString("%1 Hz").arg(val));
397 if (onValueChanged) onValueChanged(val);
398 });
399 }
400
401 int offset() const { return slider->value(); }
402 void setValue(int hz) { slider->setValue(hz); }
403 void setOnValueChanged(std::function<void(int)> cb) { onValueChanged = cb; }
404
405 private:
406 QSlider *slider;
407 QLabel *valueLabel;
408 std::function<void(int)> onValueChanged;
409};
410
411constexpr const char *LabCallsignStyle = "QLabel {"
412 " font-size: 12pt;"
413 " line-height:12pt;"
414 " color : black;"
415 "}";
416
417constexpr const char *LabUTCStyle =
418 "QLabel {"
419 " border-radius:6px;"
420 " font-size: 14pt;"
421 " line-height:14pt;"
422 " font-family: Monaco, 'Courier New', monospace;"
423 " font-weight: bold;"
424 " background-color: black;"
425 " color : #39FF14;"
426 "}";
427
428constexpr const char *ButtonGridStyle =
429 "QPushButton {"
430 " background-color:lightgray;"
431 " padding:0.25em 0.25em; font-weight:normal;"
432 " border-style:solid;"
433 " border-width:0px;"
434 " border-radius:6px;"
435 "}"
436 "QPushButton:checked {"
437 " background-color:#6699ff;"
438 "}";
439
440constexpr const char *MonitorTxButtonStyle =
441 "QPushButton {"
442 " background-color:lightgray;"
443 " color:black;"
444 " padding:0.25em 0.25em; font-weight:normal;"
445 " border-style:solid;"
446 " border-width:0px;"
447 " border-radius:6px;"
448 "}"
449 "QPushButton:checked {"
450 " background-color:#22FF22;"
451 " color:black;"
452 "}"
453 "QPushButton[transmitting=\"true\"] {"
454 " background-color:#FF2222;"
455 " color:black;"
456 "}";
457
458constexpr const char *MonitorButtonStyle =
459 "QPushButton {"
460 " background-color:lightgray;"
461 " color:black;"
462 " padding:0.25em 0.25em; font-weight:normal;"
463 " border-style:solid;"
464 " border-width:0px;"
465 " border-radius:6px;"
466 "}"
467 "QPushButton:checked {"
468 " background-color:#22FF22;"
469 " color:black;"
470 "}";
471
472constexpr const char *LogQSOButtonStyle =
473 "QPushButton {"
474 " background-color:#6699ff;"
475 " color:black;"
476 " padding:0.25em 0.25em; font-weight:normal;"
477 " border-style:solid;"
478 " border-width:0px;"
479 " border-radius:6px;"
480 "}"
481 "QPushButton:checked {"
482 " background-color:#6699ff;"
483 " color:black;"
484 "}";
485
486constexpr const char *TuneButtonStyle =
487 "QPushButton {"
488 " background-color:lightgray;"
489 " color:black;"
490 " padding:0.25em 0.25em; font-weight:normal;"
491 " border-style:solid;"
492 " border-width:0px;"
493 " border-radius:6px;"
494 "}"
495 "QPushButton:checked {"
496 " background-color:#6699ff;"
497 " color:black;"
498 "}";
499
500constexpr const char *ModeButtonStyle =
501 "QPushButton {"
502 " padding:0.25em 0.25em; font-weight:bold;"
503 " border-style:solid;"
504 " border-width:0px;"
505 " border-radius:6px;"
506 " background-color:#6699ff;"
507 " color:black;"
508 "}"
509 "QPushButton:checked {"
510 " background-color:#6699ff;"
511 " color:black;"
512 "}";
513
514constexpr const char *SpotButtonStyle =
515 "QPushButton {"
516 " background-color:lightgray;"
517 " color:black;"
518 " padding:0.25em 0.25em; font-weight:normal;"
519 " border-style:solid;"
520 " border-width:0px;"
521 " border-radius:6px;"
522 "}"
523 "QPushButton:checked {"
524 " background-color:#6699ff;"
525 " color:black;"
526 "}";
527
528}
529#elif defined(Q_OS_WIN)
530namespace Styles {
531
532constexpr const char *LogWidgetStyle =
533 "QFrame#logWidget { background-color: #DDEEFF; }";
534
535constexpr const char *DialFreqUpDownButtonStyle =
536 "QPushButton {"
537 " background-color: #000000;"
538 " color: #39FF14;"
539 " font-size: 12pt;"
540 " border:0px solid;"
541 " border-radius:2px;"
542 "}"
543 "QPushButton:pressed {"
544 " background-color: #222;"
545 "}";
546
547class OffsetSliderWidget : public QWidget {
548 public:
549 explicit OffsetSliderWidget(QWidget *parent = nullptr) : QWidget(parent) {
550 auto *layout = new QHBoxLayout(this);
551 auto *caption = new QLabel("Offset:", this);
552 caption->setStyleSheet("QLabel { color: black; }");
553 slider = new QSlider(Qt::Horizontal, this);
554 // Lock the QSlider's appearance regardless of the system theme
555 slider->setStyleSheet(R"(
556 QSlider {
557 background: transparent;
558 min-height: 24px;
559 }
560 QSlider::groove:horizontal {
561 border: 1px solid #b0b0b0;
562 height: 6px;
563 background: #a5cdff;
564 border-radius: 3px;
565 }
566 QSlider::handle:horizontal {
567 background: #6699ff;
568 border: 1px solid #c2c8d1;
569 width: 16px;
570 margin: -3px 0;
571 border-radius: 5px;
572 }
573 QSlider::sub-page:horizontal {
574 background: #a5cdff;
575 border-radius: 3px;
576 }
577 QSlider::add-page:horizontal {
578 background: #e0e0e0;
579 border-radius: 3px;
580 }
581 )");
582 slider->setRange(0, 3000);
583 slider->setValue(1500);
584 valueLabel = new QLabel("0 Hz", this);
585 valueLabel->setStyleSheet("QLabel { color: black; }");
586 valueLabel->setMinimumWidth(60);
587 layout->addWidget(caption);
588 layout->addWidget(slider, 1);
589 layout->addWidget(valueLabel);
590 connect(slider, &QSlider::valueChanged, this, [this](int val) {
591 valueLabel->setText(QString("%1 Hz").arg(val));
592 if (onValueChanged) onValueChanged(val);
593 });
594 }
595
596 int offset() const { return slider->value(); }
597 void setValue(int hz) { slider->setValue(hz); }
598 void setOnValueChanged(std::function<void(int)> cb) { onValueChanged = cb; }
599
600 private:
601 QSlider *slider;
602 QLabel *valueLabel;
603 std::function<void(int)> onValueChanged;
604};
605
606constexpr const char *LabCallsignStyle = "QLabel {"
607 " font-size: 12pt;"
608 " line-height:12pt;"
609 " color : black;"
610 "}";
611
612constexpr const char *LabUTCStyle =
613 "QLabel {"
614 " border-radius:4px;"
615 " font-size: 14pt;"
616 " line-height:14pt;"
617 " font-family: Consolas, 'Courier New', monospace;"
618 " font-weight: bold;"
619 " background-color: black;"
620 " color : #39FF14;"
621 "}";
622
623constexpr const char *ButtonGridStyle =
624 "QPushButton {"
625 " background-color:lightgray;"
626 " padding:0.25em 0.25em; font-weight:normal;"
627 " border-style:solid;"
628 " border-width:0px;"
629 " border-radius:4px;"
630 "}"
631 "QPushButton:checked {"
632 " background-color:#6699ff;"
633 "}";
634
635constexpr const char *MonitorTxButtonStyle =
636 "QPushButton {"
637 " background-color:lightgray;"
638 " color:black;"
639 " padding:0.25em 0.25em; font-weight:normal;"
640 " border-style:solid;"
641 " border-width:0px;"
642 " border-radius:4px;"
643 "}"
644 "QPushButton:checked {"
645 " background-color:#22FF22;"
646 " color:black;"
647 "}"
648 "QPushButton[transmitting=\"true\"] {"
649 " background-color:#FF2222;"
650 " color:black;"
651 "}";
652
653constexpr const char *MonitorButtonStyle =
654 "QPushButton {"
655 " background-color:lightgray;"
656 " color:black;"
657 " padding:0.25em 0.25em; font-weight:normal;"
658 " border-style:solid;"
659 " border-width:0px;"
660 " border-radius:4px;"
661 "}"
662 "QPushButton:checked {"
663 " background-color:#22FF22;"
664 " color:black;"
665 "}";
666
667constexpr const char *LogQSOButtonStyle =
668 "QPushButton {"
669 " background-color:lightgray;"
670 " color:black;"
671 " padding:0.25em 0.25em; font-weight:normal;"
672 " border-style:solid;"
673 " border-width:0px;"
674 " border-radius:4px;"
675 "}"
676 "QPushButton:checked {"
677 " background-color:#6699ff;"
678 " color:black;"
679 "}";
680
681constexpr const char *TuneButtonStyle = LogQSOButtonStyle; // Same as above
682
683constexpr const char *ModeButtonStyle =
684 "QPushButton {"
685 " padding:0.25em 0.25em; font-weight:bold;"
686 " border-style:solid;"
687 " border-width:0px;"
688 " border-radius:4px;"
689 " background-color:#6699ff;"
690 " color:black;"
691 "}"
692 "QPushButton:checked {"
693 " background-color:#6699ff;"
694 " color:black;"
695 "}";
696
697constexpr const char *SpotButtonStyle =
698 "QPushButton {"
699 " background-color:lightgray;"
700 " color:black;"
701 " padding:0.25em 0.25em; font-weight:normal;"
702 " border-style:solid;"
703 " border-width:0px;"
704 " border-radius:4px;"
705 "}"
706 "QPushButton:checked {"
707 " background-color:#6699ff;"
708 " color:black;"
709 "}";
710
711}
712#else
713namespace Styles {
714
715// background color of the header bar - must be the same as the frequency display above
716constexpr const char *LogWidgetStyle =
717 "QFrame#logWidget { background-color: #F2F2F0; }";
718
719// definition of the frequency displqy for the up/down buttons
720constexpr const char *DialFreqUpDownButtonStyle =
721 "QPushButton {"
722 " background-color: #000000;"
723 " color: #39FF14;"
724 " font-size: 12pt;"
725 " border:1px solid;"
726 " border-radius:0px;"
727 "}"
728 "QPushButton:pressed {"
729 " background-color: #222;"
730 "}";
731
732class OffsetSliderWidget : public QWidget {
733 public:
734 explicit OffsetSliderWidget(QWidget *parent = nullptr) : QWidget(parent) {
735 auto *layout = new QHBoxLayout(this);
736 auto *caption = new QLabel("Offset:", this);
737 caption->setStyleSheet("QLabel { color: black; }");
738 slider = new QSlider(Qt::Horizontal, this);
739 // Lock the QSlider's appearance regardless of the system theme
740 slider->setStyleSheet(R"(
741 QSlider {
742 background: transparent;
743 min-height: 24px;
744 }
745 QSlider::groove:horizontal {
746 border: 1px solid #b0b0b0;
747 height: 6px;
748 background: #a5cdff;
749 border-radius: 3px;
750 }
751 QSlider::handle:horizontal {
752 background: #6699ff;
753 border: 1px solid #c2c8d1;
754 width: 16px;
755 margin: -3px 0;
756 border-radius: 5px;
757 }
758 QSlider::sub-page:horizontal {
759 background: #a5cdff;
760 border-radius: 3px;
761 }
762 QSlider::add-page:horizontal {
763 background: #e0e0e0;
764 border-radius: 3px;
765 }
766 )");
767 slider->setRange(0, 3000);
768 slider->setValue(1500);
769 valueLabel = new QLabel("0 Hz", this);
770 valueLabel->setStyleSheet("QLabel { color: black; }");
771 valueLabel->setMinimumWidth(60);
772 layout->addWidget(caption);
773 layout->addWidget(slider, 1);
774 layout->addWidget(valueLabel);
775 connect(slider, &QSlider::valueChanged, this, [this](int val) {
776 valueLabel->setText(QString("%1 Hz").arg(val));
777 if (onValueChanged) onValueChanged(val);
778 });
779 }
780
781 int offset() const { return slider->value(); }
782 void setValue(int hz) { slider->setValue(hz); }
783 void setOnValueChanged(std::function<void(int)> cb) { onValueChanged = cb; }
784
785 private:
786 QSlider *slider;
787 QLabel *valueLabel;
788 std::function<void(int)> onValueChanged;
789};
790
791// definition of the display of the callsign label
792constexpr const char *LabCallsignStyle = "QLabel {"
793 " font-size: 14pt;"
794 " line-height:12pt;"
795 " color : black;"
796 "}";
797
798// definition of the display of the of the date/time label
799constexpr const char *LabUTCStyle =
800 "QLabel {"
801 " border-radius:0px;"
802 " font-size: 18pt;"
803 " line-height:18pt;"
804 " font-family: \"DejaVu Sans Mono\", \"Liberation Mono\", \"Noto Mono\", \"Ubuntu Mono\", monospace;"
805 " font-weight: bold;"
806 " background-color: black;"
807 " color : #39FF14;"
808 "}";
809
810// defintion of the display of the button grid
811constexpr const char *ButtonGridStyle =
812 "QPushButton {"
813 " background-color:lightgray;"
814 " padding:0.25em 0.25em; font-weight:normal;"
815 " border-style:solid;"
816 " border-width:0px;"
817 " border-radius:0px;"
818 "}"
819 "QPushButton:checked {"
820 " background-color:#6699ff;"
821 "}";
822
823// defintion of the display of the Tx button
824constexpr const char *MonitorTxButtonStyle =
825 "QPushButton {"
826 " background-color:lightgray;"
827 " padding:0.25em 0.25em; font-weight:normal;"
828 " border-style:solid;"
829 " border-width:0px;"
830 " border-radius:0px;"
831 "}"
832 "QPushButton:checked {"
833 " background-color:#22FF22;"
834 "}"
835 "QPushButton[transmitting=\"true\"] {"
836 " background-color:#FF2222;"
837 "}";
838
839// definition of the display of the Rx button
840constexpr const char *MonitorButtonStyle =
841 "QPushButton {"
842 " background-color:lightgray;"
843 " padding:0.25em 0.25em; font-weight:normal;"
844 " border-style:solid;"
845 " border-width:0px;"
846 " border-radius:0px;"
847 "}"
848 "QPushButton:checked {"
849 " background-color:#22FF22;"
850 "}";
851
852// defintion of the display of the Log and Tune buttons
853constexpr const char *LogQSOButtonStyle =
854 "QPushButton {"
855 " background-color:lightgray;"
856 " padding:0.25em 0.25em; font-weight:normal;"
857 " border-style:solid;"
858 " border-width:0px;"
859 " border-radius:0px;"
860 "}"
861 "QPushButton:checked {"
862 " background-color:#6699ff;"
863 "}";
864
865constexpr const char *TuneButtonStyle = LogQSOButtonStyle; // Same as above
866
867// definition of the display of the Mode button
868constexpr const char *ModeButtonStyle =
869 "QPushButton {"
870 " padding:0.25em 0.25em; font-weight:bold;"
871 " border-style:solid;"
872 " border-width:0px;"
873 " border-radius:0px;"
874 " background-color:#6699ff;"
875 "}"
876 "QPushButton:checked {"
877 " background-color:#6699ff;"
878 "}";
879
880// defintion of the display of the Spot button
881constexpr const char *SpotButtonStyle =
882 "QPushButton {"
883 " background-color:lightgray;"
884 " padding:0.25em 0.25em; font-weight:normal;"
885 " border-style:solid;"
886 " border-width:0px;"
887 " border-radius:0px;"
888 "}"
889 "QPushButton:checked {"
890 " background-color:#6699ff;"
891 "}";
892
893}
894#endif
Definition styles.h:732
Defines platform-specific style constants for JS8Call's header bar controls.
QString buttonStyle()
Returns a platform-native QPushButton/QToolButton stylesheet.
Definition styles.h:168
QString txStatusLabelStyle(TxStatusAppearance appearance)
Returns the QSS stylesheet string for a given TX status state.
Definition styles.h:101