mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-24 00:58:53 +00:00
AppKit: CPScreen, CPColor PLATFORM conditional removal
- CPScreen.j and CPColor.j: one PLATFORM block each, resolved to runtime CPDOMAvailable guards; no preprocessor directives remain in either file - work-in-progress towards complete removal of CPP directives
This commit is contained in:
1 parent
01476c53ac
commit
159a82e077
2 files changed
+7
-7
No files matched your search
+4
-3
@@ -563,9 +563,10 @@ var cachedBlackColor,
|
||||
{
|
||||
// Fix to avoid a problem when compiling a theme (missing the alpha component as theme compiler doesn't have CSS rgba capability)
|
||||
var hasAlpha = YES;
|
||||
#if PLATFORM(DOM)
|
||||
hasAlpha = CPFeatureIsCompatible(CPCSSRGBAFeature) && _components[3] != 1.0;
|
||||
#endif
|
||||
if (CPDOMAvailable)
|
||||
{
|
||||
hasAlpha = CPFeatureIsCompatible(CPCSSRGBAFeature) && _components[3] != 1.0;
|
||||
}
|
||||
|
||||
_cssString = (hasAlpha ? "rgba(" : "rgb(") +
|
||||
parseInt(_components[0] * 255.0) + ", " +
|
||||
|
||||
+3
-4
@@ -42,11 +42,10 @@
|
||||
*/
|
||||
- (CGRect)visibleFrame
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
return CGRectMake(window.screen.availLeft, window.screen.availTop, window.screen.availWidth, window.screen.availHeight);
|
||||
#else
|
||||
if (CPDOMAvailable)
|
||||
return CGRectMake(window.screen.availLeft, window.screen.availTop, window.screen.availWidth, window.screen.availHeight);
|
||||
|
||||
return CGRectMakeZero();
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user