diff --git a/src/dlangui/platforms/common/platform.d b/src/dlangui/platforms/common/platform.d index 6162cd13..abb092dc 100644 --- a/src/dlangui/platforms/common/platform.d +++ b/src/dlangui/platforms/common/platform.d @@ -56,6 +56,8 @@ enum WindowFlag : uint { MeasureSize = 8, /// window without decorations Borderless = 16, + /// expand window size if main widget minimal size is greater than size defined in window constructor + ExpandSize = 32, } /// Window states @@ -466,7 +468,7 @@ class Window : CustomEventTarget { void adjustWindowOrContentSize(int minContentWidth, int minContentHeight) { _minContentWidth = minContentWidth; _minContentHeight = minContentHeight; - if (_windowOrContentResizeMode == WindowOrContentResizeMode.resizeWindow) + if (_windowOrContentResizeMode == WindowOrContentResizeMode.resizeWindow || flags & WindowFlag.ExpandSize) resizeWindow(Point(max(_windowRect.right, minContentWidth), max(_windowRect.bottom, minContentHeight))); updateWindowOrContentSize(); }