https://bugs.documentfoundation.org/show_bug.cgi?id=120620
Bug ID: 120620
Summary: setPosSize does not work properly
Product: LibreOffice
Version: 6.2.0.0.alpha0+ Master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Base
Assignee: [email protected]
Reporter: [email protected]
Created attachment 145731
--> https://bugs.documentfoundation.org/attachment.cgi?id=145731&action=edit
Demo database
Following on from #112590 (gtk3 and window size) I have tried to set the size
and position of forms in code.
Ignoring ubuntu ppa versions and gtk3 for now, and using:
Version: 6.1.4.0.0+
Build ID: 7ea7b86e7731f8cc1366ea632653fecc97267378
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk2;
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-6-1, Time:
2018-10-13_04:47:20
Locale: en-GB (en_GB.UTF-8); Calc: group threaded
Open Table1 form. On my system it shows on the top line, inset a little to the
right.
The setPosSize function is called when the table is opened, and contains:
Sub FormSize()
Wait 150
oFrame = StarDesktop.getCurrentFrame()
oWin = oFrame.getContainerWindow()
oWin.setPosSize(100,150,500,400,15)
End Sub
The y position 150 seems to be ignored completely. I've tried and failed to
position and size forms to precisely what and where I want them, with many
variations of sizes and positions.
The Wait function seems to be needed otherwise the function runs against the
main window, not the form (I guess a different way of getting the Frame and
Window might work better), but this isn't the issue at hand.
The only environment that works on my ubuntu system is without gtk2 or gtk3,
where setPosSize works perfectly every time, so I'm running:
Version: 6.1.3.1
Build ID: 1:6.1.3~rc1-0ubuntu0.18.04.1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: x11;
Locale: en-GB (en_GB.UTF-8); Calc: group threaded
I'd much prefer it if Base forms would preserve the size (and hopefully
position) when edited and saved, but using setPosSize on the forms I use most
has alleviated the problem somewhat, even if the x11 rendering is not too nice.
The setPosSize solution does, of course, fail when I run the application on a
different system, where other sizes are needed, and I really don't want to have
to modify code every time I move apps around (whereas opening, reshaping and
saving each form would be much, much easier).
My memory still tells me that LO used to remember form sizes, once upon a time.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs