1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:07:44 +00:00

Magnifier: Add 8x magnification and pausing

This adds an option for even more magnification, when you really need to
count pixels, as well as pausing the capture by pressing Space and
switching between magnification levels with keys 2, 4 & 8.
This commit is contained in:
Marcus Nilsson 2021-09-17 22:29:35 +02:00 committed by Andreas Kling
parent 6bdd62b51b
commit 401ea85655
3 changed files with 23 additions and 3 deletions

View file

@ -14,6 +14,7 @@ class MagnifierWidget final : public GUI::Frame {
public:
virtual ~MagnifierWidget();
void set_scale_factor(int scale_factor);
void pause_capture(bool pause) { m_pause_capture = pause; }
private:
MagnifierWidget();
@ -24,4 +25,5 @@ private:
int m_scale_factor { 2 };
RefPtr<Gfx::Bitmap> m_grabbed_bitmap;
bool m_pause_capture { false };
};