aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render/ScrollBar.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-11-17 12:54:55 +0800
committerYuqian Yang <crupest@crupest.life>2025-11-17 12:54:55 +0800
commit0f8f98b9005803ab154b43dcad0db1f292072a4d (patch)
tree0a43d5a9c4e3b747ad955fc30a143aa07ab5888d /src/ui/render/ScrollBar.cpp
parentb68f9f52a3ecdd8e379dd60ac1c1366e76695464 (diff)
downloadcru-0f8f98b9005803ab154b43dcad0db1f292072a4d.tar.gz
cru-0f8f98b9005803ab154b43dcad0db1f292072a4d.tar.bz2
cru-0f8f98b9005803ab154b43dcad0db1f292072a4d.zip
Refactor window host.
Diffstat (limited to 'src/ui/render/ScrollBar.cpp')
-rw-r--r--src/ui/render/ScrollBar.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/render/ScrollBar.cpp b/src/ui/render/ScrollBar.cpp
index 804395e4..3834fffb 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/host/WindowHost.h"
+#include "cru/ui/controls/Window.h"
#include "cru/ui/render/ScrollRenderObject.h"
#include <algorithm>
@@ -317,23 +317,23 @@ void ScrollBar::OnDraw(platform::graphics::IPainter* painter,
void ScrollBar::SetCursor() {
if (const auto control = render_object_->GetAttachedControl()) {
- if (const auto window_host = control->GetWindowHost()) {
- window_host->SetOverrideCursor(
+ if (const auto window = control->GetWindow()) {
+ window->SetOverrideCursor(
GetUiApplication()->GetCursorManager()->GetSystemCursor(
platform::gui::SystemCursorType::Arrow));
- cursor_overrided_ = true;
+ cursor_overridden_ = true;
}
}
}
void ScrollBar::RestoreCursor() {
- if (cursor_overrided_) {
+ if (cursor_overridden_) {
if (const auto control = render_object_->GetAttachedControl()) {
- if (const auto window_host = control->GetWindowHost()) {
- window_host->SetOverrideCursor(nullptr);
+ if (const auto window = control->GetWindow()) {
+ window->SetOverrideCursor(nullptr);
}
}
- cursor_overrided_ = false;
+ cursor_overridden_ = false;
}
}