Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #134 from stel/high-performance-live-resizing
Browse files Browse the repository at this point in the history
Speedup window live resizing
  • Loading branch information
TimOliver committed Feb 29, 2016
2 parents 55ab7b7 + 1106172 commit 7c8c0e4
Show file tree
Hide file tree
Showing 19 changed files with 242 additions and 342 deletions.
6 changes: 0 additions & 6 deletions RealmBrowser.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
36B669CB1B8B057F00F04AE1 /* RLMObjectLinkSelectionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 36B669CA1B8B057F00F04AE1 /* RLMObjectLinkSelectionViewController.xib */; };
36B669CE1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 36B669CD1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.m */; };
36C3D1FFA6C372B1485F381A /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B4DD42CE427D384E8A7351A0 /* Pods.framework */; settings = {ATTRIBUTES = (Required, ); }; };
420696B41BDE95190000B74A /* RLMTableRowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 420696B31BDE95190000B74A /* RLMTableRowView.m */; };
840F97C0192B7DCE006B591E /* RLMDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 840F97BF192B7DCE006B591E /* RLMDocument.m */; };
84446534195891AA00CEEA5B /* RLMViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84446533195891AA00CEEA5B /* RLMViewController.m */; };
844C34E3194859080027E902 /* TestClasses.m in Sources */ = {isa = PBXBuildFile; fileRef = 844C34E2194859080027E902 /* TestClasses.m */; };
Expand Down Expand Up @@ -142,8 +141,6 @@
36B669CA1B8B057F00F04AE1 /* RLMObjectLinkSelectionViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RLMObjectLinkSelectionViewController.xib; sourceTree = "<group>"; };
36B669CC1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMObjectLinkSelectionViewController.h; sourceTree = "<group>"; };
36B669CD1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMObjectLinkSelectionViewController.m; sourceTree = "<group>"; };
420696B21BDE95190000B74A /* RLMTableRowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMTableRowView.h; sourceTree = "<group>"; };
420696B31BDE95190000B74A /* RLMTableRowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMTableRowView.m; sourceTree = "<group>"; };
840F97BE192B7DCE006B591E /* RLMDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMDocument.h; sourceTree = "<group>"; };
840F97BF192B7DCE006B591E /* RLMDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMDocument.m; sourceTree = "<group>"; };
84446532195891AA00CEEA5B /* RLMViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -321,8 +318,6 @@
221322FC19954B0A00D25737 /* RLMTableCellView.m */,
225443F319E3E6360045996B /* RLMTableHeaderCell.h */,
225443F419E3E6360045996B /* RLMTableHeaderCell.m */,
420696B21BDE95190000B74A /* RLMTableRowView.h */,
420696B31BDE95190000B74A /* RLMTableRowView.m */,
8457294B1962E3860076D4F1 /* RLMTableView.h */,
8457294C1962E3860076D4F1 /* RLMTableView.m */,
225AAFEA19C09E520023B595 /* RLMTextField.h */,
Expand Down Expand Up @@ -719,7 +714,6 @@
225AAFEC19C09E520023B595 /* RLMTextField.m in Sources */,
84D7990C19388E8900FC76A0 /* RLMClassProperty.m in Sources */,
221322FD19954B0A00D25737 /* RLMTableCellView.m in Sources */,
420696B41BDE95190000B74A /* RLMTableRowView.m in Sources */,
22096B2719911F7300233D77 /* RLMBadgeTableCellView.m in Sources */,
228D1F871A1CAD660028562A /* RLMResultsNode.m in Sources */,
8457294D1962E3860076D4F1 /* RLMTableView.m in Sources */,
Expand Down
26 changes: 5 additions & 21 deletions RealmBrowser/Controllers/RLMInstanceTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#import "RLMResultsNode.h"
#import "RLMRealmNode.h"

#import "RLMTableRowView.h"
#import "RLMBadgeTableCellView.h"
#import "RLMBasicTableCellView.h"
#import "RLMBoolTableCellView.h"
Expand Down Expand Up @@ -294,21 +293,6 @@ - (void)tableViewSelectionDidChange:(NSNotification *)notification
}
}

- (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row
{
RLMTableRowView *rowView;

rowView = [tableView makeViewWithIdentifier:@"row" owner:self];

if (!rowView) {
rowView = [[RLMTableRowView alloc] initWithFrame:NSZeroRect];
rowView.identifier = @"row";
rowView.canDrawSubviewsIntoLayer = YES;
}

return rowView;
}

-(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
{
if (tableView != self.tableView) {
Expand Down Expand Up @@ -338,7 +322,7 @@ -(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn
case RLMPropertyTypeArray: {
RLMBadgeTableCellView *badgeCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];
if (!badgeCellView) {
badgeCellView = [RLMBadgeTableCellView makeWithIdentifier:reuseIdentifier];
badgeCellView = [RLMBadgeTableCellView viewWithIdentifier:reuseIdentifier];
}
NSString *string = [realmDescriptions printablePropertyValue:propertyValue ofType:type];
NSDictionary *attr = @{NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle)};
Expand All @@ -358,7 +342,7 @@ -(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn
case RLMPropertyTypeBool: {
RLMBoolTableCellView *boolCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];
if (!boolCellView) {
boolCellView = [RLMBoolTableCellView makeWithIdentifier:reuseIdentifier];
boolCellView = [RLMBoolTableCellView viewWithIdentifier:reuseIdentifier];
boolCellView.checkBox.target = self;
boolCellView.checkBox.action = @selector(editedCheckBox:);
}
Expand All @@ -375,7 +359,7 @@ -(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn
case RLMPropertyTypeDouble: {
RLMNumberTableCellView *numberCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];
if (!numberCellView) {
numberCellView = [RLMNumberTableCellView makeWithIdentifier:reuseIdentifier];
numberCellView = [RLMNumberTableCellView viewWithIdentifier:reuseIdentifier];
numberCellView.textField.delegate = self;
numberCellView.textField.target = self;
numberCellView.textField.action = @selector(editedTextField:);
Expand All @@ -394,7 +378,7 @@ -(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn
case RLMPropertyTypeObject: {
RLMLinkTableCellView *linkCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];
if (!linkCellView) {
linkCellView = [RLMLinkTableCellView makeWithIdentifier:reuseIdentifier];
linkCellView = [RLMLinkTableCellView viewWithIdentifier:reuseIdentifier];
linkCellView.textField.target = self;
linkCellView.textField.action = @selector(editedTextField:);
}
Expand All @@ -415,7 +399,7 @@ -(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn
case RLMPropertyTypeString: {
RLMBasicTableCellView *basicCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];
if (!basicCellView) {
basicCellView = [RLMBasicTableCellView makeWithIdentifier:reuseIdentifier];
basicCellView = [RLMBasicTableCellView viewWithIdentifier:reuseIdentifier];
basicCellView.textField.delegate = self;
basicCellView.textField.target = self;
basicCellView.textField.action = @selector(editedTextField:);
Expand Down
Loading

0 comments on commit 7c8c0e4

Please sign in to comment.