Skip to content

Commit cab422b

Browse files
committed
LibGUI: Use widget override cursors in HeaderView
1 parent 69adaf3 commit cab422b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Libraries/LibGUI/HeaderView.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void HeaderView::mousemove_event(MouseEvent& event)
180180
bool found_hovered_header = false;
181181
for (int i = 0; i < section_count; ++i) {
182182
if (section_resize_grabbable_rect(i).contains(event.position())) {
183-
window()->set_cursor(Gfx::StandardCursor::ResizeColumn);
183+
set_override_cursor(Gfx::StandardCursor::ResizeColumn);
184184
set_hovered_section(-1);
185185
return;
186186
}
@@ -192,15 +192,15 @@ void HeaderView::mousemove_event(MouseEvent& event)
192192
if (!found_hovered_header)
193193
set_hovered_section(-1);
194194
}
195-
window()->set_cursor(Gfx::StandardCursor::None);
195+
set_override_cursor(Gfx::StandardCursor::None);
196196
}
197197

198198
void HeaderView::mouseup_event(MouseEvent& event)
199199
{
200200
if (event.button() == MouseButton::Left) {
201201
if (m_in_section_resize) {
202202
if (!section_resize_grabbable_rect(m_resizing_section).contains(event.position()))
203-
window()->set_cursor(Gfx::StandardCursor::None);
203+
set_override_cursor(Gfx::StandardCursor::None);
204204
m_in_section_resize = false;
205205
return;
206206
}
@@ -337,7 +337,6 @@ void HeaderView::leave_event(Core::Event& event)
337337
{
338338
Widget::leave_event(event);
339339
set_hovered_section(-1);
340-
window()->set_cursor(Gfx::StandardCursor::None);
341340
}
342341

343342
Gfx::TextAlignment HeaderView::section_alignment(int section) const

0 commit comments

Comments
 (0)