mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-30 15:33:35 +00:00
move selection color to the themes
This commit is contained in:
+6
-4
@@ -100,8 +100,10 @@ var cachedBlackColor,
|
||||
+ (CPDictionary)themeAttributes
|
||||
{
|
||||
return @{
|
||||
@"alternate-selected-control-color": [CPNull null],
|
||||
@"secondary-selected-control-color" : [CPNull null]
|
||||
@"alternate-selected-control-color": [CPNull null],
|
||||
@"secondary-selected-control-color": [CPNull null],
|
||||
@"selected-text-background-color": [CPNull null],
|
||||
@"selected-text-inactive-background-color": [CPNull null]
|
||||
};
|
||||
}
|
||||
|
||||
@@ -500,12 +502,12 @@ var cachedBlackColor,
|
||||
|
||||
+ (CPColor)selectedTextBackgroundColor
|
||||
{
|
||||
return [CPColor colorWithHexString:"99CCFF"];
|
||||
return [[self _cachedThemeColor] valueForThemeAttribute:@"selected-text-background-color"];
|
||||
}
|
||||
|
||||
+ (CPColor)_selectedTextBackgroundColorUnfocussed
|
||||
{
|
||||
return [CPColor colorWithHexString:"CCCCCC"];
|
||||
return [[self _cachedThemeColor] valueForThemeAttribute:@"selected-text-inactive-background-color"];
|
||||
}
|
||||
|
||||
/* @ignore */
|
||||
|
||||
@@ -389,8 +389,11 @@ var themedButtonValues = nil,
|
||||
var color = [CPColor blackColor],
|
||||
themedColorValues =
|
||||
[
|
||||
[@"alternate-selected-control-color", [[CPColor alloc] _initWithRGBA:[0.22, 0.46, 0.84, 1.0]]],
|
||||
[@"secondary-selected-control-color", [[CPColor alloc] _initWithRGBA:[0.83, 0.83, 0.83, 1.0]]]
|
||||
[@"alternate-selected-control-color", [[CPColor alloc] _initWithRGBA:[0.22, 0.46, 0.84, 1.0]]],
|
||||
[@"secondary-selected-control-color", [[CPColor alloc] _initWithRGBA:[0.83, 0.83, 0.83, 1.0]]],
|
||||
[@"selected-text-background-color", [CPColor colorWithHexString:"99CCFF"]],
|
||||
[@"selected-text-inactive-background-color", [CPColor colorWithHexString:"CCCCCC"]]
|
||||
|
||||
];
|
||||
|
||||
[self registerThemeValues:themedColorValues forObject:color];
|
||||
|
||||
@@ -106,8 +106,10 @@ var themedButtonValues = nil,
|
||||
var color = [CPColor redColor],
|
||||
themedColorValues =
|
||||
[
|
||||
[@"alternate-selected-control-color", [[CPColor alloc] _initWithRGBA:[0.22, 0.46, 0.84, 1.0]]],
|
||||
[@"secondary-selected-control-color", [[CPColor alloc] _initWithRGBA:[0.83, 0.83, 0.83, 1.0]]]
|
||||
[@"alternate-selected-control-color", [[CPColor alloc] _initWithRGBA:[0.22, 0.46, 0.84, 1.0]]],
|
||||
[@"secondary-selected-control-color", [[CPColor alloc] _initWithRGBA:[0.83, 0.83, 0.83, 1.0]]],
|
||||
[@"selected-text-background-color", [CPColor colorWithHexString:"99CCFF"]],
|
||||
[@"selected-text-inactive-background-color", [CPColor colorWithHexString:"CCCCCC"]]
|
||||
];
|
||||
|
||||
[self registerThemeValues:themedColorValues forObject:color];
|
||||
|
||||
@@ -32,19 +32,19 @@
|
||||
_textView = [[CPTextView alloc] initWithFrame:CGRectMake(0,0,500,500)];
|
||||
[_textView setRichText:YES];
|
||||
|
||||
// _textView2 = [[CPTextView alloc] initWithFrame:CGRectMake(0,0,500,500)];
|
||||
// _textView2._isRichText = NO;
|
||||
// [_textView setBackgroundColor:[CPColor whiteColor]];
|
||||
// [_textView2 setBackgroundColor:[CPColor whiteColor]];
|
||||
//
|
||||
_textView2 = [[CPTextView alloc] initWithFrame:CGRectMake(0,0,500,500)];
|
||||
_textView2._isRichText = NO;
|
||||
[_textView setBackgroundColor:[CPColor whiteColor]];
|
||||
[_textView2 setBackgroundColor:[CPColor whiteColor]];
|
||||
|
||||
var scrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(20, 20,520,510)];
|
||||
// var scrollView2 = [[CPScrollView alloc] initWithFrame:CGRectMake(560, 20,520,510)];
|
||||
// // [scrollView setAutohidesScrollers:YES];
|
||||
var scrollView2 = [[CPScrollView alloc] initWithFrame:CGRectMake(560, 20,520,510)];
|
||||
// [scrollView setAutohidesScrollers:YES];
|
||||
[scrollView setDocumentView:_textView];
|
||||
// [scrollView2 setDocumentView:_textView2];
|
||||
//
|
||||
[scrollView2 setDocumentView:_textView2];
|
||||
//
|
||||
[contentView addSubview: scrollView];
|
||||
// [contentView addSubview: scrollView2];
|
||||
[contentView addSubview: scrollView2];
|
||||
//
|
||||
// [_textView setDelegate:self];
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user