mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-16 21:41:18 +00:00
Fix for pattern images not being displayed correctly under the new background color system
This commit is contained in:
1 parent
0cf86318ce
commit
af11b4e423
2 files changed
+6
-6
No files matched your search
+5
-5
@@ -459,7 +459,7 @@ var cachedBlackColor,
|
||||
{
|
||||
_patternImage = anImage;
|
||||
_cssString = "url(\"" + [_patternImage filename] + "\")";
|
||||
_components = [];
|
||||
_components = [0.0, 0.0, 0.0, 1.0];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -478,7 +478,7 @@ var cachedBlackColor,
|
||||
*/
|
||||
- (float)alphaComponent
|
||||
{
|
||||
return _components[3] || 0.0;
|
||||
return _components[3];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -486,7 +486,7 @@ var cachedBlackColor,
|
||||
*/
|
||||
- (float)blueComponent
|
||||
{
|
||||
return _components[2] || 0.0;
|
||||
return _components[2];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -494,7 +494,7 @@ var cachedBlackColor,
|
||||
*/
|
||||
- (float)greenComponent
|
||||
{
|
||||
return _components[1] || 0.0;
|
||||
return _components[1];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -502,7 +502,7 @@ var cachedBlackColor,
|
||||
*/
|
||||
- (float)redComponent
|
||||
{
|
||||
return _components[0] || 0.0;
|
||||
return _components[0];
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
+1
-1
@@ -1322,7 +1322,7 @@ var CPViewFlags = { },
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
var patternImage = [_backgroundColor patternImage],
|
||||
colorExists = _backgroundColor && [_backgroundColor alphaComponent] > 0.0,
|
||||
colorExists = _backgroundColor && ([_backgroundColor patternImage] || [_backgroundColor alphaComponent] > 0.0),
|
||||
colorHasAlpha = colorExists && [_backgroundColor alphaComponent] < 1.0,
|
||||
supportsRGBA = CPFeatureIsCompatible(CPCSSRGBAFeature),
|
||||
colorNeedsDOMElement = colorHasAlpha && !supportsRGBA,
|
||||
|
||||
Reference in new issue
Block a user