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;
|
NSButton *b;
|
||||||
|
|
||||||
// TODO cache the initial rect?
|
b = [[NSButton alloc] initWithFrame:NSZeroRect];
|
||||||
b = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
|
||||||
[b setButtonType:NSMomentaryPushInButton];
|
[b setButtonType:NSMomentaryPushInButton];
|
||||||
[b setBordered:YES];
|
[b setBordered:YES];
|
||||||
[b setBezelStyle:NSRoundedBezelStyle];
|
[b setBezelStyle:NSRoundedBezelStyle];
|
||||||
|
@ -91,7 +90,7 @@ id newCheckbox(void)
|
||||||
{
|
{
|
||||||
NSButton *c;
|
NSButton *c;
|
||||||
|
|
||||||
c = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
c = [[NSButton alloc] initWithFrame:NSZeroRect];
|
||||||
[c setButtonType:NSSwitchButton];
|
[c setButtonType:NSSwitchButton];
|
||||||
[c setBordered:NO];
|
[c setBordered:NO];
|
||||||
setStandardControlFont((id) c);
|
setStandardControlFont((id) c);
|
||||||
|
@ -148,7 +147,7 @@ id newTextField(void)
|
||||||
{
|
{
|
||||||
NSTextField *t;
|
NSTextField *t;
|
||||||
|
|
||||||
t = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
t = [[NSTextField alloc] initWithFrame:NSZeroRect];
|
||||||
return finishNewTextField(t, YES);
|
return finishNewTextField(t, YES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +155,7 @@ id newPasswordField(void)
|
||||||
{
|
{
|
||||||
NSSecureTextField *t;
|
NSSecureTextField *t;
|
||||||
|
|
||||||
t = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
t = [[NSSecureTextField alloc] initWithFrame:NSZeroRect];
|
||||||
return finishNewTextField(toNSTextField(t), YES);
|
return finishNewTextField(toNSTextField(t), YES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +175,7 @@ id newLabel(void)
|
||||||
{
|
{
|
||||||
NSTextField *l;
|
NSTextField *l;
|
||||||
|
|
||||||
l = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
l = [[NSTextField alloc] initWithFrame:NSZeroRect];
|
||||||
[l setEditable:NO];
|
[l setEditable:NO];
|
||||||
[l setSelectable:NO];
|
[l setSelectable:NO];
|
||||||
[l setDrawsBackground:NO];
|
[l setDrawsBackground:NO];
|
||||||
|
|
|
@ -34,7 +34,7 @@ id newContainerView(void *gocontainer)
|
||||||
{
|
{
|
||||||
goContainerView *c;
|
goContainerView *c;
|
||||||
|
|
||||||
c = [[goContainerView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
c = [[goContainerView alloc] initWithFrame:NSZeroRect];
|
||||||
c->gocontainer = gocontainer;
|
c->gocontainer = gocontainer;
|
||||||
return (id) c;
|
return (id) c;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ id newScrollView(id content)
|
||||||
{
|
{
|
||||||
NSScrollView *sv;
|
NSScrollView *sv;
|
||||||
|
|
||||||
sv = [[NSScrollView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
sv = [[NSScrollView alloc] initWithFrame:NSZeroRect];
|
||||||
[sv setDocumentView:toNSView(content)];
|
[sv setDocumentView:toNSView(content)];
|
||||||
[sv setHasHorizontalScroller:YES];
|
[sv setHasHorizontalScroller:YES];
|
||||||
[sv setHasVerticalScroller:YES];
|
[sv setHasVerticalScroller:YES];
|
||||||
|
|
|
@ -11,7 +11,7 @@ id newTab(void)
|
||||||
{
|
{
|
||||||
NSTabView *t;
|
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
|
setStandardControlFont((id) t); // safe; same selector provided by NSTabView
|
||||||
return (id) t;
|
return (id) t;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,7 @@ id newTable(void)
|
||||||
{
|
{
|
||||||
NSTableView *t;
|
NSTableView *t;
|
||||||
|
|
||||||
// TODO makerect
|
t = [[NSTableView alloc] initWithFrame:NSZeroRect];
|
||||||
t = [[NSTableView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)];
|
|
||||||
[t setAllowsColumnReordering:NO];
|
[t setAllowsColumnReordering:NO];
|
||||||
[t setAllowsColumnResizing:YES];
|
[t setAllowsColumnResizing:YES];
|
||||||
// TODO make this an option on all platforms
|
// TODO make this an option on all platforms
|
||||||
|
|
Loading…
Reference in New Issue