-
Notifications
You must be signed in to change notification settings - Fork 138
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
Question: How to set position to the center of the screen? #317
Comments
mayebe you can use js api |
Try this: function centerWindow() {
const screenWidth = screen.width;
const screenHeight = screen.height;
const width = window.outerWidth;
const height = window.outerHeight;
const centerX = (screenWidth - width) / 2;
const centerY = (screenHeight - height) / 2;
window.moveTo(centerX, centerY);
}
centerWindow(); |
It kinda works but I can see the change in position. I guess we can close this issue, but can be feature for the future to implement functions get position, monitor size, mult-imonitor positioning. etc.. Anyway, thanks :) |
webui is not like the other GUI libraries, a webui "return window.outerWidth;"
"return window.outerHeight;" |
Hi. I want to set window to the center of my screen. How do I do it? There is no current method to get total of the current screen and there is no method to set in directly to the center. I only have SetPosition method.
I am using Go programing language and fedora 39 OS.
The text was updated successfully, but these errors were encountered: