summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2021-11-06 22:22:26 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-08 00:06:55 +0100
commit657409736a6c0afc3cdb09c06f12aac33f9cefa8 (patch)
treeb338db79e81d743f1735598dfd1c66c0babbd0fb
parent2867d93115b36aa6e0938e7cbda5054b8aa324c4 (diff)
downloadserenity-657409736a6c0afc3cdb09c06f12aac33f9cefa8.zip
WidgetGallery: Make custom cursors visible only in the cursors tab
Prior to this change, the selected cursor stayed changed throughout the app, even after switching tabs, which didn't look quite right.
-rw-r--r--Userland/Demos/WidgetGallery/GalleryWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Demos/WidgetGallery/GalleryWidget.cpp b/Userland/Demos/WidgetGallery/GalleryWidget.cpp
index 40afb26a19..0a442db33d 100644
--- a/Userland/Demos/WidgetGallery/GalleryWidget.cpp
+++ b/Userland/Demos/WidgetGallery/GalleryWidget.cpp
@@ -306,7 +306,7 @@ GalleryWidget::GalleryWidget()
m_cursors_tableview->on_activation = [&](const GUI::ModelIndex& index) {
auto icon_index = index.model()->index(index.row(), MouseCursorModel::Column::Bitmap);
- window()->set_cursor(icon_index.data().as_bitmap());
+ m_cursors_tableview->set_override_cursor(NonnullRefPtr<Gfx::Bitmap>(icon_index.data().as_bitmap()));
};
auto& icons_tab = tab_widget.add_tab<GUI::Widget>("Icons");