From 657409736a6c0afc3cdb09c06f12aac33f9cefa8 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Sat, 6 Nov 2021 22:22:26 +0100 Subject: 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. --- Userland/Demos/WidgetGallery/GalleryWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(icon_index.data().as_bitmap())); }; auto& icons_tab = tab_widget.add_tab("Icons"); -- cgit v1.2.3