mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:37:35 +00:00
LibGfx: Add support for enumerating by Metric and Path roles
For Theme Editor.
This commit is contained in:
parent
220b7dd779
commit
6f4333fca7
1 changed files with 27 additions and 11 deletions
|
@ -89,6 +89,19 @@ namespace Gfx {
|
|||
C(Window) \
|
||||
C(WindowText)
|
||||
|
||||
#define ENUMERATE_METRIC_ROLES(C) \
|
||||
C(TitleHeight) \
|
||||
C(TitleButtonWidth) \
|
||||
C(TitleButtonHeight)
|
||||
|
||||
#define ENUMERATE_PATH_ROLES(C) \
|
||||
C(TitleButtonIcons) \
|
||||
C(InactiveWindowShadow) \
|
||||
C(ActiveWindowShadow) \
|
||||
C(TaskbarShadow) \
|
||||
C(MenuShadow) \
|
||||
C(TooltipShadow)
|
||||
|
||||
enum class ColorRole {
|
||||
NoRole,
|
||||
|
||||
|
@ -121,21 +134,24 @@ inline const char* to_string(ColorRole role)
|
|||
|
||||
enum class MetricRole {
|
||||
NoRole,
|
||||
TitleHeight,
|
||||
TitleButtonWidth,
|
||||
TitleButtonHeight,
|
||||
__Count,
|
||||
|
||||
#undef __ENUMERATE_METRIC_ROLE
|
||||
#define __ENUMERATE_METRIC_ROLE(role) role,
|
||||
ENUMERATE_METRIC_ROLES(__ENUMERATE_METRIC_ROLE)
|
||||
#undef __ENUMERATE_METRIC_ROLE
|
||||
|
||||
__Count,
|
||||
};
|
||||
|
||||
enum class PathRole {
|
||||
NoRole,
|
||||
TitleButtonIcons,
|
||||
InactiveWindowShadow,
|
||||
ActiveWindowShadow,
|
||||
TaskbarShadow,
|
||||
MenuShadow,
|
||||
TooltipShadow,
|
||||
__Count,
|
||||
|
||||
#undef __ENUMERATE_PATH_ROLE
|
||||
#define __ENUMERATE_PATH_ROLE(role) role,
|
||||
ENUMERATE_PATH_ROLES(__ENUMERATE_PATH_ROLE)
|
||||
#undef __ENUMERATE_PATH_ROLE
|
||||
|
||||
__Count,
|
||||
};
|
||||
|
||||
struct SystemTheme {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue