Przeglądaj źródła

Checking the padding by using the DrawMarginFrame.

BDisp 2 lat temu
rodzic
commit
ed4af19115
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Terminal.Gui/Windows/Dialog.cs

+ 1 - 1
Terminal.Gui/Windows/Dialog.cs

@@ -177,7 +177,7 @@ namespace Terminal.Gui {
 				// Justify Buttons
 				// leftmost and rightmost buttons are hard against edges. The rest are evenly spaced.
 
-				var spacing = (int)Math.Ceiling ((double)(Bounds.Width - buttonsWidth - 2) / (buttons.Count - 1));
+				var spacing = (int)Math.Ceiling ((double)(Bounds.Width - buttonsWidth - (Border.DrawMarginFrame ? 2 : 0)) / (buttons.Count - 1));
 				for (int i = buttons.Count - 1; i >= 0; i--) {
 					Button button = buttons [i];
 					if (i == buttons.Count - 1) {