Revision: 5810
http://skim-app.svn.sourceforge.net/skim-app/?rev=5810&view=rev
Author: hofman
Date: 2009-09-24 18:31:01 +0000 (Thu, 24 Sep 2009)
Log Message:
-----------
simplify code for rowheight of note table
Modified Paths:
--------------
trunk/SKMainWindowController_UI.m
trunk/SKNotesDocument.m
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2009-09-24 17:26:14 UTC (rev 5809)
+++ trunk/SKMainWindowController_UI.m 2009-09-24 18:31:01 UTC (rev 5810)
@@ -758,12 +758,8 @@
- (CGFloat)outlineView:(NSOutlineView *)ov heightOfRowByItem:(id)item {
if ([ov isEqual:noteOutlineView]) {
- CGFloat rowHeight = 0.0;
- if ([rowHeights hasKey:item])
- rowHeight = [rowHeights floatForKey:item];
- else if ([item type] == nil)
- rowHeight = 85.0;
- return rowHeight > 0.0 ? rowHeight : [ov rowHeight] + 2.0;
+ CGFloat rowHeight = [rowHeights floatForKey:item];
+ return (rowHeight > 0.0 ? rowHeight : ([item type] ? [ov rowHeight] +
2.0 : 85.0));
}
return [ov rowHeight];
}
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2009-09-24 17:26:14 UTC (rev 5809)
+++ trunk/SKNotesDocument.m 2009-09-24 18:31:01 UTC (rev 5810)
@@ -528,12 +528,8 @@
}
- (CGFloat)outlineView:(NSOutlineView *)ov heightOfRowByItem:(id)item {
- CGFloat rowHeight = 0.0;
- if ([rowHeights hasKey:item])
- rowHeight = [rowHeights floatForKey:item];
- else if ([item type] == nil)
- rowHeight = 85.0;
- return rowHeight > 0.0 ? rowHeight : [ov rowHeight] + 2.0;
+ CGFloat rowHeight = [rowHeights floatForKey:item];
+ return (rowHeight > 0.0 ? rowHeight : ([item type] ? [ov rowHeight] + 2.0
: 85.0));
}
- (BOOL)outlineView:(NSOutlineView *)ov canResizeRowByItem:(id)item {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit