Merge pull request #3086 from daboe01/segmentedcontrol-theme-fix

fixed: 1xp glitch with CPSegmentedControl in safari
This commit is contained in:
daboe01 authored and GitHub committed 2024-07-20 13:42:08 +02:00
commit 6653690d0c
1 file changed
+5 -4
+5 -4
View File
@@ -561,10 +561,11 @@ CPSegmentSwitchTrackingMomentary = 2;
}
else if (aName === "right-segment-bezel")
{
return CGRectMake(CGRectGetWidth([self bounds]) - contentInset.right,
bezelInset.top,
contentInset.right,
height);
// we have to FLOOR the coordinates to prevent a 1px glitch in Safari
return CGRectMake(FLOOR(CGRectGetWidth([self bounds]) - contentInset.right),
FLOOR(bezelInset.top),
FLOOR(contentInset.right),
FLOOR(height));
}
else if (aName.indexOf("segment-bezel") === 0)
{