Skip to content
  • Carlos Soriano Sánchez's avatar
    canvas-container: fix desktop snapping · 9cce755e
    Carlos Soriano Sánchez authored
    To snap an icon to the closest grid cell, we were trying to round
    the x position with an offset of 0.5. However, cells are not
    normalized, so that 0.5 is actually doing little to round the
    position.
    
    This is making the icons to snap to the right closest cell once the
    user drags more the icon left to the current cell.
    
    The actual size of the cell is SNAP_SIZE_*, so to fix this use half
    of the SNAP_SIZE to "round" the number.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750446
    9cce755e