InputRoll - do not draw column header if not necessary
This commit is contained in:
parent
ae239a0b1d
commit
0e03696b93
|
@ -30,7 +30,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
var lastVisibleRow = firstVisibleRow + CalcVisibleRows(e.ClipRectangle);
|
||||
CalculateHorizontalColumnPositions(visibleColumns);
|
||||
|
||||
if (visibleColumns.Any())
|
||||
var needsColumnRedraw = HorizontalOrientation || e.ClipRectangle.Y < ColumnHeight;
|
||||
if (visibleColumns.Any() && needsColumnRedraw)
|
||||
{
|
||||
DrawColumnBg(visibleColumns);
|
||||
DrawColumnText(visibleColumns);
|
||||
|
|
|
@ -271,7 +271,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
// Similarly to ListView in virtual mode, we want to always refresh
|
||||
// when setting row count, that gives the calling code assurance that
|
||||
// redraw will happen
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public void Redraw()
|
||||
{
|
||||
// TODO: horizontal orientation
|
||||
if (HorizontalOrientation)
|
||||
{
|
||||
|
@ -280,7 +285,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
else
|
||||
{
|
||||
int x = _hBar.Value;
|
||||
int y = ColumnHeight;
|
||||
int y = ColumnHeight + 1;
|
||||
|
||||
int w = VisibleColumns.Any()
|
||||
? Math.Min(VisibleColumns.Max(c => c.Right) - _hBar.Value, Width)
|
||||
|
@ -290,7 +295,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
Invalidate(new Rectangle(x, y, w, h));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether columns can be resized
|
||||
|
|
Loading…
Reference in New Issue