diff options
author | crupest <crupest@outlook.com> | 2022-02-17 18:32:52 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-17 18:32:52 +0800 |
commit | ada641977cd57a50fc862243ba256c58efc065b8 (patch) | |
tree | 0f2124b88496f42e2cce2e3aaa64211131c18b37 /src/theme_builder/components/stylers/BorderStylerEditor.cpp | |
parent | 9b3b13f78fffefb18f64aad88891d36009a8052e (diff) | |
download | cru-ada641977cd57a50fc862243ba256c58efc065b8.tar.gz cru-ada641977cd57a50fc862243ba256c58efc065b8.tar.bz2 cru-ada641977cd57a50fc862243ba256c58efc065b8.zip |
...
Diffstat (limited to 'src/theme_builder/components/stylers/BorderStylerEditor.cpp')
-rw-r--r-- | src/theme_builder/components/stylers/BorderStylerEditor.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/theme_builder/components/stylers/BorderStylerEditor.cpp b/src/theme_builder/components/stylers/BorderStylerEditor.cpp index 2b169dcf..b2522786 100644 --- a/src/theme_builder/components/stylers/BorderStylerEditor.cpp +++ b/src/theme_builder/components/stylers/BorderStylerEditor.cpp @@ -15,16 +15,11 @@ BorderStylerEditor::BorderStylerEditor() { GetContainer()->AddChild(foreground_brush_editor_.GetRootControl()); GetContainer()->AddChild(background_brush_editor_.GetRootControl()); - auto connect = [this](IEvent<std::nullptr_t>* event) { - event->AddHandler( - [this](std::nullptr_t) { this->change_event_.Raise(nullptr); }); - }; - - connect(corner_radius_editor_.ChangeEvent()); - connect(thickness_editor_.ChangeEvent()); - connect(brush_editor_.ChangeEvent()); - connect(foreground_brush_editor_.ChangeEvent()); - connect(background_brush_editor_.ChangeEvent()); + ConnectChangeEvent(corner_radius_editor_); + ConnectChangeEvent(thickness_editor_); + ConnectChangeEvent(brush_editor_); + ConnectChangeEvent(foreground_brush_editor_); + ConnectChangeEvent(background_brush_editor_); } BorderStylerEditor::~BorderStylerEditor() {} @@ -93,7 +88,7 @@ void BorderStylerEditor::SetValue(ui::style::BorderStyler* styler, } if (trigger_change) { - change_event_.Raise(nullptr); + RaiseChangeEvent(); } } |