mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 13:07:02 +00:00
Make the names in +themeShowcaseExcludes case-insensitive
This commit is contained in:
committed by
Alexander Ljungberg
parent
6b940116be
commit
be36e17bd8
@@ -165,11 +165,12 @@ var themedButtonValues = nil,
|
||||
|
||||
+ (CPArray)themeShowcaseExcludes
|
||||
{
|
||||
return ["themedAlert", "cornerView", "tableDataView"];
|
||||
return ["themedAlert", "cornerview", "tableDataView"];
|
||||
}
|
||||
|
||||
Note that to make it easier to do the right thing, the names in the array can begin with "themed" or not.
|
||||
If the name does not begin with "themed", it is prepended and the first character uppercased if it is not there.
|
||||
If the name does not begin with "themed", it is prepended. Name matching is case-insensitive, so you
|
||||
don't have to worry about capitalization.
|
||||
|
||||
|
||||
SUBTHEMES
|
||||
|
||||
@@ -146,10 +146,12 @@ var ItemSizes = { },
|
||||
|
||||
for (; index < excludes.length; ++index)
|
||||
{
|
||||
var name = excludes[index];
|
||||
var name = excludes[index].toLowerCase();
|
||||
|
||||
if (name && name.indexOf("themed") !== 0)
|
||||
excludes[index] = "themed" + name.charAt(0).toUpperCase() + name.substr(1);
|
||||
excludes[index] = "themed" + name;
|
||||
else
|
||||
excludes[index] = name;
|
||||
}
|
||||
|
||||
for (index = 0; index < count; ++index)
|
||||
@@ -167,7 +169,7 @@ var ItemSizes = { },
|
||||
continue;
|
||||
|
||||
var template = [[BKThemedObjectTemplate alloc] init],
|
||||
excluded = [excludes containsObject:selector];
|
||||
excluded = [excludes containsObject:selector.toLowerCase()];
|
||||
|
||||
[template setValue:object forKey:@"themedObject"];
|
||||
[template setValue:BKLabelFromIdentifier(selector) forKey:@"label"];
|
||||
|
||||
Reference in New Issue
Block a user