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
This commit is contained in:
xemuth 2020-08-02 17:42:20 +00:00
parent 642c0be680
commit 31832bdf55
2 changed files with 6 additions and 0 deletions

View file

@ -12,6 +12,8 @@ class SurfaceCtrl_Demo : public WithSurfaceCtrl_DemoLayout<TopWindow> {
public:
typedef SurfaceCtrl_Demo CLASSNAME;
SurfaceCtrl_Demo();
virtual void Layout();
};
}
#endif

View file

@ -26,6 +26,10 @@ namespace Upp{
};
Sizeable().Zoomable();
}
void SurfaceCtrl_Demo::Layout(){
canvas.GLResize(GetSize().cx,GetSize().cy);
}
}
GUI_APP_MAIN