mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibGUI: Use widget override cursors in HeaderView
This commit is contained in:
parent
69adaf3308
commit
cab422b441
1 changed files with 3 additions and 4 deletions
|
@ -180,7 +180,7 @@ void HeaderView::mousemove_event(MouseEvent& event)
|
||||||
bool found_hovered_header = false;
|
bool found_hovered_header = false;
|
||||||
for (int i = 0; i < section_count; ++i) {
|
for (int i = 0; i < section_count; ++i) {
|
||||||
if (section_resize_grabbable_rect(i).contains(event.position())) {
|
if (section_resize_grabbable_rect(i).contains(event.position())) {
|
||||||
window()->set_cursor(Gfx::StandardCursor::ResizeColumn);
|
set_override_cursor(Gfx::StandardCursor::ResizeColumn);
|
||||||
set_hovered_section(-1);
|
set_hovered_section(-1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ void HeaderView::mousemove_event(MouseEvent& event)
|
||||||
if (!found_hovered_header)
|
if (!found_hovered_header)
|
||||||
set_hovered_section(-1);
|
set_hovered_section(-1);
|
||||||
}
|
}
|
||||||
window()->set_cursor(Gfx::StandardCursor::None);
|
set_override_cursor(Gfx::StandardCursor::None);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HeaderView::mouseup_event(MouseEvent& event)
|
void HeaderView::mouseup_event(MouseEvent& event)
|
||||||
|
@ -200,7 +200,7 @@ void HeaderView::mouseup_event(MouseEvent& event)
|
||||||
if (event.button() == MouseButton::Left) {
|
if (event.button() == MouseButton::Left) {
|
||||||
if (m_in_section_resize) {
|
if (m_in_section_resize) {
|
||||||
if (!section_resize_grabbable_rect(m_resizing_section).contains(event.position()))
|
if (!section_resize_grabbable_rect(m_resizing_section).contains(event.position()))
|
||||||
window()->set_cursor(Gfx::StandardCursor::None);
|
set_override_cursor(Gfx::StandardCursor::None);
|
||||||
m_in_section_resize = false;
|
m_in_section_resize = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,6 @@ void HeaderView::leave_event(Core::Event& event)
|
||||||
{
|
{
|
||||||
Widget::leave_event(event);
|
Widget::leave_event(event);
|
||||||
set_hovered_section(-1);
|
set_hovered_section(-1);
|
||||||
window()->set_cursor(Gfx::StandardCursor::None);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Gfx::TextAlignment HeaderView::section_alignment(int section) const
|
Gfx::TextAlignment HeaderView::section_alignment(int section) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue