X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=OSX%2FSaverListController.m;h=15b3089dffc4575f4e08814f2a9798ea510797ae;hp=e0abeca61db2eead825090e704b44aad8241ade9;hb=8afc01a67be4fbf3f1cc0fce9adf01b5289a21c6;hpb=3f1091236d800c43a3124c44c7da54e53f205b13 diff --git a/OSX/SaverListController.m b/OSX/SaverListController.m index e0abeca6..15b3089d 100644 --- a/OSX/SaverListController.m +++ b/OSX/SaverListController.m @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 2012-2013 Jamie Zawinski +/* xscreensaver, Copyright (c) 2012-2014 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -59,14 +59,15 @@ [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent: @"iSaverRunner29t.png"]]; - UIBarButtonItem *button = [[[UIBarButtonItem alloc] - initWithImage: img - style: UIBarButtonItemStylePlain - target: self - action: @selector(titleTapped:)] - autorelease]; - button.width = img.size.width; - self.navigationItem.rightBarButtonItem = button; + UIButton *button = [[UIButton alloc] init]; + [button setFrame: CGRectMake(0, 0, img.size.width, img.size.height)]; + [button setBackgroundImage:img forState:UIControlStateNormal]; + [button addTarget:self + action:@selector(titleTapped:) + forControlEvents:UIControlEventTouchUpInside]; + self.navigationItem.rightBarButtonItem = + [[UIBarButtonItem alloc] initWithCustomView: button]; + [button release]; // The title bar