1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:17:34 +00:00

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.
This commit is contained in:
Karol Kosek 2021-11-06 22:22:26 +01:00 committed by Andreas Kling
parent 2867d93115
commit 657409736a

View file

@ -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");