From dfe215f34c978a30fb33ec39b8b3c14e97f2c76b Mon Sep 17 00:00:00 2001 From: daboe01 Date: Fri, 19 Jul 2024 06:36:58 +0200 Subject: [PATCH] fixed: 1xp glitch with CPSegmentedControl in safari --- AppKit/CPSegmentedControl.j | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/AppKit/CPSegmentedControl.j b/AppKit/CPSegmentedControl.j index c2dd3a21f..77968d693 100644 --- a/AppKit/CPSegmentedControl.j +++ b/AppKit/CPSegmentedControl.j @@ -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) {