mirror of https://github.com/buggins/dlangui.git
ExpandSize flag - ability to make window bigger when construct size is smaller than min main widget size.
This commit is contained in:
parent
23913e73f3
commit
f453a4fe89
|
@ -56,6 +56,8 @@ enum WindowFlag : uint {
|
||||||
MeasureSize = 8,
|
MeasureSize = 8,
|
||||||
/// window without decorations
|
/// window without decorations
|
||||||
Borderless = 16,
|
Borderless = 16,
|
||||||
|
/// expand window size if main widget minimal size is greater than size defined in window constructor
|
||||||
|
ExpandSize = 32,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Window states
|
/// Window states
|
||||||
|
@ -466,7 +468,7 @@ class Window : CustomEventTarget {
|
||||||
void adjustWindowOrContentSize(int minContentWidth, int minContentHeight) {
|
void adjustWindowOrContentSize(int minContentWidth, int minContentHeight) {
|
||||||
_minContentWidth = minContentWidth;
|
_minContentWidth = minContentWidth;
|
||||||
_minContentHeight = minContentHeight;
|
_minContentHeight = minContentHeight;
|
||||||
if (_windowOrContentResizeMode == WindowOrContentResizeMode.resizeWindow)
|
if (_windowOrContentResizeMode == WindowOrContentResizeMode.resizeWindow || flags & WindowFlag.ExpandSize)
|
||||||
resizeWindow(Point(max(_windowRect.right, minContentWidth), max(_windowRect.bottom, minContentHeight)));
|
resizeWindow(Point(max(_windowRect.right, minContentWidth), max(_windowRect.bottom, minContentHeight)));
|
||||||
updateWindowOrContentSize();
|
updateWindowOrContentSize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue