summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/GlyphMapWidget.h
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2022-03-19 10:44:44 -0400
committerAndreas Kling <kling@serenityos.org>2022-03-20 20:00:25 +0100
commit5c6326ae230ded7783ce949ec72b0323d9af41f4 (patch)
tree9f08039575060af2509de704ca2b8b2117884d20 /Userland/Libraries/LibGUI/GlyphMapWidget.h
parenta26e71a137962bb45c5e38c2b0455051e1d50a1f (diff)
downloadserenity-5c6326ae230ded7783ce949ec72b0323d9af41f4.zip
LibGUI: Add automatic scrolling to GlyphMapWidget
Similar to TextEditor, GlyphMapWidget now automatically scrolls when dragging a selection outside its boundaries.
Diffstat (limited to 'Userland/Libraries/LibGUI/GlyphMapWidget.h')
-rw-r--r--Userland/Libraries/LibGUI/GlyphMapWidget.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/GlyphMapWidget.h b/Userland/Libraries/LibGUI/GlyphMapWidget.h
index b5ac0b8df5..9d1dfe2b3c 100644
--- a/Userland/Libraries/LibGUI/GlyphMapWidget.h
+++ b/Userland/Libraries/LibGUI/GlyphMapWidget.h
@@ -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;
};
}