diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/gfx_widget.pas | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/corelib/gfx_widget.pas b/src/corelib/gfx_widget.pas index 8e5a1945..728be6b3 100644 --- a/src/corelib/gfx_widget.pas +++ b/src/corelib/gfx_widget.pas @@ -119,6 +119,9 @@ function FindKeyboardFocus: TfpgWidget; implementation +uses + math; + { Double click support } const @@ -782,10 +785,10 @@ var dw: integer; dh: integer; begin - dw := awidth - FWidth; - dh := aheight - FHeight; - FWidth := awidth; - FHeight := aheight; + dw := awidth - FWidth; + dh := aheight - FHeight; + FWidth := Max(awidth, FMinWidth); + FHeight := Max(aheight, FMinHeight); HandleAlignments(dw, dh); end; |