#include <UIKit/UIKit.h>
+#include <Menes/ObjectHandle.h>
+
@interface UIViewController (Cydia)
- (BOOL) hasLoaded;
- (void) reloadData;
@interface CyteViewController : UIViewController {
_transient id delegate_;
BOOL loaded_;
+ _H<UIColor> color_;
}
// The default implementation of this method is essentially a no-op,
// just happens not to be visible.
- (void) releaseSubviews;
+- (void) setPageColor:(UIColor *)color;
+
@end
#endif//CyteKit_ViewController_H
#include <Foundation/Foundation.h>
#include <UIKit/UIKit.h>
+#include "iPhonePrivate.h"
+
extern bool IsWildcat_;
@implementation UIViewController (Cydia)
return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;
}
+- (void) setPageColor:(UIColor *)color {
+ if (color == nil) {
+ color = [UIColor groupTableViewBackgroundColor];
+ if ([color isEqual:[UIColor clearColor]])
+ color = [UIColor pinStripeColor];
+ //color = [UIColor colorWithRed:(215.0/255.0) green:(217.0/255.0) blue:(223.0/255.0) alpha:1.0];
+ } color_ = color;
+}
+
@end
float width_;
Class class_;
- _H<UIColor> color_;
_H<UIBarButtonItem> reloaditem_;
_H<UIBarButtonItem> loadingitem_;
- (id) initWithWidth:(float)width;
- (id) initWithWidth:(float)width ofClass:(Class)_class;
-- (void) setColor:(UIColor *)color;
-
- (void) callFunction:(WebScriptObject *)function;
- (void) webView:(WebView *)view didClearWindowObject:(WebScriptObject *)window forFrame:(WebFrame *)frame;
if (page == nil) {
CyteWebViewController *browser([[[class_ alloc] init] autorelease]);
- [browser setColor:color_];
[browser setRequest:request];
page = browser;
}
[page setDelegate:delegate_];
+ [page setPageColor:color_];
if (!pop) {
[[self navigationItem] setTitle:title_];
float blue([[rgb blue] getFloatValue:DOM_CSS_NUMBER]);
float alpha([[rgb alpha] getFloatValue:DOM_CSS_NUMBER]);
- uic = [UIColor
- colorWithRed:(red / 255)
- green:(green / 255)
- blue:(blue / 255)
- alpha:alpha
- ];
+ if (alpha == 1)
+ uic = [UIColor
+ colorWithRed:(red / 255)
+ green:(green / 255)
+ blue:(blue / 255)
+ alpha:alpha
+ ];
}
}
- if (uic == nil)
- uic = [UIColor groupTableViewBackgroundColor];
-
- color_ = uic;
- [scroller_ setBackgroundColor:uic];
+ [self setPageColor:uic];
+ [scroller_ setBackgroundColor:color_];
break;
}
}
width_ = width;
class_ = _class;
- color_ = [UIColor groupTableViewBackgroundColor];
+ [self setPageColor:nil];
allowsNavigationAction_ = true;
//[scroller setAllowsRubberBanding:YES];
}
+ [webview_ setOpaque:NO];
+ [webview_ setBackgroundColor:color_];
+
[scroller_ setFixedBackgroundPattern:YES];
[scroller_ setBackgroundColor:color_];
[scroller_ setClipsSubviews:YES];
} return self;
}
-- (void) setColor:(UIColor *)color {
- color_ = color;
-}
-
- (void) callFunction:(WebScriptObject *)function {
WebThreadLocked lock;