From bea876a3b1a241e6127c06a14684a6dc9fcc9516 Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Tue, 17 Sep 2019 16:40:12 +0800 Subject: ... --- include/cru/ui/controls/button.hpp | 2 +- include/cru/ui/ui_manager.hpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/cru/ui/controls/button.hpp b/include/cru/ui/controls/button.hpp index 0fad0035..d4a03e1d 100644 --- a/include/cru/ui/controls/button.hpp +++ b/include/cru/ui/controls/button.hpp @@ -18,7 +18,7 @@ using render::CornerRadius; struct ButtonStateStyle { std::shared_ptr border_brush; Thickness border_thickness; - CornerRadius corner_radius; + CornerRadius border_radius; std::shared_ptr foreground_brush; std::shared_ptr background_brush; }; diff --git a/include/cru/ui/ui_manager.hpp b/include/cru/ui/ui_manager.hpp index d2b8ad53..5501c62c 100644 --- a/include/cru/ui/ui_manager.hpp +++ b/include/cru/ui/ui_manager.hpp @@ -2,6 +2,8 @@ #include "base.hpp" #include "cru/common/base.hpp" +#include "controls/button.hpp" + #include namespace cru::platform::graph { @@ -29,6 +31,10 @@ class PredefineResources : public Object { std::shared_ptr text_block_font; }; +struct ThemeResources { + controls::ButtonStyle button_style; +}; + class UiManager : public Object { public: static UiManager* GetInstance(); @@ -47,7 +53,13 @@ class UiManager : public Object { return predefine_resources_.get(); } + ThemeResources* GetThemeResources() { + return &theme_resource_; + } + private: std::unique_ptr predefine_resources_; + + ThemeResources theme_resource_; }; } // namespace cru::ui -- cgit v1.2.3