On Wed, 5 Jun 2019 22:45:22 +0200, Mike Wey wrote:
On 05-06-2019 00:16, Alex X wrote:
On Tue, 4 Jun 2019 19:34:54 +0200, Mike Wey wrote:
On 04-06-2019 03:00, Alex X wrote:
On Mon, 3 Jun 2019 22:42:05 +0200, Mike Wey wrote:
On 03-06-2019 03:17, Alex X wrote:
int x, y,w, h; win.getPosition(x,y); auto pw = win.getAllocatedWidth(); auto ph = win.getAllocatedHeight(); win.getSize(w,h); win.setDefaultSize(400,400); win.setSizeRequest(300,300); win.resize(200,200); win.move(30,30);
None of this code seems to do anything anywhere I place it. (addOnShow, addOnHide, addOnRealize,
For me it seems to be working when i put
the constructor for the window. Only move doesn't the the window
decorations in to account when positioning the window.
Unfortunately I do not have access to the constructor ;/ I'm using glade and builder...
I wonder if a callback could be added for the constructors so I could hook in to them before I build so I may be able to get things to work? (would be a static delegate for each constructor taking this and the arguments... same thing might have to happen for destructors. Also, one would want to use an array to allow for multiple entries)
What happens when you call these functions directly on the Window
That is what I'm doing except I do cast it to the Gtk type.
auto win = cast(gtk.Window.Window)builder.getObject("MainWin");
There doesn't appear to be a way to do this when using gtk.Builder, as
these functions need to be called before the window is shown.
;/ I find it very strange that they wouldn't work after the window is shown. The size is still the same.
The inspector gets the correct sizes too so there must be something off.
I imagine that this is either buggy code/flawed design or a windows problem. Glade Designer itself has issues where it obscures the taskbar and the taskbar cannot be accessed and does weird positioning and sizing... I'm always having to mess with it as it changes a lot.