Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from RandyMcMillan/10.7a

Creating NSColor Strings so dev can control Colors in application window
  • Loading branch information...
commit 6661880f61de014cca813fa1794bf06371c93d6e 2 parents b4fa695 + 52c390f
@shazron shazron authored
Showing with 19 additions and 1 deletion.
  1. +1 −1  Classes/ContentView.m
  2. +18 −0 phonegap_macAppDelegate.m
View
2  Classes/ContentView.m
@@ -46,7 +46,7 @@ - (void) windowResized:(NSNotification*)notification;
DebugNSLog(@"window width = %f, window height = %f", size.width, size.height);
[self.webView setFrame:NSMakeRect(0, 0, size.width, size.height - [[Utils sharedInstance] titleBarHeight:window])];
- //[self.webView stringByEvaluatingJavaScriptFromString:@"var e = document.createEvent('Events'); e.initEvent('orientationchange', true, false); document.dispatchEvent(e); "];
+ [self.webView stringByEvaluatingJavaScriptFromString:@"var e = document.createEvent('Events'); e.initEvent('orientationchange', true, false); document.dispatchEvent(e); "];
}
View
18 phonegap_macAppDelegate.m
@@ -23,7 +23,25 @@ - (void) applicationWillFinishLaunching:(NSNotification *)aNotification
NSURL* fileUrl = [NSURL fileURLWithPath:[[Utils sharedInstance] pathForResource:kStartPage]];
[self.contentView.webView setMainFrameURL:[fileUrl description]];
+
+ /* useful colors
+ NSColor *red = [NSColor colorWithCalibratedRed:0.918 green:0.000 blue:0.000 alpha:1.000];
+ NSColor *orange = [NSColor colorWithCalibratedRed:0.918 green:0.518 blue:0.000 alpha:1.000];
+ NSColor *yellow = [NSColor colorWithCalibratedRed:0.918 green:0.914 blue:0.000 alpha:1.000];
+ NSColor *green = [NSColor colorWithCalibratedRed:0.000 green:0.918 blue:0.106 alpha:1.000];
+ NSColor *skyBlue = [NSColor colorWithCalibratedRed:0.000 green:0.918 blue:0.906 alpha:1.000];
+ NSColor *blue = [NSColor colorWithCalibratedRed:0.000 green:0.020 blue:0.918 alpha:1.000];
+ NSColor *clearColor = [NSColor clearColor];
+ */
+
+ NSColor *windowBackGroundColor = [NSColor colorWithCalibratedRed:0.918 green:0.918 blue:0.918 alpha:1.000];
+ NSColor *webViewBackGroundColor = [NSColor colorWithCalibratedRed:0.082 green:0.133 blue:0.192 alpha:1.000];
+ [window setBackgroundColor:windowBackGroundColor];
+ [self.contentView.webView setBackgroundColor:webViewBackGroundColor]; //it ignores "WebView" may not respond to 'setBackGroundColor:' @RandyMcMillan
self.window.backgroundColor = [NSColor colorWithCalibratedRed:0.933 green:0.933 blue:0.933 alpha:1.000];
+
+
+
}
- (void) applicationDidFinishLaunching:(NSNotification *)aNotification {
Please sign in to comment.
Something went wrong with that request. Please try again.