diff --git a/libs/ui/include/psemek/ui/style.hpp b/libs/ui/include/psemek/ui/style.hpp index 94b2331d..587db389 100644 --- a/libs/ui/include/psemek/ui/style.hpp +++ b/libs/ui/include/psemek/ui/style.hpp @@ -16,6 +16,8 @@ namespace psemek::ui struct style { + std::optional scale; + std::optional bg_color; std::optional fg_color; std::optional highlight_color; diff --git a/libs/ui/source/style.cpp b/libs/ui/source/style.cpp index f47b05cb..20619827 100644 --- a/libs/ui/source/style.cpp +++ b/libs/ui/source/style.cpp @@ -36,6 +36,7 @@ namespace psemek::ui void merge(style & dst, style const & src) { + merge(dst.scale, src.scale); merge(dst.bg_color, src.bg_color); merge(dst.fg_color, src.fg_color); merge(dst.highlight_color, src.highlight_color); @@ -62,6 +63,7 @@ namespace psemek::ui style scale(style const & s, float factor) { style result = s; + scale(result.scale, factor); scale(result.action_offset, factor); scale(result.border_width, factor); scale(result.ref_height, factor); @@ -76,6 +78,9 @@ namespace psemek::ui style default_style() { style s; + + s.scale = 1; + s.bg_color = {95, 95, 95, 255}; s.fg_color = {127, 127, 127, 255}; s.highlight_color = {159, 159, 159, 255};