SideBarControl: add padding if there is no image for button

This commit is contained in:
Nick Vella 2019-07-24 01:39:27 +10:00
parent bb6d3bfa1d
commit 6e2db9bf42
1 changed files with 3 additions and 1 deletions

View File

@ -231,7 +231,9 @@ namespace OpenLiveWriter.ApplicationFramework
button.AutoSizeWidth = false;
button.AutoSizeHeight = false;
button.Width = maxWidth;
button.Height = (int)Math.Ceiling(button.Height / (DisplayHelper.PixelsPerLogicalInchY / 96f));
button.Height =
(int)Math.Ceiling(button.Height / (DisplayHelper.PixelsPerLogicalInchY / 96f))
+ (button.BitmapEnabled == null ? 10 : 0); // Add a 10 pixel vertical padding when text-only
}
Width = maxWidth + PAD * 2;