1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:47:45 +00:00

Magnifier: Add ability to drag the location when it is locked

This commit is contained in:
FrHun 2022-12-06 01:19:14 +01:00 committed by Sam Atkins
parent 9d3debcbbe
commit f413033a50
2 changed files with 32 additions and 0 deletions

View file

@ -47,6 +47,10 @@ private:
virtual void paint_event(GUI::PaintEvent&) override;
virtual void second_paint_event(GUI::PaintEvent&) override;
virtual void mousemove_event(GUI::MouseEvent&) override;
virtual void mousedown_event(GUI::MouseEvent&) override;
virtual void mouseup_event(GUI::MouseEvent&) override;
void sync();
int m_scale_factor { 2 };
@ -55,6 +59,8 @@ private:
CircularQueue<RefPtr<Gfx::Bitmap>, 512> m_grabbed_bitmaps {};
ssize_t m_frame_offset_from_head { 0 };
bool m_pause_capture { false };
bool m_currently_dragging { false };
Gfx::IntPoint m_last_drag_position {};
Optional<Gfx::IntPoint> m_locked_location {};
bool m_show_grid { false };
Gfx::Color m_grid_color { 255, 0, 255, 100 };