diff options
author | crupest <crupest@outlook.com> | 2018-11-09 22:59:38 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-09 22:59:38 +0800 |
commit | ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9 (patch) | |
tree | e5b886f1884fa56dd90059523b1f4dc730bb5003 /src/ui/controls/toggle_button.cpp | |
parent | 4b219b569c16db6027dd36e4656152f261321c60 (diff) | |
download | cru-ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9.tar.gz cru-ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9.tar.bz2 cru-ac4b0f8d438e7a7c2ecd836af8332b5da1e035c9.zip |
Add predefine resource.
Diffstat (limited to 'src/ui/controls/toggle_button.cpp')
-rw-r--r-- | src/ui/controls/toggle_button.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/controls/toggle_button.cpp b/src/ui/controls/toggle_button.cpp index f35b8bfe..a901f650 100644 --- a/src/ui/controls/toggle_button.cpp +++ b/src/ui/controls/toggle_button.cpp @@ -2,10 +2,10 @@ #include "graph/graph.hpp" #include "ui/animations/animation.hpp" +#include "ui/predefine.hpp" namespace cru::ui::controls { - using graph::CreateSolidBrush; using animations::AnimationBuilder; // ui length parameters of toggle button. @@ -19,8 +19,8 @@ namespace cru::ui::controls { graph::GraphManager::GetInstance()->GetD2D1Factory()->CreateRoundedRectangleGeometry(D2D1::RoundedRect(D2D1::RectF(-half_width, -half_height, half_width, half_height), half_height, half_height), &frame_path_); - on_brush_ = CreateSolidBrush(D2D1::ColorF(D2D1::ColorF::DeepSkyBlue)); - off_brush_ = CreateSolidBrush(D2D1::ColorF(D2D1::ColorF::LightGray)); + on_brush_ = predefine::GetPredefineResourceComPtr<ID2D1Brush>(predefine::key_toggle_button_on_brush); + off_brush_ = predefine::GetPredefineResourceComPtr<ID2D1Brush>(predefine::key_toggle_button_off_brush); } inline D2D1_POINT_2F ConvertPoint(const Point& point) |