From 6d1080b58ddc23efc8bcd5c8df991dfb41fcae4c Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Wed, 29 Nov 2023 16:35:10 -0500 Subject: [PATCH] some minor sizing tweaks on text boxes on windows --- minigui.d | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/minigui.d b/minigui.d index 2a95b76..650b461 100644 --- a/minigui.d +++ b/minigui.d @@ -9616,6 +9616,10 @@ class Labeled(T) : Widget { override int flexBasisWidth() { return widthThatWouldFitChildLabels(outerParent); } + /+ + override int widthShrinkiness() { return 0; } + override int widthStretchiness() { return 1; } + +/ override int paddingRight() { return 6; } override int paddingLeft() { return 9; } @@ -9636,6 +9640,7 @@ class Labeled(T) : Widget { T lineEdit; /// override int flexBasisWidth() { return 250; } + override int widthShrinkiness() { return 1; } override int minHeight() { return this.children[0].minHeight; @@ -12643,6 +12648,7 @@ abstract class EditableTextWidget : EditableTextWidgetParent { override int minWidth() { return scaleWithDpi(16); } override int widthStretchiness() { return 7; } + override int widthShrinkiness() { return 1; } version(use_new_text_system) override int maxHeight() { return tdh.maxHeight; } @@ -13082,7 +13088,7 @@ class LineEdit : EditableTextWidget { } version(win32_widgets) { - mixin Padding!q{2}; + mixin Padding!q{0}; override int minHeight() { return borderBoxForContentBox(Rectangle(Point(0, 0), Size(0, defaultLineHeight))).height; } override int maxHeight() { return minHeight; } }