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