mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 10:37:41 +00: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)
|
if (!m_in_drag_select)
|
||||||
return;
|
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()) {
|
if (auto maybe_glyph = glyph_at_position(constrained); maybe_glyph.has_value()) {
|
||||||
auto glyph = maybe_glyph.value();
|
auto glyph = maybe_glyph.value();
|
||||||
m_selection.extend_to(glyph);
|
m_selection.extend_to(glyph);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue