GIT
/
REPO
/
FRED-BOY
Projects
/
d2df-sdl.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46fcacb
)
FlexUI: don't change window size in "fit to screen" mode if size was already set
author
Ketmar Dark <ketmar@ketmar.no-ip.org>
Sat, 30 Sep 2017 22:18:08 +0000
(
01:18
+0300)
committer
Ketmar Dark <ketmar@ketmar.no-ip.org>
Mon, 2 Oct 2017 23:34:41 +0000
(
02:34
+0300)
src/gx/gh_ui.pas
patch
|
blob
|
history
diff --git
a/src/gx/gh_ui.pas
b/src/gx/gh_ui.pas
index ff284475e98fc1b2f30eab4a002c3fb736347c9b..16281c60fdafad7e6636434336cc8f0283b6254d 100644
(file)
--- a/
src/gx/gh_ui.pas
+++ b/
src/gx/gh_ui.pas
@@
-2076,8
+2076,12
@@
end;
procedure TUITopWindow.flFitToScreen ();
+var
+ nsz: TLaySize;
begin
- flMaxSize := TLaySize.Create(trunc(gxScreenWidth/gh_ui_scale)-mFrameWidth*2-6, trunc(gxScreenHeight/gh_ui_scale)-mFrameHeight*2-6);
+ nsz := TLaySize.Create(trunc(gxScreenWidth/gh_ui_scale)-mFrameWidth*2-6, trunc(gxScreenHeight/gh_ui_scale)-mFrameHeight*2-6);
+ if (mMaxSize.w < 1) then mMaxSize.w := nsz.w;
+ if (mMaxSize.h < 1) then mMaxSize.h := nsz.h;
end;
DEADSOFTWARE 2012-2025