1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

LibGUI: Add automatic scrolling to GlyphMapWidget

Similar to TextEditor, GlyphMapWidget now automatically scrolls
when dragging a selection outside its boundaries.
This commit is contained in:
thankyouverycool 2022-03-19 10:44:44 -04:00 committed by Andreas Kling
parent a26e71a137
commit 5c6326ae23
2 changed files with 18 additions and 8 deletions

View file

@ -8,6 +8,7 @@
#pragma once
#include <LibCore/Timer.h>
#include <LibGUI/AbstractScrollableWidget.h>
#include <LibGUI/TextRange.h>
#include <LibGfx/BitmapFont.h>
@ -94,6 +95,8 @@ private:
int m_visible_glyphs { 0 };
bool m_in_drag_select { false };
Unicode::CodePointRange m_active_range { 0x0000, 0x10FFFF };
RefPtr<Core::Timer> m_automatic_selection_scroll_timer;
Gfx::IntPoint m_last_mousemove_position;
};
}