diff options
author | crupest <crupest@outlook.com> | 2021-04-02 20:36:15 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-02 20:36:15 +0800 |
commit | 4bc40b874d63442faf42fecc789f15db0a80e440 (patch) | |
tree | 6cdad9d6107207a1d4a5b1247b7e28793fd5dc15 /src/ui/UiManager.cpp | |
parent | 854865677c5af4f7010b6f5a5f8bf6b0aad49480 (diff) | |
download | cru-4bc40b874d63442faf42fecc789f15db0a80e440.tar.gz cru-4bc40b874d63442faf42fecc789f15db0a80e440.tar.bz2 cru-4bc40b874d63442faf42fecc789f15db0a80e440.zip |
...
Diffstat (limited to 'src/ui/UiManager.cpp')
-rw-r--r-- | src/ui/UiManager.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/ui/UiManager.cpp b/src/ui/UiManager.cpp index 7981aa86..65490f6d 100644 --- a/src/ui/UiManager.cpp +++ b/src/ui/UiManager.cpp @@ -9,6 +9,8 @@ #include "cru/platform/gui/Cursor.hpp" #include "cru/platform/gui/UiApplication.hpp" #include "cru/ui/Base.hpp" +#include "cru/ui/helper/ClickDetector.hpp" +#include "cru/ui/render/ScrollBar.hpp" #include "cru/ui/style/ApplyBorderStyleInfo.hpp" #include "cru/ui/style/Condition.hpp" #include "cru/ui/style/Styler.hpp" @@ -113,6 +115,42 @@ UiManager::UiManager() { BorderStyler::Create( ApplyBorderStyleInfo{std::nullopt, Thickness{0}, CornerRadius{0}}), u"DefaultMenuItem"}); + + theme_resource_.scroll_bar_colllapsed_thumb_brush = + factory->CreateSolidColorBrush(colors::gray.WithAlpha(128)); + theme_resource_.scroll_bar_brushes[render::ScrollBarBrushUsageKind::Arrow] = { + {helper::ClickState::None, factory->CreateSolidColorBrush(colors::black)}, + {helper::ClickState::Hover, + factory->CreateSolidColorBrush(colors::black)}, + {helper::ClickState::Press, + factory->CreateSolidColorBrush(colors::black)}, + {helper::ClickState::PressInactive, + factory->CreateSolidColorBrush(colors::black)}}; + theme_resource_ + .scroll_bar_brushes[render::ScrollBarBrushUsageKind::ArrowBackground] = { + {helper::ClickState::None, + factory->CreateSolidColorBrush(colors::seashell)}, + {helper::ClickState::Hover, + factory->CreateSolidColorBrush(colors::seashell)}, + {helper::ClickState::Press, + factory->CreateSolidColorBrush(colors::seashell)}, + {helper::ClickState::PressInactive, + factory->CreateSolidColorBrush(colors::seashell)}}; + theme_resource_.scroll_bar_brushes[render::ScrollBarBrushUsageKind::Slot] = { + {helper::ClickState::None, + factory->CreateSolidColorBrush(colors::seashell)}, + {helper::ClickState::Hover, + factory->CreateSolidColorBrush(colors::seashell)}, + {helper::ClickState::Press, + factory->CreateSolidColorBrush(colors::seashell)}, + {helper::ClickState::PressInactive, + factory->CreateSolidColorBrush(colors::seashell)}}; + theme_resource_.scroll_bar_brushes[render::ScrollBarBrushUsageKind::Thumb] = { + {helper::ClickState::None, factory->CreateSolidColorBrush(colors::gray)}, + {helper::ClickState::Hover, factory->CreateSolidColorBrush(colors::gray)}, + {helper::ClickState::Press, factory->CreateSolidColorBrush(colors::gray)}, + {helper::ClickState::PressInactive, + factory->CreateSolidColorBrush(colors::gray)}}; } UiManager::~UiManager() = default; |