offset the picker by 5px

This commit is contained in:
vaxerski 2022-09-02 20:25:46 +02:00
parent a82106df3c
commit 0ecbeda12e

View file

@ -245,7 +245,7 @@ void CHyprpicker::renderSurface(CLayerSurface* pSurface) {
const auto SCALECURSOR = Vector2D{ const auto SCALECURSOR = Vector2D{
g_pHyprpicker->m_pLastSurface->screenBuffer.pixelSize.x / (g_pHyprpicker->m_pLastSurface->buffers[0].pixelSize.x / g_pHyprpicker->m_pLastSurface->m_pMonitor->scale), g_pHyprpicker->m_pLastSurface->screenBuffer.pixelSize.x / (g_pHyprpicker->m_pLastSurface->buffers[0].pixelSize.x / g_pHyprpicker->m_pLastSurface->m_pMonitor->scale),
g_pHyprpicker->m_pLastSurface->screenBuffer.pixelSize.y / (g_pHyprpicker->m_pLastSurface->buffers[0].pixelSize.y / g_pHyprpicker->m_pLastSurface->m_pMonitor->scale)}; g_pHyprpicker->m_pLastSurface->screenBuffer.pixelSize.y / (g_pHyprpicker->m_pLastSurface->buffers[0].pixelSize.y / g_pHyprpicker->m_pLastSurface->m_pMonitor->scale)};
const auto CLICKPOS = Vector2D{g_pHyprpicker->m_vLastCoords.floor().x * SCALECURSOR.x, g_pHyprpicker->m_vLastCoords.floor().y * SCALECURSOR.y}; const auto CLICKPOS = Vector2D{g_pHyprpicker->m_vLastCoords.floor().x * SCALECURSOR.x + 5, g_pHyprpicker->m_vLastCoords.floor().y * SCALECURSOR.y + 5};
const auto PATTERNPRE = cairo_pattern_create_for_surface(pSurface->screenBuffer.surface); const auto PATTERNPRE = cairo_pattern_create_for_surface(pSurface->screenBuffer.surface);
cairo_pattern_set_filter(PATTERNPRE, CAIRO_FILTER_BILINEAR); cairo_pattern_set_filter(PATTERNPRE, CAIRO_FILTER_BILINEAR);