Class $SBIconLabel;
Class $SBIconList;
Class $SBIconModel;
+Class $SBIconView;
//Class $SBImageCache;
Class $SBSearchView;
Class $SBSearchTableViewCell;
Class $SBUIController;
Class $SBWidgetApplicationIcon;
+#define SBIconView SBIcon
+
static bool IsWild_;
static bool Four_;
@end
/* }}} */
+MSHook(void, SBIconView$setIconImageAlpha$, SBIconView *self, SEL sel, float alpha) {
+ if (NSNumber *number = [Info_ objectForKey:@"IconAlpha"])
+ alpha = [number floatValue];
+ return _SBIconView$setIconImageAlpha$(self, sel, alpha);
+}
+
+MSHook(void, SBIconView$setIconLabelAlpha$, SBIconView *self, SEL sel, float alpha) {
+ if (NSNumber *number = [Info_ objectForKey:@"IconAlpha"])
+ alpha = [number floatValue];
+ return _SBIconView$setIconLabelAlpha$(self, sel, alpha);
+}
+
+MSHook(id, SBIconView$initWithDefaultSize, SBIconView *self, SEL sel) {
+ if ((self = _SBIconView$initWithDefaultSize(self, sel)) != nil) {
+ if (NSNumber *number = [Info_ objectForKey:@"IconAlpha"]) {
+ // XXX: note: this is overridden above, which is silly
+ float alpha([number floatValue]);
+ [self setIconImageAlpha:alpha];
+ [self setIconLabelAlpha:alpha];
+ }
+ } return self;
+}
+
MSHook(void, SBIcon$setAlpha$, SBIcon *self, SEL sel, float alpha) {
if (NSNumber *number = [Info_ objectForKey:@"IconAlpha"])
alpha = [number floatValue];
$SBIconLabel = objc_getClass("SBIconLabel");
$SBIconList = objc_getClass("SBIconList");
$SBIconModel = objc_getClass("SBIconModel");
+ $SBIconView = objc_getClass("SBIconView");
//$SBImageCache = objc_getClass("SBImageCache");
$SBSearchView = objc_getClass("SBSearchView");
$SBSearchTableViewCell = objc_getClass("SBSearchTableViewCell");
$SBUIController = objc_getClass("SBUIController");
$SBWidgetApplicationIcon = objc_getClass("SBWidgetApplicationIcon");
+ if ($SBIconView == nil)
+ $SBIconView = $SBIcon;
+
Four_ = $SBDockIconListView != nil;
WBRename(WebCoreFrameBridge, renderedSizeOfNode:constrainedToWidth:, renderedSizeOfNode$constrainedToWidth$);
WBRename(SBIcon, setAlpha:, setAlpha$);
WBRename(SBIconBadge, initWithBadge:, initWithBadge$);
WBRename(SBIconController, noteNumberOfIconListsChanged, noteNumberOfIconListsChanged);
+ WBRename(SBIconView, initWithDefaultSize, initWithDefaultSize);
+ WBRename(SBIconView, setIconImageAlpha:, setIconImageAlpha$);
+ WBRename(SBIconView, setIconLabelAlpha:, setIconLabelAlpha$);
WBRename(SBUIController, init, init);
WBRename(SBWidgetApplicationIcon, icon, icon);