mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-08 04:50:08 +03: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
Notes:
sideshowbarker
2024-07-17 00:53:02 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/7cf2674061 Pull-request: https://github.com/SerenityOS/serenity/pull/22702 Reviewed-by: https://github.com/LucasChollet ✅
@ -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 New Issue
Block a user