TAStudio - calculate row height based on font height
This commit is contained in:
parent
d89dfd5595
commit
e579542b7d
|
@ -69,8 +69,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var headerHeight = 24; //Are these always true? Don't know, is there a way to programmatically determine them?
|
var rowHeight = this.LineHeight + 5; // 5 and 6 work here for me, but are they always dependable, how can I get the padding?
|
||||||
var rowHeight = 18;
|
var headerHeight = rowHeight + 6;
|
||||||
|
|
||||||
newRow = ((y - headerHeight) / rowHeight) + this.VScrollPos;
|
newRow = ((y - headerHeight) / rowHeight) + this.VScrollPos;
|
||||||
if (newRow >= ItemCount)
|
if (newRow >= ItemCount)
|
||||||
|
|
|
@ -422,6 +422,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public int LineHeight { get; private set; }
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -441,6 +443,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||||
SetStyle(ControlStyles.Opaque, true);
|
SetStyle(ControlStyles.Opaque, true);
|
||||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
|
||||||
|
var LineHeight = this.Font.Height + 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
~VirtualListView()
|
~VirtualListView()
|
||||||
|
|
Loading…
Reference in New Issue