cleanup
This commit is contained in:
parent
d8f0dca586
commit
0d2770044a
|
@ -35,9 +35,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
.ToList();
|
||||
}
|
||||
|
||||
// TODO: FirstVisibleRow assumes there is a visible row
|
||||
var firstVisibleRow = FirstVisibleRow;
|
||||
var visibleRows = CalcVisibleRows(e.ClipRectangle);
|
||||
var firstVisibleRow = Math.Max(FirstVisibleRow, 0);
|
||||
var visibleRows = HorizontalOrientation
|
||||
? e.ClipRectangle.Width / CellWidth
|
||||
: e.ClipRectangle.Height / CellHeight;
|
||||
|
||||
var lastVisibleRow = firstVisibleRow + visibleRows;
|
||||
|
||||
|
|
|
@ -277,7 +277,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void Redraw()
|
||||
{
|
||||
// TODO: horizontal orientation
|
||||
if (HorizontalOrientation)
|
||||
{
|
||||
int x = MaxColumnWidth;
|
||||
|
@ -805,17 +804,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: don't duplicate property logic
|
||||
private int CalcVisibleRows(Rectangle rect)
|
||||
{
|
||||
if (HorizontalOrientation)
|
||||
{
|
||||
return rect.Width / CellWidth;
|
||||
}
|
||||
|
||||
return rect.Height / CellHeight; // Minus three makes it work
|
||||
}
|
||||
|
||||
private Cell _draggingCell;
|
||||
|
||||
public void DragCurrentCell()
|
||||
|
|
Loading…
Reference in New Issue