mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-06-27 18:40:32 +12:00
[BUG] ArgumentOutOfRangeException #110 [BUG] AutosizeRows when high dpi #111
This commit is contained in:
parent
fe02510cf6
commit
65159276d7
|
@ -88,6 +88,8 @@ namespace SystemTrayMenu.Handler
|
|||
}
|
||||
|
||||
internal void EnterOpensInstantly(DataGridView dgv, int rowIndex)
|
||||
{
|
||||
if (dgv.Rows.Count > rowIndex)
|
||||
{
|
||||
timerStartLoad.Stop();
|
||||
StopLoadMenu.Invoke();
|
||||
|
@ -96,6 +98,7 @@ namespace SystemTrayMenu.Handler
|
|||
checkForMouseActive = false;
|
||||
CallOpenMenuNow();
|
||||
}
|
||||
}
|
||||
|
||||
internal void MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
|
|
@ -37,7 +37,6 @@ namespace SystemTrayMenu.UserInterface
|
|||
|
||||
private readonly Fading fading = new Fading();
|
||||
private bool isShowing = false;
|
||||
private bool dgvAutoResizeRowDone = false;
|
||||
|
||||
internal Menu()
|
||||
{
|
||||
|
@ -242,10 +241,14 @@ namespace SystemTrayMenu.UserInterface
|
|||
internal void AdjustSizeAndLocation(Menu menuPredecessor = null,
|
||||
bool directionToRight = false)
|
||||
{
|
||||
if (!dgvAutoResizeRowDone)
|
||||
CheckForAutoResizeRowDone();
|
||||
void CheckForAutoResizeRowDone()
|
||||
{
|
||||
if (!(bool)dgv.Tag)
|
||||
{
|
||||
dgv.AutoResizeRows();
|
||||
dgvAutoResizeRowDone = true;
|
||||
dgv.Tag = true;
|
||||
}
|
||||
}
|
||||
|
||||
int dgvHeightNeeded = dgv.Rows.GetRowsHeight(
|
||||
|
|
Loading…
Reference in a new issue