diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-down-arrow-disabled.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-down-arrow-disabled.png new file mode 100644 index 000000000..b7edfb041 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-down-arrow-disabled.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-down-arrow-highlighted.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-down-arrow-highlighted.png new file mode 100644 index 000000000..31ee9fe88 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-down-arrow-highlighted.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-down-arrow.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-down-arrow.png new file mode 100644 index 000000000..1cbaf2e26 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-down-arrow.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-knob-center.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-knob-center.png new file mode 100644 index 000000000..31e38c428 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-knob-center.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-knob-left.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-knob-left.png new file mode 100644 index 000000000..83079a4f1 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-knob-left.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-knob-right.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-knob-right.png new file mode 100644 index 000000000..a72035849 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-knob-right.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-track-disabled.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-track-disabled.png new file mode 100644 index 000000000..d4d2e0fc1 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-track-disabled.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-track.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-track.png new file mode 100644 index 000000000..eec906ccc Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-horizontal-track.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-left-arrow-disabled.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-left-arrow-disabled.png new file mode 100644 index 000000000..3b5d68032 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-left-arrow-disabled.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-left-arrow-highlighted.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-left-arrow-highlighted.png new file mode 100644 index 000000000..cc85f48c0 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-left-arrow-highlighted.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-left-arrow.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-left-arrow.png new file mode 100644 index 000000000..4182c266a Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-left-arrow.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-right-arrow-disabled.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-right-arrow-disabled.png new file mode 100644 index 000000000..d33dce736 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-right-arrow-disabled.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-right-arrow-highlighted.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-right-arrow-highlighted.png new file mode 100644 index 000000000..f799e38d8 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-right-arrow-highlighted.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-right-arrow.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-right-arrow.png new file mode 100644 index 000000000..0c661a1c3 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-right-arrow.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-up-arrow-disabled.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-up-arrow-disabled.png new file mode 100644 index 000000000..1eaeff830 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-up-arrow-disabled.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-up-arrow-highlighted.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-up-arrow-highlighted.png new file mode 100644 index 000000000..7cab7d66e Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-up-arrow-highlighted.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-up-arrow.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-up-arrow.png new file mode 100644 index 000000000..fd4fae03d Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-up-arrow.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-knob-bottom.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-knob-bottom.png new file mode 100644 index 000000000..66d2ac683 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-knob-bottom.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-knob-center.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-knob-center.png new file mode 100644 index 000000000..3076a5c7f Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-knob-center.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-knob-top.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-knob-top.png new file mode 100644 index 000000000..6d2e0f78a Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-knob-top.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-track-disabled.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-track-disabled.png new file mode 100644 index 000000000..6c4aec1e9 Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-track-disabled.png differ diff --git a/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-track.png b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-track.png new file mode 100644 index 000000000..6c287198d Binary files /dev/null and b/AppKit/Themes/Aristo/Resources/HUD/scroller-vertical-track.png differ diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index dc75cf4a5..40cf7c279 100644 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -787,6 +787,118 @@ return button; } ++ (CPScroller)themedVerticalScroller +{ + var scroller = [[CPScroller alloc] initWithFrame:CGRectMake(0.0, 0.0, 15.0, 170.0)], + trackColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-track.png" size:CGSizeMake(15.0, 1.0)]), + disabledTrackColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-track-disabled.png" size:CGSizeMake(15.0, 1.0)]); + + [scroller setValue:21.0 forThemeAttribute:@"minimum-knob-length" inState:CPThemeStateVertical]; + [scroller setValue:CGInsetMake(0.0, 0.0, 0.0, 0.0) forThemeAttribute:@"knob-inset" inState:CPThemeStateVertical]; + [scroller setValue:CGInsetMake(-9.0, 0.0, -9.0, 0.0) forThemeAttribute:@"track-inset" inState:CPThemeStateVertical]; + + [scroller setValue:trackColor forThemeAttribute:@"knob-slot-color" inState:CPThemeStateVertical]; + [scroller setValue:disabledTrackColor forThemeAttribute:@"knob-slot-color" inState:CPThemeStateVertical | CPThemeStateDisabled]; + + var arrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-up-arrow.png" size:CGSizeMake(15.0, 24.0)]), + highlightedArrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-up-arrow-highlighted.png" size:CGSizeMake(15.0, 24.0)]), + disabledArrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-up-arrow-disabled.png" size:CGSizeMake(15.0, 24.0)]); + + [scroller setValue:CGSizeMake(15.0, 24.0) forThemeAttribute:@"decrement-line-size" inState:CPThemeStateVertical]; + [scroller setValue:arrowColor forThemeAttribute:@"decrement-line-color" inState:CPThemeStateVertical]; + [scroller setValue:highlightedArrowColor forThemeAttribute:@"decrement-line-color" inState:CPThemeStateVertical | CPThemeStateHighlighted], + [scroller setValue:disabledArrowColor forThemeAttribute:@"decrement-line-color" inState:CPThemeStateVertical | CPThemeStateDisabled]; + + var arrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-down-arrow.png" size:CGSizeMake(15.0, 24.0)]), + highlightedArrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-down-arrow-highlighted.png" size:CGSizeMake(15.0, 24.0)]), + disabledArrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-down-arrow-disabled.png" size:CGSizeMake(15.0, 24.0)]); + + [scroller setValue:CGSizeMake(15.0, 24.0) forThemeAttribute:@"increment-line-size" inState:CPThemeStateVertical]; + [scroller setValue:arrowColor forThemeAttribute:@"increment-line-color" inState:CPThemeStateVertical]; + [scroller setValue:highlightedArrowColor forThemeAttribute:@"increment-line-color" inState:CPThemeStateVertical | CPThemeStateHighlighted]; + [scroller setValue:disabledArrowColor forThemeAttribute:@"increment-line-color" inState:CPThemeStateVertical | CPThemeStateDisabled]; + + var knobColor = PatternColor([[CPThreePartImage alloc] initWithImageSlices: + [ + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-knob-top.png" size:CGSizeMake(15.0, 10.0)], + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-knob-center.png" size:CGSizeMake(15.0, 1.0)], + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-knob-bottom.png" size:CGSizeMake(15.0, 10.0)] + ] + isVertical:YES]); + + var knobDisabledColor = PatternColor([[CPThreePartImage alloc] initWithImageSlices: + [ + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-knob-disabled-top.png" size:CGSizeMake(15.0, 10.0)], + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-knob-disabled-center.png" size:CGSizeMake(15.0, 1.0)], + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-vertical-knob-disabled-bottom.png" size:CGSizeMake(15.0, 10.0)] + ] + isVertical:YES]); + + [scroller setValue:knobColor forThemeAttribute:@"knob-color" inState:CPThemeStateVertical]; + [scroller setValue:knobDisabledColor forThemeAttribute:@"knob-color" inState:CPThemeStateVertical|CPThemeStateDisabled]; + + [scroller setFloatValue:0.1]; + [scroller setKnobProportion:0.5]; + + return scroller; +} + ++ (CPScroller)themedHorizontalScroller +{ + var scroller = [[CPScroller alloc] initWithFrame:CGRectMake(0.0, 0.0, 170.0, 15.0)], + trackColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-track.png" size:CGSizeMake(1.0, 15.0)]), + disabledTrackColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-track-disabled.png" size:CGSizeMake(1.0, 15.0)]); + + [scroller setValue:21.0 forThemeAttribute:@"minimum-knob-length"]; + [scroller setValue:CGInsetMake(0.0, 0.0, 0.0, 0.0) forThemeAttribute:@"knob-inset"]; + [scroller setValue:CGInsetMake(0.0, -7.0, 0.0, -9.0) forThemeAttribute:@"track-inset"]; + + [scroller setValue:trackColor forThemeAttribute:@"knob-slot-color"]; + [scroller setValue:disabledTrackColor forThemeAttribute:@"knob-slot-color" inState:CPThemeStateDisabled]; + + var arrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-left-arrow.png" size:CGSizeMake(24.0, 15.0)]), + highlightedArrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-left-arrow-highlighted.png" size:CGSizeMake(24.0, 15.0)]), + disabledArrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-left-arrow-disabled.png" size:CGSizeMake(24.0, 15.0)]); + + [scroller setValue:CGSizeMake(24.0, 15.0) forThemeAttribute:@"decrement-line-size"]; + [scroller setValue:arrowColor forThemeAttribute:@"decrement-line-color"]; + [scroller setValue:highlightedArrowColor forThemeAttribute:@"decrement-line-color" inState:CPThemeStateHighlighted], + [scroller setValue:disabledArrowColor forThemeAttribute:@"decrement-line-color" inState:CPThemeStateDisabled]; + + var arrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-right-arrow.png" size:CGSizeMake(24.0, 15.0)]), + highlightedArrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-right-arrow-highlighted.png" size:CGSizeMake(24.0, 15.0)]), + disabledArrowColor = PatternColor([_CPCibCustomResource imageResourceWithName:"HUD/scroller-right-arrow-disabled.png" size:CGSizeMake(24.0, 15.0)]); + + [scroller setValue:CGSizeMake(24.0, 15.0) forThemeAttribute:@"increment-line-size"]; + [scroller setValue:arrowColor forThemeAttribute:@"increment-line-color"]; + [scroller setValue:highlightedArrowColor forThemeAttribute:@"increment-line-color" inState:CPThemeStateHighlighted]; + [scroller setValue:disabledArrowColor forThemeAttribute:@"increment-line-color" inState:CPThemeStateDisabled]; + + var knobColor = PatternColor([[CPThreePartImage alloc] initWithImageSlices: + [ + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-left.png" size:CGSizeMake(10.0, 15.0)], + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-center.png" size:CGSizeMake(1.0, 15.0)], + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-right.png" size:CGSizeMake(10.0, 15.0)] + ] + isVertical:NO]); + + var knobDisabledColor = PatternColor([[CPThreePartImage alloc] initWithImageSlices: + [ + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-disabled-left.png" size:CGSizeMake(10.0, 15.0)], + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-disabled-center.png" size:CGSizeMake(1.0, 15.0)], + [_CPCibCustomResource imageResourceWithName:"HUD/scroller-horizontal-knob-disabled-right.png" size:CGSizeMake(10.0, 15.0)] + ] + isVertical:NO]); + + [scroller setValue:knobColor forThemeAttribute:@"knob-color"]; + [scroller setValue:knobDisabledColor forThemeAttribute:@"knob-color" inState:CPThemeStateDisabled]; + + [scroller setFloatValue:0.1]; + [scroller setKnobProportion:0.5]; + + return scroller; +} + @end function PatternColor(anImage)