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

HexEditor: Add comments to annotations

The comment appears as a tooltip when hovering over the annotation.

A couple of properties of the TextEditor would ideally be set in GML,
but either don't have a setter exposed, or the GML compiler doesn't
recognise the enum. I'll fix those up after the current big GML
compiler PR gets merged.
This commit is contained in:
Sam Atkins 2024-01-29 16:03:37 +00:00 committed by Sam Atkins
parent 4b1c7533f5
commit a54952795a
5 changed files with 32 additions and 0 deletions

View file

@ -363,7 +363,11 @@ void HexEditor::mousemove_event(GUI::MouseEvent& event)
update();
update_status();
set_tooltip(""_string);
} else {
set_tooltip(m_hovered_annotation.has_value() ? m_hovered_annotation->comments : ""_string);
}
show_or_hide_tooltip();
}
void HexEditor::mouseup_event(GUI::MouseEvent& event)