Merge branch 'Aristo2' of github.mv.usa.alcatel.com:amercada/Cappuccino into Aristo2
No files matched your search
@@ -12,7 +12,7 @@
|
||||
+ (id)plusButton
|
||||
{
|
||||
var button = [[CPButton alloc] initWithFrame:CGRectMake(0, 0, 35, 25)],
|
||||
image = [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPButtonBar class]] pathForResource:@"plus_button.png"] size:CGSizeMake(11, 12)];
|
||||
image = [[CPTheme defaultTheme] valueForAttributeWithName:@"button-image-plus" forClass:[CPButtonBar class]];
|
||||
|
||||
[button setBordered:NO];
|
||||
[button setImage:image];
|
||||
@@ -24,7 +24,7 @@
|
||||
+ (id)minusButton
|
||||
{
|
||||
var button = [[CPButton alloc] initWithFrame:CGRectMake(0, 0, 35, 25)],
|
||||
image = [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPButtonBar class]] pathForResource:@"minus_button.png"] size:CGSizeMake(11, 4)];
|
||||
image = [[CPTheme defaultTheme] valueForAttributeWithName:@"button-image-minus" forClass:[CPButtonBar class]];
|
||||
|
||||
[button setBordered:NO];
|
||||
[button setImage:image];
|
||||
@@ -36,7 +36,7 @@
|
||||
+ (id)actionPopupButton
|
||||
{
|
||||
var button = [[CPPopUpButton alloc] initWithFrame:CGRectMake(0, 0, 35, 25)],
|
||||
image = [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPButtonBar class]] pathForResource:@"action_button.png"] size:CGSizeMake(22, 14)];
|
||||
image = [[CPTheme defaultTheme] valueForAttributeWithName:@"button-image-action" forClass:[CPButtonBar class]];
|
||||
|
||||
[button addItemWithTitle:nil];
|
||||
[[button lastItem] setImage:image];
|
||||
@@ -55,8 +55,24 @@
|
||||
|
||||
+ (id)themeAttributes
|
||||
{
|
||||
return [CPDictionary dictionaryWithObjects:[CGInsetMake(0.0, 0.0, 0.0, 0.0), CGSizeMakeZero(), [CPNull null], [CPNull null], [CPNull null], [CPNull null]]
|
||||
forKeys:[@"resize-control-inset", @"resize-control-size", @"resize-control-color", @"bezel-color", @"button-bezel-color", @"button-text-color"]];
|
||||
return [CPDictionary dictionaryWithObjects:[ CGInsetMake(0.0, 0.0, 0.0, 0.0),
|
||||
CGSizeMakeZero(),
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null]]
|
||||
forKeys:[ @"resize-control-inset",
|
||||
@"resize-control-size",
|
||||
@"resize-control-color",
|
||||
@"bezel-color",
|
||||
@"button-bezel-color",
|
||||
@"button-text-color",
|
||||
@"button-image-plus",
|
||||
@"button-image-minus",
|
||||
@"button-image-action"]];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)aFrame
|
||||
|
||||
@@ -260,8 +260,26 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
*/
|
||||
+ (id)themeAttributes
|
||||
{
|
||||
return [CPDictionary dictionaryWithObjects:[[CPNull null], [CPNull null], [CPNull null], [CPNull null], [CPNull null], [CPNull null], [CPNull null], [CPNull null], 25.0]
|
||||
forKeys:["alternating-row-colors", "grid-color", "highlighted-grid-color", "selection-color", "sourcelist-selection-color", "sort-image", "sort-image-reversed", "selection-radius", "default-row-height"]];
|
||||
return [CPDictionary dictionaryWithObjects:[[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
[CPNull null],
|
||||
25.0]
|
||||
forKeys:[@"alternating-row-colors",
|
||||
@"grid-color",
|
||||
@"highlighted-grid-color",
|
||||
@"selection-color",
|
||||
@"sourcelist-selection-color",
|
||||
@"sort-image",
|
||||
@"sort-image-reversed",
|
||||
@"selection-radius",
|
||||
@"image-generic-file",
|
||||
@"default-row-height"]];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)aFrame
|
||||
@@ -2803,7 +2821,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
*/
|
||||
- (CPImage)dragImageForRowsWithIndexes:(CPIndexSet)dragRows tableColumns:(CPArray)theTableColumns event:(CPEvent)dragEvent offset:(CGPoint)dragImageOffset
|
||||
{
|
||||
return [[CPImage alloc] initWithContentsOfFile:@"Frameworks/AppKit/Resources/GenericFile.png" size:CGSizeMake(32,32)];
|
||||
return [self valueForThemeAttribute:@"image-generic-file"];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -90,9 +90,9 @@ var _CPCibCustomResourceClassNameKey = @"_CPCibCustomResourceClassNameKey",
|
||||
if (_className === @"CPImage")
|
||||
{
|
||||
if (_resourceName == "CPAddTemplate")
|
||||
return [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPButtonBar class]] pathForResource:@"plus_button.png"] size:CGSizeMake(11, 12)];
|
||||
return [[CPTheme defaultTheme] valueForAttributeWithName:@"button-image-plus" forClass:[CPButtonBar class]];
|
||||
else if (_resourceName == "CPRemoveTemplate")
|
||||
return [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPButtonBar class]] pathForResource:@"minus_button.png"] size:CGSizeMake(11, 4)];
|
||||
return [[CPTheme defaultTheme] valueForAttributeWithName:@"button-image-minus" forClass:[CPButtonBar class]];
|
||||
|
||||
return [self imageFromBundle:[aCoder bundle]];
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 352 B |
|
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 71 B |
|
Before Width: | Height: | Size: 92 B After Width: | Height: | Size: 92 B |
|
Before Width: | Height: | Size: 804 B After Width: | Height: | Size: 804 B |
@@ -1217,7 +1217,11 @@ var themedButtonValues = nil,
|
||||
["buttonbar-button-bezel-disabled-center.png", 1.0, 25.0],
|
||||
["buttonbar-button-bezel-disabled-right.png", 2.0, 25.0]
|
||||
],
|
||||
PatternIsHorizontal);
|
||||
PatternIsHorizontal),
|
||||
|
||||
buttonImagePlus = PatternImage("buttonbar-image-plus.png", 11.0, 12.0),
|
||||
buttonImageMinus = PatternImage("buttonbar-image-minus.png", 11.0, 4.0),
|
||||
buttonImageAction = PatternImage("buttonbar-image-action.png", 22.0, 14.0),
|
||||
|
||||
themedButtonBarValues =
|
||||
[
|
||||
@@ -1230,7 +1234,11 @@ var themedButtonValues = nil,
|
||||
[@"button-bezel-color", buttonBezelColor],
|
||||
[@"button-bezel-color", buttonBezelHighlightedColor, CPThemeStateHighlighted],
|
||||
[@"button-bezel-color", buttonBezelDisabledColor, CPThemeStateDisabled],
|
||||
[@"button-text-color", [CPColor blackColor]]
|
||||
[@"button-text-color", [CPColor blackColor]],
|
||||
|
||||
[@"button-image-plus", buttonImagePlus],
|
||||
[@"button-image-minus", buttonImageMinus],
|
||||
[@"button-image-action", buttonImageAction]
|
||||
];
|
||||
|
||||
[self registerThemeValues:themedButtonBarValues forView:buttonBar];
|
||||
@@ -1310,6 +1318,7 @@ var themedButtonValues = nil,
|
||||
|
||||
sortImage = PatternImage("tableview-headerview-ascending.png", 9.0, 8.0),
|
||||
sortImageReversed = PatternImage("tableview-headerview-descending.png", 9.0, 8.0),
|
||||
imageGenericFile = PatternImage("tableview-image-generic-file.png", 64.0, 64.0),
|
||||
alternatingRowColors = [[CPColor whiteColor], [CPColor colorWithRed:245.0 / 255.0 green:249.0 / 255.0 blue:252.0 / 255.0 alpha:1.0]],
|
||||
gridColor = [CPColor colorWithHexString:@"dce0e2"],
|
||||
selectionColor = [CPColor colorWithHexString:@"5780d8"],
|
||||
@@ -1328,6 +1337,7 @@ var themedButtonValues = nil,
|
||||
[@"sourcelist-selection-color", sourceListSelectionColor],
|
||||
[@"sort-image", sortImage],
|
||||
[@"sort-image-reversed", sortImageReversed],
|
||||
[@"image-generic-file", imageGenericFile],
|
||||
[@"default-row-height", 25.0],
|
||||
];
|
||||
|
||||
|
||||
@@ -39,9 +39,8 @@ CPLogRegister(CPLogConsole);
|
||||
|
||||
- (void)awakeFromCib
|
||||
{
|
||||
var path = [[CPBundle bundleForClass:[CPView class]] pathForResource:@"action_button.png"];
|
||||
[imageButton setImage:[[CPImage alloc] initWithContentsOfFile:path size:CGSizeMake(22.0, 14.0)]];
|
||||
[imageDisabledButton setImage:[[CPImage alloc] initWithContentsOfFile:path size:CGSizeMake(22.0, 14.0)]];
|
||||
[imageButton setImage:[[CPTheme defaultTheme] valueForAttributeWithName:@"button-image-action" forClass:[CPButtonBar class]]];
|
||||
[imageDisabledButton setImage:[[CPTheme defaultTheme] valueForAttributeWithName:@"button-image-action" forClass:[CPButtonBar class]]];
|
||||
|
||||
[self _setImagePosition:CPImageLeft];
|
||||
[positionMenu selectItemAtIndex:CPImageLeft];
|
||||
|
||||