diff --git a/AppKit/CPScroller.j b/AppKit/CPScroller.j index dae366047..ae4ed6fbc 100644 --- a/AppKit/CPScroller.j +++ b/AppKit/CPScroller.j @@ -380,9 +380,10 @@ CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark"); effectiveIncrementLineHeight = incrementLineSize.height + trackInset.bottom, slotSize = height - effectiveDecrementLineHeight - effectiveIncrementLineHeight, minimumKnobLength = [self currentValueForThemeAttribute:"minimum-knob-length"], + knobVerticalInset = knobInset.top + knobInset.bottom, knobWidth = width - knobInset.left - knobInset.right, - knobHeight = MAX(minimumKnobLength, (slotSize * _knobProportion)), - knobLocation = effectiveDecrementLineHeight + (slotSize - knobHeight) * [self floatValue]; + knobHeight = MAX(minimumKnobLength, ((slotSize - knobVerticalInset) * _knobProportion)), + knobLocation = effectiveDecrementLineHeight + (slotSize - knobHeight - knobVerticalInset) * [self floatValue] + knobInset.top; _partRects[CPScrollerDecrementPage] = CGRectMake(0.0, effectiveDecrementLineHeight, width, knobLocation - effectiveDecrementLineHeight); _partRects[CPScrollerKnob] = CGRectMake(knobInset.left, knobLocation, knobWidth, knobHeight); @@ -409,9 +410,10 @@ CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark"); effectiveIncrementLineWidth = incrementLineSize.width + trackInset.right, slotSize = width - effectiveDecrementLineWidth - effectiveIncrementLineWidth, minimumKnobLength = [self currentValueForThemeAttribute:"minimum-knob-length"], - knobWidth = MAX(minimumKnobLength, (slotSize * _knobProportion)), + knobHorizontalInset = knobInset.left + knobInset.right, + knobWidth = MAX(minimumKnobLength, ((slotSize - knobHorizontalInset) * _knobProportion)), knobHeight = height - knobInset.top - knobInset.bottom, - knobLocation = effectiveDecrementLineWidth + (slotSize - knobWidth) * [self floatValue]; + knobLocation = effectiveDecrementLineWidth + (slotSize - knobWidth - knobHorizontalInset) * [self floatValue] + knobInset.left; _partRects[CPScrollerDecrementPage] = CGRectMake(effectiveDecrementLineWidth, 0.0, knobLocation - effectiveDecrementLineWidth, height); _partRects[CPScrollerKnob] = CGRectMake(knobLocation, knobInset.top, knobWidth, knobHeight); diff --git a/AppKit/Themes/Aristo2/ThemeDescriptors.j b/AppKit/Themes/Aristo2/ThemeDescriptors.j index 2ca0b8727..67627ba6a 100644 --- a/AppKit/Themes/Aristo2/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo2/ThemeDescriptors.j @@ -534,7 +534,7 @@ var themedButtonValues = nil, // Overlay [@"scroller-width", 14.0, CPThemeStateVertical], - [@"knob-inset", CGInsetMake(2.0, 0.0, 0.0, 0.0), CPThemeStateVertical], + [@"knob-inset", CGInsetMake(0.0, 0.0, 0.0, 0.0), CPThemeStateVertical], [@"track-inset", CGInsetMake(2.0, 0.0, 2.0, 0.0), CPThemeStateVertical], [@"track-border-overlay", 12.0, CPThemeStateVertical], [@"knob-slot-color", [CPNull null], CPThemeStateVertical], @@ -610,7 +610,7 @@ var themedButtonValues = nil, // Overlay [@"scroller-width", 9.0], - [@"knob-inset", CGInsetMake(0.0, 0.0, 0.0, 2.0)], + [@"knob-inset", CGInsetMake(0.0, 0.0, 0.0, 0.0)], [@"track-inset", CGInsetMake(0.0, 2.0, 0.0, 2.0)], [@"track-border-overlay", 12.0], [@"knob-slot-color", [CPNull null]],