JS8Call-Improved master
Loading...
Searching...
No Matches
Styles Namespace Reference

Platform-specific style constants for JS8Call's Header Bar and Control Bar. More...

Classes

class  OffsetSliderWidget
 A labeled "Offset:" slider used to select the RX/TX audio offset, in Hz, in the header bar (Linux/other). More...

Variables

constexpr const char * LogWidgetStyle
constexpr const char * DialFreqUpDownButtonStyle
 Style for the small frequency up/down step buttons (Linux/other).
constexpr const char * LabCallsignStyle
 Style for the callsign label in the header bar (Linux/other).
constexpr const char * LabUTCStyle
constexpr const char * MonitorTxButtonStyle
constexpr const char * ControlButtonStyle
constexpr const char * LogQSOButtonStyle
 Style for the "Log QSO" button (Linux/other).
constexpr const char * TuneButtonStyle
 Style for the "Tune" button: turns red while active (Linux/other).
constexpr const char * ModeButtonStyle
 Style for the mode-select button (Linux/other).

Detailed Description

Platform-specific style constants for JS8Call's Header Bar and Control Bar.

This namespace provides constant QSS strings and one helper widget that determine the appearance of the Header Bar and Control Bar. Exactly one of the three preprocessor branches below (macOS, Windows, or Linux/other) is compiled, always in that order, so each platform gets a matching, complete set of definitions:

Header Bar

  • LogWidgetStyle – background of the log/header frame.
  • DialFreqUpDownButtonStyle – small +/- frequency step buttons.
  • OffsetSliderWidget – labeled offset slider widget.
  • LabCallsignStyle – callsign label text.
  • LabUTCStyle – UTC clock label (LED-style readout).

Control Bar

  • MonitorTxButtonStyle – Monitor/Tx toggle button (green when monitoring, red while transmitting).
  • ControlButtonStyle – general on/off toggle buttons.
  • LogQSOButtonStyle – "Log QSO" button.
  • TuneButtonStyle – "Tune" button.
  • ModeButtonStyle – mode-select button.

Variable Documentation

◆ ControlButtonStyle

const char* Styles::ControlButtonStyle
constexpr
Initial value:
=
"QPushButton {"
" background-color: lightgray;"
" padding: 0.25em 0.25em; font-weight:normal;"
" border-style: solid;"
" border-width: 0px;"
" border-radius: 0px;"
"}"
"QPushButton:checked {"
" background-color: #22FF22;"
"}"
"QPushButton:hover {"
" color: red;"
"}"
"QPushButton:disabled {"
" background-color: rgba(230, 230, 230, 255);"
" color: rgba(0, 0, 0, 100);"
"}"
"QPushButton:disabled:checked {"
" background-color: #a0d8a0;"
" color: rgba(0, 0, 0, 100);"
"}"

General-purpose control bar toggle button style, with a disabled state (Linux/other).

◆ DialFreqUpDownButtonStyle

const char* Styles::DialFreqUpDownButtonStyle
constexpr
Initial value:
= "QPushButton {"
" background: transparent;"
" color: #000000;"
" font-size: 10pt;"
" padding: 0px;"
" border: none;"
" margin: 0px;"
" min-height: 14px;"
" max-height: 14px;"
" min-width: 10px;"
" max-width: 10px;"
"}"

Style for the small frequency up/down step buttons (Linux/other).

◆ LabCallsignStyle

const char* Styles::LabCallsignStyle
constexpr
Initial value:
= "QLabel {"
" font-size: 12pt;"
" line-height:12pt;"
" color : black;"
"}"

Style for the callsign label in the header bar (Linux/other).

◆ LabUTCStyle

const char* Styles::LabUTCStyle
constexpr
Initial value:
=
"QLabel {"
" border-radius: 0px;"
" font-size: 12pt;"
" line-height: 12pt;"
" font-family: \"DejaVu Sans Mono\", \"Liberation Mono\", \"Noto "
"Mono\", \"Ubuntu Mono\", monospace;"
" font-weight: bold;"
" background-color: black;"
" color: #39FF14;"
"}"

Style for the UTC clock label; rendered as a black LED-style readout (Linux/other).

◆ LogQSOButtonStyle

const char* Styles::LogQSOButtonStyle
constexpr
Initial value:
=
"QPushButton {"
" background-color: #3584E4;"
" padding: 0.25em 0.25em; font-weight:normal;"
" border-style: solid;"
" border-width: 0px;"
" border-radius: 0px;"
"}"
"QPushButton:hover {"
" color: white;"
"}"
"QPushButton:checked {"
" background-color: #3584E4;"
"}"

Style for the "Log QSO" button (Linux/other).

◆ LogWidgetStyle

const char* Styles::LogWidgetStyle
constexpr
Initial value:
=
"QFrame#logWidget, QFrame#macroHorizontalWidget, QFrame#controlHorizontalWidget { background-color: #F2F2F0; }"

Background style for the header bar, macro and control bars (Linux/other) This pins the background color so dark mode theming can't make buttons invisible

◆ ModeButtonStyle

const char* Styles::ModeButtonStyle
constexpr
Initial value:
=
"QPushButton {"
" padding: 0.25em 0.25em; font-weight:bold;"
" border-style: solid;"
" border-width: 0px;"
" border-radius: 0px;"
" background-color: #3584E4;"
"}"
"QPushButton:hover {"
" color: white;"
"}"
"QPushButton:checked {"
" background-color: #3584E4;"
"}"

Style for the mode-select button (Linux/other).

◆ MonitorTxButtonStyle

const char* Styles::MonitorTxButtonStyle
constexpr
Initial value:
=
"QPushButton {"
" background-color: lightgray;"
" padding: 0.25em 0.25em; font-weight:normal;"
" border-style: solid;"
" border-width: 0px;"
" border-radius: 0px;"
"}"
"QPushButton:checked {"
" background-color: #22FF22;"
"}"
"QPushButton[transmitting=\"true\"] {"
" background-color: #FF2222;"
"}"

Style for the Tx toggle button: green when monitoring, red while transmitting (Linux/other).

◆ TuneButtonStyle

const char* Styles::TuneButtonStyle
constexpr
Initial value:
=
"QPushButton {"
" background-color: lightgray;"
" color: black;"
" padding: 0.25em 0.25em; font-weight:normal;"
" border-style: solid;"
" border-width: 0px;"
" border-radius: 0px;"
"}"
"QPushButton:hover {"
"background-color: #ffcc00;"
" color: black;"
"}"
"QPushButton:checked {"
" background-color: #FF2222;"
" color: black;"
"}"

Style for the "Tune" button: turns red while active (Linux/other).