cleanup
This commit is contained in:
parent
d8f0dca586
commit
0d2770044a
|
@ -35,9 +35,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: FirstVisibleRow assumes there is a visible row
|
var firstVisibleRow = Math.Max(FirstVisibleRow, 0);
|
||||||
var firstVisibleRow = FirstVisibleRow;
|
var visibleRows = HorizontalOrientation
|
||||||
var visibleRows = CalcVisibleRows(e.ClipRectangle);
|
? e.ClipRectangle.Width / CellWidth
|
||||||
|
: e.ClipRectangle.Height / CellHeight;
|
||||||
|
|
||||||
var lastVisibleRow = firstVisibleRow + visibleRows;
|
var lastVisibleRow = firstVisibleRow + visibleRows;
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void Redraw()
|
public void Redraw()
|
||||||
{
|
{
|
||||||
// TODO: horizontal orientation
|
|
||||||
if (HorizontalOrientation)
|
if (HorizontalOrientation)
|
||||||
{
|
{
|
||||||
int x = MaxColumnWidth;
|
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;
|
private Cell _draggingCell;
|
||||||
|
|
||||||
public void DragCurrentCell()
|
public void DragCurrentCell()
|
||||||
|
|
Loading…
Reference in New Issue