From c9bdb79a90b3ee2148c9b6f04ce2d8149da0b50e Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 2 Sep 2022 20:26:48 +0200 Subject: [PATCH] fix preview color --- src/hyprpicker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hyprpicker.cpp b/src/hyprpicker.cpp index 2a6c3fc..4953e38 100644 --- a/src/hyprpicker.cpp +++ b/src/hyprpicker.cpp @@ -273,7 +273,7 @@ void CHyprpicker::renderSurface(CLayerSurface* pSurface) { cairo_restore(PCAIRO); cairo_save(PCAIRO); - const auto PIXCOLOR = getColorFromPixel(pSurface, CLICKPOS); + const auto PIXCOLOR = getColorFromPixel(pSurface, CLICKPOS - Vector2D(5,5) /* Remove the pad */); cairo_set_source_rgba(PCAIRO, PIXCOLOR.r / 255.f, PIXCOLOR.g / 255.f, PIXCOLOR.b / 255.f, PIXCOLOR.a / 255.f); cairo_scale(PCAIRO, 1, 1);