The factory method +[NSButton buttonWithTitle:target:action:] creates buttons with NSRoundedBezelStyle bezels:
|
[button setBezelStyle: NSRoundedBezelStyle]; |
Apparently, the goal to match macOS AppKit, which created rounded bezel buttons. Unfortunately, this leads to major difference with macOS AppKit. On macOS, the rounded bezel button is the default, so the following two buttons look the same:
NSButton *btn1 = [NSButton new];
[btn1 setTitle: @"Dummy"];
NSButton *btn2 = [NSButton buttonWithTitle: @"Dummy" target: nil action: NULL];
On GNUstep, though, they look different.
I don't question the goal of matching macOS AppKit here. But my expectation for "matching macOS AppKit" is for the new method to be just a convenience method to create the same kind of buttons as the traditional initializer does, as in AppKit.
If the current GNUstep implementation stands, paradoxically, I'll need to introduce #ifdef GNUSTEP conditions in my codebase to match the AppKit behavior.
The factory method
+[NSButton buttonWithTitle:target:action:]creates buttons with NSRoundedBezelStyle bezels:libs-gui/Source/NSButton.m
Line 94 in 1f1cd54
Apparently, the goal to match macOS AppKit, which created rounded bezel buttons. Unfortunately, this leads to major difference with macOS AppKit. On macOS, the rounded bezel button is the default, so the following two buttons look the same:
On GNUstep, though, they look different.
I don't question the goal of matching macOS AppKit here. But my expectation for "matching macOS AppKit" is for the new method to be just a convenience method to create the same kind of buttons as the traditional initializer does, as in AppKit.
If the current GNUstep implementation stands, paradoxically, I'll need to introduce
#ifdef GNUSTEPconditions in my codebase to match the AppKit behavior.