Skip to content
  • Tatsuyuki Ishi's avatar
    shadow: handle DPR outside the renderer · ee06e262
    Tatsuyuki Ishi authored and Noah Davis's avatar Noah Davis committed
    QPainter's auto-scaling is prone to off-by-one rounding errors and draws on
    fractional coordinates. With this change, we paint on a 1x DPR QPainter and
    scale the shadow offset and strength manually based on DPR.
    
    This resolves an issue with resulting in seams on the right and bottom
    edges of a menu due to shadow boundaries being off-by-one.
    
    BUG: 418166
    
    v2: remove unrelated formatting changes
    v3:
    - move the DPR helper to ShadowHelper
    - retrieve the DPR from the widget instead of the global QGuiApplication
    - added BUG reference
    ee06e262