diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-11-18 00:46:27 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-11-18 00:46:27 +0800 |
| commit | 6b4edc9be8ec556147c195cf2047d92b9439efd7 (patch) | |
| tree | a1d7b7d1e821b4e1911fd00761f77a24ee483f4a /src/ui/render/ScrollBar.cpp | |
| parent | f7c4d19df66c602d74795e98ce2ee4390d06fbb4 (diff) | |
| download | cru-6b4edc9be8ec556147c195cf2047d92b9439efd7.tar.gz cru-6b4edc9be8ec556147c195cf2047d92b9439efd7.tar.bz2 cru-6b4edc9be8ec556147c195cf2047d92b9439efd7.zip | |
Bring back ControlHost and refactor tree management of control.
Diffstat (limited to 'src/ui/render/ScrollBar.cpp')
| -rw-r--r-- | src/ui/render/ScrollBar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/render/ScrollBar.cpp b/src/ui/render/ScrollBar.cpp index 3834fffb..4343f15a 100644 --- a/src/ui/render/ScrollBar.cpp +++ b/src/ui/render/ScrollBar.cpp @@ -8,7 +8,7 @@ #include "cru/platform/gui/Cursor.h" #include "cru/ui/Base.h" #include "cru/ui/ThemeManager.h" -#include "cru/ui/controls/Window.h" +#include "cru/ui/controls/ControlHost.h" #include "cru/ui/render/ScrollRenderObject.h" #include <algorithm> @@ -317,8 +317,8 @@ void ScrollBar::OnDraw(platform::graphics::IPainter* painter, void ScrollBar::SetCursor() { if (const auto control = render_object_->GetAttachedControl()) { - if (const auto window = control->GetWindow()) { - window->SetOverrideCursor( + if (const auto host = control->GetControlHost()) { + host->SetOverrideCursor( GetUiApplication()->GetCursorManager()->GetSystemCursor( platform::gui::SystemCursorType::Arrow)); cursor_overridden_ = true; @@ -329,8 +329,8 @@ void ScrollBar::SetCursor() { void ScrollBar::RestoreCursor() { if (cursor_overridden_) { if (const auto control = render_object_->GetAttachedControl()) { - if (const auto window = control->GetWindow()) { - window->SetOverrideCursor(nullptr); + if (const auto host = control->GetControlHost()) { + host->SetOverrideCursor(nullptr); } } cursor_overridden_ = false; |
