header file that defines platform specific label, button, widget and dialog styles used in functions in the UI_Constructor class that assembles the UI and provides the proper "look and feel" for each desktop platform
More...
#include <QtCore/QOperatingSystemVersion>
#include <QtCore/QString>
#include <QtGlobal>
#include <QtGui/QGuiApplication>
#include <QHBoxLayout>
#include <QSlider>
#include <QLabel>
#include <QWidget>
Go to the source code of this file.
|
| namespace | Styles |
| | Defines platform-specific style constants for JS8Call's header bar controls.
|
|
| enum class | TxStatusAppearance { Receiving
, Transmitting
, Decoding
, IdleTimeout
} |
|
| QString | txStatusLabelStyle (TxStatusAppearance appearance) |
| | Returns the QSS stylesheet string for a given TX status state.
|
| QString | buttonStyle () |
| | Returns a platform-native QPushButton stylesheet.
|
header file that defines platform specific label, button, widget and dialog styles used in functions in the UI_Constructor class that assembles the UI and provides the proper "look and feel" for each desktop platform
styles.h was added on 11 Apr, 2026 and is intended to eventually become the default StyleSheet configuration for the JS8Call user interface.
◆ buttonStyle()
Returns a platform-native QPushButton stylesheet.
Generates a stylesheet that approximates the native button conventions of the specific platform, using system-appropriate fonts, geometry, and accent colors. Hover, pressed, and disabled pseudo-states are defined for all active variants.
- Returns
- A QSS QString suitable for use with
QWidget::setStyleSheet(), or an empty default Qt style on unsupported platforms.
- Note
- A Linux variant targeting Ubuntu/Noto Sans with a neutral grey palette (
#E0E0E0 background, #BDBDBD border) has been drafted but is currently commented out pending a styling decision.
-
On platforms other than Windows and macOS, Qt's built-in default button style is returned unchanged. This includes Linux until the pending variant is defined
- Todo
- Evaluate and enable the Linux stylesheet when platform styling is decided upon.
◆ txStatusLabelStyle()
| QString txStatusLabelStyle |
( |
TxStatusAppearance | appearance | ) |
|
|
inline |
Returns the QSS stylesheet string for a given TX status state.
- Parameters
-
| appearance | The desired TxStatusAppearance state. |
- Returns
- A QSS QString for the requested appearance, or an empty QString() for any unhandled
default case (compiler safety fallback).