Removed the NSMakeRect(0, 0, 100, 100) dummy init rect from the Mac OS X backend; NSZeroRect works fine for this after all. Thanks to jer in irc.freenode.net/#macdev.
This commit is contained in:
parent
46bb97cb75
commit
3dcdd05562
|
@ -58,8 +58,7 @@ id newButton(void)
|
|||
{
|
||||
NSButton *b;
|
||||
|
||||
// TODO cache the initial rect?
|
||||
b = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
b = [[NSButton alloc] initWithFrame:NSZeroRect];
|
||||
[b setButtonType:NSMomentaryPushInButton];
|
||||
[b setBordered:YES];
|
||||
[b setBezelStyle:NSRoundedBezelStyle];
|
||||
|
@ -91,7 +90,7 @@ id newCheckbox(void)
|
|||
{
|
||||
NSButton *c;
|
||||
|
||||
c = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
c = [[NSButton alloc] initWithFrame:NSZeroRect];
|
||||
[c setButtonType:NSSwitchButton];
|
||||
[c setBordered:NO];
|
||||
setStandardControlFont((id) c);
|
||||
|
@ -148,7 +147,7 @@ id newTextField(void)
|
|||
{
|
||||
NSTextField *t;
|
||||
|
||||
t = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
t = [[NSTextField alloc] initWithFrame:NSZeroRect];
|
||||
return finishNewTextField(t, YES);
|
||||
}
|
||||
|
||||
|
@ -156,7 +155,7 @@ id newPasswordField(void)
|
|||
{
|
||||
NSSecureTextField *t;
|
||||
|
||||
t = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
t = [[NSSecureTextField alloc] initWithFrame:NSZeroRect];
|
||||
return finishNewTextField(toNSTextField(t), YES);
|
||||
}
|
||||
|
||||
|
@ -176,7 +175,7 @@ id newLabel(void)
|
|||
{
|
||||
NSTextField *l;
|
||||
|
||||
l = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
l = [[NSTextField alloc] initWithFrame:NSZeroRect];
|
||||
[l setEditable:NO];
|
||||
[l setSelectable:NO];
|
||||
[l setDrawsBackground:NO];
|
||||
|
|
|
@ -34,7 +34,7 @@ id newContainerView(void *gocontainer)
|
|||
{
|
||||
goContainerView *c;
|
||||
|
||||
c = [[goContainerView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
c = [[goContainerView alloc] initWithFrame:NSZeroRect];
|
||||
c->gocontainer = gocontainer;
|
||||
return (id) c;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ id newScrollView(id content)
|
|||
{
|
||||
NSScrollView *sv;
|
||||
|
||||
sv = [[NSScrollView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
sv = [[NSScrollView alloc] initWithFrame:NSZeroRect];
|
||||
[sv setDocumentView:toNSView(content)];
|
||||
[sv setHasHorizontalScroller:YES];
|
||||
[sv setHasVerticalScroller:YES];
|
||||
|
|
|
@ -11,7 +11,7 @@ id newTab(void)
|
|||
{
|
||||
NSTabView *t;
|
||||
|
||||
t = [[NSTabView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
t = [[NSTabView alloc] initWithFrame:NSZeroRect];
|
||||
setStandardControlFont((id) t); // safe; same selector provided by NSTabView
|
||||
return (id) t;
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@ id newTable(void)
|
|||
{
|
||||
NSTableView *t;
|
||||
|
||||
// TODO makerect
|
||||
t = [[NSTableView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
||||
t = [[NSTableView alloc] initWithFrame:NSZeroRect];
|
||||
[t setAllowsColumnReordering:NO];
|
||||
[t setAllowsColumnResizing:YES];
|
||||
// TODO make this an option on all platforms
|
||||
|
|
Loading…
Reference in New Issue