On Wednesday, 9 October 2019 at 03:13:48 UTC, GreatSam4sure wrote:
Is there any way to detect the size of my screen using gtkd? So
that incan calculate the size of my screen and center my window
on the screen using move(x, y).
I was distracted last time I replied to this thread and so
overlooked the obvious.
This is actually very simple to do. Add this to your Window or
MainWindow constructor:
Window.setPosition(WindowPosition.CENTER);
That's it.
Here's a full example, so you can see it in its natural habitat:
https://github.com/rontarrant/gtkDcoding/blob/master/001_window/window_001_11_centered.d