mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
LibGUI: Use nicer API for contrained positions in GlyphMapWidget
Forgot about this little guy. Functionally the same here, but more robust if scrollbars change.
This commit is contained in:
parent
54634fc2df
commit
4f7b37de9c
1 changed files with 1 additions and 1 deletions
|
@ -180,7 +180,7 @@ void GlyphMapWidget::mouseup_event(GUI::MouseEvent& event)
|
|||
{
|
||||
if (!m_in_drag_select)
|
||||
return;
|
||||
auto constrained = event.position().constrained(rect().shrunken(0, frame_thickness() * 2));
|
||||
auto constrained = event.position().constrained(widget_inner_rect());
|
||||
if (auto maybe_glyph = glyph_at_position(constrained); maybe_glyph.has_value()) {
|
||||
auto glyph = maybe_glyph.value();
|
||||
m_selection.extend_to(glyph);
|
||||
|
|
Loading…
Add table
Reference in a new issue