Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
home_tab_button_color.h
Go to the documentation of this file.
1#ifndef COCKATRICE_HOME_TAB_BUTTON_COLOR_H
2#define COCKATRICE_HOME_TAB_BUTTON_COLOR_H
3
4#include <QList>
5
7{
8
17
18struct Entry
19{
21 const char *trKey;
22};
23
25{
26 static QList<Entry> entries = {{FromThemeColors, QT_TR_NOOP("From theme colors")},
27 {FromBackground, QT_TR_NOOP("Extract from background")}};
28
29 return entries;
30}
31
38inline Source intToSource(int value)
39{
40 if (value > FromBackground) {
41 return FromThemeColors; // default
42 }
43
44 return static_cast<Source>(value);
45}
46
47} // namespace HomeTabButtonColor
48
49#endif // COCKATRICE_HOME_TAB_BUTTON_COLOR_H
Definition remote_connection_controller.h:20
Definition home_tab_button_color.h:7
QList< Entry > all()
Definition home_tab_button_color.h:24
Source intToSource(int value)
Definition home_tab_button_color.h:38
Source
Where to get the colors for the home tab buttons from.
Definition home_tab_button_color.h:13
@ FromThemeColors
Use the theme's identity accent colors.
Definition home_tab_button_color.h:14
@ FromBackground
Extract colour from the background image.
Definition home_tab_button_color.h:15
Definition home_tab_button_color.h:19
const char * trKey
key for translation
Definition home_tab_button_color.h:21
Source source
Definition home_tab_button_color.h:20