From 31832bdf55ecebf5df4e5072461c1a82eae05ac8 Mon Sep 17 00:00:00 2001 From: xemuth Date: Sun, 2 Aug 2020 17:42:20 +0000 Subject: [PATCH] SurfaceCtrl_Demo: Adding override of Layout function to prevent of view deformation while resizing the window git-svn-id: svn://ultimatepp.org/upp/trunk@14746 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/SurfaceCtrl_Demo/SurfaceCtrl_Demo.h | 2 ++ bazaar/SurfaceCtrl_Demo/main.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/bazaar/SurfaceCtrl_Demo/SurfaceCtrl_Demo.h b/bazaar/SurfaceCtrl_Demo/SurfaceCtrl_Demo.h index 6ca5f2d59..f4fb05a8d 100644 --- a/bazaar/SurfaceCtrl_Demo/SurfaceCtrl_Demo.h +++ b/bazaar/SurfaceCtrl_Demo/SurfaceCtrl_Demo.h @@ -12,6 +12,8 @@ class SurfaceCtrl_Demo : public WithSurfaceCtrl_DemoLayout { public: typedef SurfaceCtrl_Demo CLASSNAME; SurfaceCtrl_Demo(); + virtual void Layout(); + }; } #endif diff --git a/bazaar/SurfaceCtrl_Demo/main.cpp b/bazaar/SurfaceCtrl_Demo/main.cpp index 96dd7b0a6..4852a527d 100644 --- a/bazaar/SurfaceCtrl_Demo/main.cpp +++ b/bazaar/SurfaceCtrl_Demo/main.cpp @@ -26,6 +26,10 @@ namespace Upp{ }; Sizeable().Zoomable(); } + + void SurfaceCtrl_Demo::Layout(){ + canvas.GLResize(GetSize().cx,GetSize().cy); + } } GUI_APP_MAIN