aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-09-17 16:40:12 +0800
committer杨宇千 <crupest@outlook.com>2019-09-17 16:40:12 +0800
commitbea876a3b1a241e6127c06a14684a6dc9fcc9516 (patch)
treed06e40306671cb7c48290f65fdc5d39f219210c9 /include
parente8dd10eec26d26c3fb30f2712ccf58ac72edc8a2 (diff)
downloadcru-bea876a3b1a241e6127c06a14684a6dc9fcc9516.tar.gz
cru-bea876a3b1a241e6127c06a14684a6dc9fcc9516.tar.bz2
cru-bea876a3b1a241e6127c06a14684a6dc9fcc9516.zip
...
Diffstat (limited to 'include')
-rw-r--r--include/cru/ui/controls/button.hpp2
-rw-r--r--include/cru/ui/ui_manager.hpp12
2 files changed, 13 insertions, 1 deletions
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<platform::graph::Brush> border_brush;
Thickness border_thickness;
- CornerRadius corner_radius;
+ CornerRadius border_radius;
std::shared_ptr<platform::graph::Brush> foreground_brush;
std::shared_ptr<platform::graph::Brush> 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 <memory>
namespace cru::platform::graph {
@@ -29,6 +31,10 @@ class PredefineResources : public Object {
std::shared_ptr<platform::graph::Font> 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<PredefineResources> predefine_resources_;
+
+ ThemeResources theme_resource_;
};
} // namespace cru::ui