mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibGUI: Keep scrolling while drag-selecting outside a TextEditor
If you start selecting text and move the cursor outside the TextEditor widget area without letting go of the mouse button, we will now keep scrolling a little bit every 100ms.
This commit is contained in:
parent
f78a92c5a9
commit
5c15c24976
2 changed files with 29 additions and 0 deletions
|
@ -200,6 +200,8 @@ private:
|
|||
size_t visual_line_containing(size_t line_index, size_t column) const;
|
||||
void recompute_visual_lines(size_t line_index);
|
||||
|
||||
void automatic_selection_scroll_timer_fired();
|
||||
|
||||
template<class T, class... Args>
|
||||
inline void execute(Args&&... args)
|
||||
{
|
||||
|
@ -247,6 +249,9 @@ private:
|
|||
NonnullOwnPtrVector<LineVisualData> m_line_visual_data;
|
||||
|
||||
OwnPtr<SyntaxHighlighter> m_highlighter;
|
||||
|
||||
RefPtr<Core::Timer> m_automatic_selection_scroll_timer;
|
||||
Gfx::Point m_last_mousemove_position;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue