diff --git a/src/Button.hpp b/src/Button.hpp index 194c3eb..aaffe7a 100644 --- a/src/Button.hpp +++ b/src/Button.hpp @@ -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; diff --git a/src/PropMacros.hpp b/src/PropMacros.hpp index de2ff3d..c6fbc90 100644 --- a/src/PropMacros.hpp +++ b/src/PropMacros.hpp @@ -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: \ diff --git a/src/TopLevelStyles.hpp b/src/TopLevelStyles.hpp index 7f878ba..2772a56 100644 --- a/src/TopLevelStyles.hpp +++ b/src/TopLevelStyles.hpp @@ -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; diff --git a/src/Widget.hpp b/src/Widget.hpp index d0cd98d..0d97048 100644 --- a/src/Widget.hpp +++ b/src/Widget.hpp @@ -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: