# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1322870200 0 # Node ID fabf23bdc7fb3c8432c70876b9a0cf854a57428b # Parent 8827e9b14b402834e601a7dd13d9f429d152509d New Mac image button handling code was catching checkboxes/radiobuttons as well. diff -r 8827e9b14b40 -r fabf23bdc7fb mac/dw.m --- a/mac/dw.m Fri Dec 02 23:50:01 2011 +0000 +++ b/mac/dw.m Fri Dec 02 23:56:40 2011 +0000 @@ -3552,28 +3552,30 @@ /* Handle all the different button types */ if([ object isKindOfClass:[ NSButton class ] ]) { - NSImage *image = [object image]; - - if(image) - { - /* Image button */ - NSSize size = [image size]; - thiswidth = (int)size.width; - thisheight = (int)size.height; - } - else - { - /* Text button */ - nsstr = [object title]; - - switch([object buttonType]) + switch([object buttonType]) + { + case NSSwitchButton: + case NSRadioButton: + extrawidth = 24; + extraheight = 4; + nsstr = [object title]; + break; + default: { - case NSSwitchButton: - case NSRadioButton: - extrawidth = 24; - extraheight = 4; - break; - default: + NSImage *image = [object image]; + + if(image) + { + /* Image button */ + NSSize size = [image size]; + thiswidth = (int)size.width; + thisheight = (int)size.height; + } + else + { + /* Text button */ + nsstr = [object title]; + if([object isBordered]) { extrawidth = 30; @@ -3584,7 +3586,8 @@ extrawidth = 8; extraheight = 4; } - break; + } + break; } } }