Skip to content

Commit

Permalink
fix the vertical alignment when VerticalItemSpacing is large.
Browse files Browse the repository at this point in the history
Previous code vertically aligns the text well when VerticalItemSpacing
is small. However, if VerticalItemSpacing is large, then the font
height + gaps can be larger than MiniIcon's height, and the text will
have an extra y_offset.
  • Loading branch information
mikeandmore authored and ThomasAdam committed Aug 28, 2020
1 parent 09f38d8 commit 0a97ed8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fvwm/menuitem.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void menuitem_paint(
y = MI_MINI_ICON(mi)[i]->height;
}
}
y -= font->height;
y -= font->height + ST_ITEM_GAP_ABOVE(ms) + ST_ITEM_GAP_BELOW(ms);
if (y > 1)
{
text_y += y / 2;
Expand Down

0 comments on commit 0a97ed8

Please sign in to comment.