Min size now changes for minimal view.
This commit is contained in:
parent
b671e909db
commit
1f920e8ff7
|
@ -111,12 +111,6 @@ static void sleepCallBack(void * controller, io_service_t y,
|
||||||
[fWindow setToolbar: fToolbar];
|
[fWindow setToolbar: fToolbar];
|
||||||
[fWindow setDelegate: self];
|
[fWindow setDelegate: self];
|
||||||
|
|
||||||
//window min height
|
|
||||||
NSSize contentMinSize = [fWindow contentMinSize];
|
|
||||||
contentMinSize.height = [[fWindow contentView] frame].size.height - [fScrollView frame].size.height
|
|
||||||
+ [fTableView rowHeight] + [fTableView intercellSpacing].height;
|
|
||||||
[fWindow setContentMinSize: contentMinSize];
|
|
||||||
|
|
||||||
//set table size
|
//set table size
|
||||||
if ([fDefaults boolForKey: @"SmallView"])
|
if ([fDefaults boolForKey: @"SmallView"])
|
||||||
{
|
{
|
||||||
|
@ -124,6 +118,12 @@ static void sleepCallBack(void * controller, io_service_t y,
|
||||||
[fSmallViewItem setState: NSOnState];
|
[fSmallViewItem setState: NSOnState];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//window min height
|
||||||
|
NSSize contentMinSize = [fWindow contentMinSize];
|
||||||
|
contentMinSize.height = [[fWindow contentView] frame].size.height - [fScrollView frame].size.height
|
||||||
|
+ [fTableView rowHeight] + [fTableView intercellSpacing].height;
|
||||||
|
[fWindow setContentMinSize: contentMinSize];
|
||||||
|
|
||||||
//set info keyboard shortcuts
|
//set info keyboard shortcuts
|
||||||
unichar ch = NSRightArrowFunctionKey;
|
unichar ch = NSRightArrowFunctionKey;
|
||||||
[fNextInfoTabItem setKeyEquivalent: [NSString stringWithCharacters: & ch length: 1]];
|
[fNextInfoTabItem setKeyEquivalent: [NSString stringWithCharacters: & ch length: 1]];
|
||||||
|
@ -1478,6 +1478,26 @@ static void sleepCallBack(void * controller, io_service_t y,
|
||||||
[fSmallViewItem setState: makeSmall];
|
[fSmallViewItem setState: makeSmall];
|
||||||
|
|
||||||
[fDefaults setBool: makeSmall forKey: @"SmallView"];
|
[fDefaults setBool: makeSmall forKey: @"SmallView"];
|
||||||
|
|
||||||
|
//window min height
|
||||||
|
NSSize contentMinSize = [fWindow contentMinSize],
|
||||||
|
contentSize = [[fWindow contentView] frame].size;
|
||||||
|
contentMinSize.height = contentSize.height - [fScrollView frame].size.height
|
||||||
|
+ [fTableView rowHeight] + [fTableView intercellSpacing].height;
|
||||||
|
[fWindow setContentMinSize: contentMinSize];
|
||||||
|
|
||||||
|
//resize for larger min height
|
||||||
|
if (!makeSmall && contentSize.height < contentMinSize.height)
|
||||||
|
{
|
||||||
|
NSRect frame = [fWindow frame];
|
||||||
|
float heightChange = contentMinSize.height - contentSize.height;
|
||||||
|
frame.size.height += heightChange;
|
||||||
|
frame.origin.y -= heightChange;
|
||||||
|
|
||||||
|
[fWindow setFrame: frame display: YES animate: NO];
|
||||||
|
|
||||||
|
[fTableView reloadData];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) toggleStatusBar: (id) sender
|
- (void) toggleStatusBar: (id) sender
|
||||||
|
|
Loading…
Reference in New Issue