diff options
author | crupest <crupest@outlook.com> | 2022-01-27 21:21:51 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-27 21:21:51 +0800 |
commit | 560c0ead613658a2b7444907c3d1d69e49be8c32 (patch) | |
tree | 37938098f0e80403d572accf9f7a275ec8792c00 /src/ui/controls/Control.cpp | |
parent | 56633dab8c1bf9d25a6367a651b5b054055a2130 (diff) | |
download | cru-560c0ead613658a2b7444907c3d1d69e49be8c32.tar.gz cru-560c0ead613658a2b7444907c3d1d69e49be8c32.tar.bz2 cru-560c0ead613658a2b7444907c3d1d69e49be8c32.zip |
...
Diffstat (limited to 'src/ui/controls/Control.cpp')
-rw-r--r-- | src/ui/controls/Control.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/controls/Control.cpp b/src/ui/controls/Control.cpp index 44da7f6f..04199d1d 100644 --- a/src/ui/controls/Control.cpp +++ b/src/ui/controls/Control.cpp @@ -16,9 +16,9 @@ using platform::gui::IUiApplication; using platform::gui::SystemCursorType; Control::Control() { - style_rule_set_ = std::make_unique<style::StyleRuleSet>(); + style_rule_set_ = std::make_shared<style::StyleRuleSet>(); style_rule_set_bind_ = - std::make_unique<style::StyleRuleSetBind>(this, style_rule_set_.get()); + std::make_unique<style::StyleRuleSetBind>(this, style_rule_set_); MouseEnterEvent()->Direct()->AddHandler([this](events::MouseEventArgs&) { this->is_mouse_over_ = true; @@ -99,8 +99,8 @@ void Control::SetCursor(std::shared_ptr<ICursor> cursor) { } } -style::StyleRuleSet* Control::GetStyleRuleSet() { - return style_rule_set_.get(); +std::shared_ptr<style::StyleRuleSet> Control::GetStyleRuleSet() { + return style_rule_set_; } void Control::AddChild(Control* control, const Index position) { |