Files
cappuccino/AppKit
Aparajita Fishman 5b62773a39 Fixed: off-by-one in row calculation caused drawing problems with variable-height rows in CPTableView.
Previously, if the last row's height was increased, empty rows below would not be pushed down. This was due to an off-by-one in -_unboundedRowsInRect (now _exposedRowsInRect) which caused the incorrect rect of the last row to be retrieved.

This commit fixes that bug and also makes the following changes:

- Added FULL_ROW_HEIGHT(), ROW_BOTTOM() and HAS_VARIABLE_ROW_HEIGHTS() macros to make the code clearer.
- Documentation cleanup.
- Eliminated some intermediate variables.
- Rewrote -_rectOfRow to reduce redundant code and fixed some logic errors.
- Renamed some variables to make their intention clearer (to me at least).
- Added an out of bounds check in -rowAtPoint: before doing the relatively expensive binary search.
- In -noteHeightOfRowsWithIndexesChanged:, the first valid index is used instead of the first index (which might be invalid).
- Fixed a bug in -noteHeightOfRowsWithIndexesChanged: where row height was not set correctly if a row was not in the index set.
- Fixed incorrect use of CEIL in -_unboundedRowsInRect, it was wrapped around the divisor instead of the entire expression.
- Fixed drawBackgroundInClipRect: drawing one too many rows.
- Fixed -rowAtPoint not checking for x in bounds.

BREAKING CHANGE:
Previously, CPTableView -rowAtPoint would incorrectly return a valid row index when the x value was outside of the table's bounds. Now an out of bounds x value will return -1, which is consistent with Cocoa (and the intent of the method).
2013-07-25 10:48:11 -04:00
..
2013-07-24 11:10:35 -04:00
2013-07-23 18:03:17 -04:00
2013-05-16 15:02:45 -04:00
2013-04-25 17:06:52 -07:00
2013-01-23 15:48:55 +07:00
2013-01-23 15:48:55 +07:00
2013-03-26 16:52:46 -07:00
2013-01-27 10:32:23 +08:00
2013-03-25 15:59:10 -04:00
2013-05-16 15:02:45 -04:00
2013-07-24 19:21:56 -04:00
2013-02-25 18:27:44 +00:00
2013-01-23 15:48:55 +07:00
2013-01-08 18:07:15 +00:00
2013-02-20 03:00:20 -05:00
2013-06-12 10:27:28 +01:00
2013-01-23 15:48:55 +07:00
2013-01-24 19:18:39 +08:00
2010-12-09 13:00:52 -08:00
2013-05-16 11:26:01 +02:00
2013-01-24 19:18:39 +08:00
2013-05-06 23:57:58 -04:00
2013-02-23 00:01:19 -05:00
2013-01-23 15:48:55 +07:00
2011-03-25 22:52:57 -04:00
2013-07-23 10:15:49 -04:00
2013-07-23 10:15:49 -04:00
2013-02-06 16:36:49 +00:00
2013-01-23 15:48:55 +07:00
2013-01-23 15:48:56 +07:00
2010-10-05 15:54:25 -07:00
2013-01-11 00:48:18 +00:00
2013-01-24 19:18:39 +08:00
2013-02-25 18:27:44 +00:00
2013-02-27 09:07:21 -05:00
2013-03-06 10:19:26 -05:00
2011-10-25 14:33:47 +02:00