Skip to content

Commit

Permalink
[Feature] Option maximum menu height (#181), version 1.0.17.51
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofknecht committed May 29, 2021
1 parent bdaebea commit 642b3a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions UserInterface/Menu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,12 @@ private void AdjustDataGridViewHeight(Menu menuPredecessor, int screenHeightMax)
{
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
Expand Down

0 comments on commit 642b3a7

Please sign in to comment.