+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;
+}
+