Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Window Size is not correct #26

Closed
mgradwohl opened this issue Jan 25, 2023 · 0 comments
Closed

Initial Window Size is not correct #26

mgradwohl opened this issue Jan 25, 2023 · 0 comments

Comments

@mgradwohl
Copy link
Owner

On some machines, this code is correct, on others it is not.

       // TODO doesn't work at all monitor DPIs http://microsoft.github.io/Win2D/WinUI3/html/DPI.htm
        const int wndWidth = theCanvas().ConvertDipsToPixels(bestcanvassize + 240, CanvasDpiRounding::Ceiling);
		const int wndHeight = theCanvas().ConvertDipsToPixels(bestcanvassize + 40, CanvasDpiRounding::Ceiling);
        
        //const int wndWidth = bestcanvassize + 240;
        //const int wndHeight = bestcanvassize + 40;
		appWnd.ResizeClient(Windows::Graphics::SizeInt32{ wndWidth, wndHeight });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant