mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-06-20 19:30:31 +12:00
[Feature] Option maximum menu height (#181), version 1.0.17.51
This commit is contained in:
parent
bdaebea71a
commit
642b3a731e
|
@ -486,6 +486,12 @@ namespace SystemTrayMenu.UserInterface
|
|||
{
|
||||
int dgvHeight = dgv.Rows.GetRowsHeight(DataGridViewElementStates.None); // Height of all rows
|
||||
int dgvHeightMax = screenHeightMax - (Height - dgv.Height); // except dgv
|
||||
|
||||
if (dgvHeightMax > Properties.Settings.Default.MaximumMenuHeight)
|
||||
{
|
||||
dgvHeightMax = Properties.Settings.Default.MaximumMenuHeight;
|
||||
}
|
||||
|
||||
if (dgvHeight > dgvHeightMax)
|
||||
{
|
||||
// Make all rows fit into the screen
|
||||
|
|
Loading…
Reference in a new issue