improve style prop macro name
This commit is contained in:
parent
4ece938f1c
commit
d6dcff2b7c
4 changed files with 17 additions and 17 deletions
|
@ -9,13 +9,13 @@
|
|||
namespace Raven {
|
||||
|
||||
class Button : public Widget {
|
||||
DEF_PROP(text_fill_color, RGB, 0.0, 0.0, 0.0)
|
||||
DEF_WIDGET_STYLE_PROP(text_fill_color, RGB, 0.0, 0.0, 0.0)
|
||||
|
||||
DEF_PROP(normal_background_fill_color, RGB, 0.0, 0.0, 0.0)
|
||||
DEF_PROP(focused_background_fill_color, RGB, 0.0, 0.0, 0.0)
|
||||
DEF_PROP(active_background_fill_color, RGB, 0.0, 0.0, 0.0)
|
||||
DEF_WIDGET_STYLE_PROP(normal_background_fill_color, RGB, 0.0, 0.0, 0.0)
|
||||
DEF_WIDGET_STYLE_PROP(focused_background_fill_color, RGB, 0.0, 0.0, 0.0)
|
||||
DEF_WIDGET_STYLE_PROP(active_background_fill_color, RGB, 0.0, 0.0, 0.0)
|
||||
|
||||
DEF_PROP(font_description, PangoFontDescription*, nullptr)
|
||||
DEF_WIDGET_STYLE_PROP(font_description, PangoFontDescription*, nullptr)
|
||||
|
||||
private:
|
||||
std::string m_text;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#define DEF_PROP(name, type, ...) \
|
||||
#define DEF_WIDGET_STYLE_PROP(name, type, ...) \
|
||||
private: \
|
||||
type m_##name {__VA_ARGS__}; \
|
||||
public: \
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
namespace Raven {
|
||||
|
||||
class TopLevelStyles {
|
||||
DEF_PROP(controls_font_description, PangoFontDescription*, nullptr)
|
||||
DEF_WIDGET_STYLE_PROP(controls_font_description, PangoFontDescription*, nullptr)
|
||||
|
||||
DEF_PROP(text_color, RGB, 0.0, 0.0, 0.0)
|
||||
DEF_PROP(accent_color, RGB, 0.6941, 0.3843, 0.5254)
|
||||
DEF_PROP(accent_color_darker, RGB, 0.5607, 0.2470, 0.4431)
|
||||
DEF_PROP(background_color, RGB, 0.9764, 0.9607, 0.8431)
|
||||
DEF_WIDGET_STYLE_PROP(text_color, RGB, 0.0, 0.0, 0.0)
|
||||
DEF_WIDGET_STYLE_PROP(accent_color, RGB, 0.6941, 0.3843, 0.5254)
|
||||
DEF_WIDGET_STYLE_PROP(accent_color_darker, RGB, 0.5607, 0.2470, 0.4431)
|
||||
DEF_WIDGET_STYLE_PROP(background_color, RGB, 0.9764, 0.9607, 0.8431)
|
||||
|
||||
DEF_PROP(button_normal_color, RGB, m_accent_color)
|
||||
DEF_PROP(button_focused_color, RGB, m_accent_color_darker)
|
||||
DEF_PROP(button_active_color, RGB, m_accent_color_darker)
|
||||
DEF_WIDGET_STYLE_PROP(button_normal_color, RGB, m_accent_color)
|
||||
DEF_WIDGET_STYLE_PROP(button_focused_color, RGB, m_accent_color_darker)
|
||||
DEF_WIDGET_STYLE_PROP(button_active_color, RGB, m_accent_color_darker)
|
||||
|
||||
private:
|
||||
Window *m_window;
|
||||
|
|
|
@ -14,9 +14,9 @@ namespace Raven {
|
|||
|
||||
class Widget {
|
||||
|
||||
DEF_PROP(do_background_fill, bool, false)
|
||||
DEF_PROP(background_fill_color, RGB, 0, 0, 0)
|
||||
DEF_PROP(background_border_radius, double, 0.0)
|
||||
DEF_WIDGET_STYLE_PROP(do_background_fill, bool, false)
|
||||
DEF_WIDGET_STYLE_PROP(background_fill_color, RGB, 0, 0, 0)
|
||||
DEF_WIDGET_STYLE_PROP(background_border_radius, double, 0.0)
|
||||
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue