Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
ThemeDraft Struct Reference

#include <theme_manager.h>

Public Member Functions

ThemeManager::ThemeToken firstMissingRequired () const
bool hasRequiredColors () const
bool declaresWindow () const
bool sameColors (const ThemeDraft &other) const
int removeInvalidEntries ()
bool operator== (const ThemeDraft &other) const
bool operator!= (const ThemeDraft &other) const

Static Public Member Functions

static const QList< ThemeManager::ThemeToken > & requiredTokens ()

Public Attributes

ThemeInfo info
 Meta data and origin.
QHash< ThemeManager::ThemeToken, ThemeColorPair > colors
 JSONC color inputs.
QList< ThemeColorPair > graphColors
 Graph colors in order.
ThemeFontHint regularFont
 Regular font the theme asks for.
ThemeFontHint monospaceFont
 Monospace font the theme asks for.

Detailed Description

An editable copy of a theme file. Holds the inputs a theme file can carry, not derived tokens.

Member Function Documentation

◆ declaresWindow()

bool ThemeDraft::declaresWindow ( ) const

True when the theme itself sets palette.window, the test that decides whether title bars (NativeTitleBar) and theme previews take the window color.

◆ firstMissingRequired()

ThemeManager::ThemeToken ThemeDraft::firstMissingRequired ( ) const

First required token that is missing or not a valid color; NoRole when none.

◆ hasRequiredColors()

bool ThemeDraft::hasRequiredColors ( ) const

True when every requiredTokens() color is present and valid.

◆ operator==()

bool ThemeDraft::operator== ( const ThemeDraft & other) const

Compares meta name, author and description, the color set (keys and RGBA per side), the graph list and the font hints. Origin (builtIn, filePath, internalName) is ignored.

◆ removeInvalidEntries()

int ThemeDraft::removeInvalidEntries ( )

Removes color entries and graph slots whose light or dark side is not a valid color.

Returns
number of entries and slots removed.

◆ requiredTokens()

const QList< ThemeManager::ThemeToken > & ThemeDraft::requiredTokens ( )
static

The tokens every theme must define: ThemeManager::requiredTokens().

◆ sameColors()

bool ThemeDraft::sameColors ( const ThemeDraft & other) const

True when the color set and the graph colors equal those of other.


The documentation for this struct was generated from the following files: