mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 02:26:11 +00:00
HackStudio: Stop incorrectly overriding gutter cursors
Only adjust the cursor to respond to clickable text, if the mouse is over text.
This commit is contained in:
parent
e685b0a819
commit
7cf2674061
|
@ -260,11 +260,7 @@ void Editor::mousemove_event(GUI::MouseEvent& event)
|
|||
bool hide_tooltip = (m_tooltip_role == TooltipRole::Documentation);
|
||||
bool is_over_clickable = false;
|
||||
|
||||
auto ruler_line_rect = ruler_content_rect(text_position.line());
|
||||
auto hovering_lines_ruler = (event.position().x() < ruler_line_rect.width());
|
||||
if (hovering_lines_ruler && !is_in_drag_select())
|
||||
set_override_cursor(Gfx::StandardCursor::Arrow);
|
||||
else if (m_hovering_editor)
|
||||
if (m_hovering_editor && event.position().x() > fixed_elements_width())
|
||||
set_override_cursor(m_hovering_clickable && event.ctrl() ? Gfx::StandardCursor::Hand : Gfx::StandardCursor::IBeam);
|
||||
|
||||
for (auto& span : document().spans()) {
|
||||
|
@ -472,8 +468,6 @@ void Editor::set_document(GUI::TextDocument& doc)
|
|||
VERIFY(is<CodeDocument>(doc));
|
||||
GUI::TextEditor::set_document(doc);
|
||||
|
||||
set_override_cursor(Gfx::StandardCursor::IBeam);
|
||||
|
||||
auto& code_document = static_cast<CodeDocument&>(doc);
|
||||
|
||||
set_language_client_for(code_document);
|
||||
|
|
Loading…
Reference in a new issue