Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-09

Main form resize events

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

I've got a form containing main menu, status lines top and bottom, and a couple of grids. I've been doing other things for a few days but I now seem to have a problem where resizing the form (diagonal mouse-drag on bottom-right corner) does not correctly resize/reposition all of the content.

Running on x86 Linux (Debian) and looking at the app built with different versions of Lazarus, each with its own LCL and preferred FPC version, and for either GTK1 or GTK2:

With 0.9.28.3 (27343) for GTK, neither status line changes when the form is resized, one of the grids which is left-aligned also stays unchanged with part of the bottom status line visible below it.

With 0.9.28.3 (27343) for GTK2, performance is erratic. The bottom status line sometimes changes correctly, but the width of the top line and its panes is always unchanged.

With 0.9.29 (27343) for both GTK and GTK2, attempting to resize the form sometimes results in it "snapping back" to the original size or sometimes to something intermediate; I suspect that this might be a DPI issue since I'm working over VNC and the setting of the two X servers might not be the same. Positioning of the status lines etc. appears to be correct.

For completeness, 0.9.26.2 (25955) and 0.9.28.2 (27246) appear to behave as 0.9.28. However I think that I've seen all of those working properly in the past, although details such as the resizing of panes within a status line might have been erratic.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd
Show quoted text 29 lines
I've got a form containing main menu, status lines top and bottom, and a couple of grids. I've been doing other things for a few days but I now seem to have a problem where resizing the form (diagonal mouse-drag on bottom-right corner) does not correctly resize/reposition all of the content. Running on x86 Linux (Debian) and looking at the app built with different versions of Lazarus, each with its own LCL and preferred FPC version, and for either GTK1 or GTK2: With 0.9.28.3 (27343) for GTK, neither status line changes when the form is resized, one of the grids which is left-aligned also stays unchanged with part of the bottom status line visible below it. With 0.9.28.3 (27343) for GTK2, performance is erratic. The bottom status line sometimes changes correctly, but the width of the top line and its panes is always unchanged. With 0.9.29 (27343) for both GTK and GTK2, attempting to resize the form sometimes results in it "snapping back" to the original size or sometimes to something intermediate; I suspect that this might be a DPI issue since I'm working over VNC and the setting of the two X servers might not be the same. Positioning of the status lines etc. appears to be correct. For completeness, 0.9.26.2 (25955) and 0.9.28.2 (27246) appear to behave as 0.9.28. However I think that I've seen all of those working properly in the past, although details such as the resizing of panes within a status line might have been erratic.

The layout algorithm was rewritten in 0.9.29 to support complex layouts. Please create a bug report with an example.

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote 27 lines
On Mon, 13 Sep 2010 09:54:45 +0000 Mark Morgan Lloyd wrote: > I've got a form containing main menu, status lines top and bottom, and a > couple of grids. I've been doing other things for a few days but I now > seem to have a problem where resizing the form (diagonal mouse-drag on > bottom-right corner) does not correctly resize/reposition all of the > content. > > Running on x86 Linux (Debian) and looking at the app built with > different versions of Lazarus, each with its own LCL and preferred FPC > version, and for either GTK1 or GTK2: > > With 0.9.28.3 (27343) for GTK, neither status line changes when the form > is resized, one of the grids which is left-aligned also stays unchanged > with part of the bottom status line visible below it. > > With 0.9.28.3 (27343) for GTK2, performance is erratic. The bottom > status line sometimes changes correctly, but the width of the top line > and its panes is always unchanged. > > With 0.9.29 (27343) for both GTK and GTK2, attempting to resize the form > sometimes results in it "snapping back" to the original size or > sometimes to something intermediate; I suspect that this might be a DPI > issue since I'm working over VNC and the setting of the two X servers > might not be the same. Positioning of the status lines etc. appears to > be correct.

I corrected the DPI issue and I don't believe it's the sole cause.

Show quoted text 7 lines
> For completeness, 0.9.26.2 (25955) and 0.9.28.2 (27246) appear to behave > as 0.9.28. However I think that I've seen all of those working properly > in the past, although details such as the resizing of panes within a > status line might have been erratic. The layout algorithm was rewritten in 0.9.29 to support complex layouts. Please create a bug report with an example.

Will do. Obviously I appreciate that GTK v1 support is being wound down.

Is there an approved way to submit form+code as a bug's appendage?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd
Show quoted text 13 lines
Mattias Gaertner wrote: [...] >> For completeness, 0.9.26.2 (25955) and 0.9.28.2 (27246) appear to behave >> as 0.9.28. However I think that I've seen all of those working properly >> in the past, although details such as the resizing of panes within a >> status line might have been erratic. > > The layout algorithm was rewritten in 0.9.29 to support complex layouts. > Please create a bug report with an example. Will do. Obviously I appreciate that GTK v1 support is being wound down. Is there an approved way to submit form+code as a bug's appendage?

As zipped/gzipped sources to the bug tracker.

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote 18 lines
On Tue, 14 Sep 2010 07:02:26 +0000 Mark Morgan Lloyd wrote: > Mattias Gaertner wrote: > [...] >>> For completeness, 0.9.26.2 (25955) and 0.9.28.2 (27246) appear to behave >>> as 0.9.28. However I think that I've seen all of those working properly >>> in the past, although details such as the resizing of panes within a >>> status line might have been erratic. >> The layout algorithm was rewritten in 0.9.29 to support complex layouts. >> Please create a bug report with an example. > Will do. Obviously I appreciate that GTK v1 support is being wound down. > > Is there an approved way to submit form+code as a bug's appendage? As zipped/gzipped sources to the bug tracker. Mattias

Needless to say, I'm having difficulty reproducing this with forms etc. built from scratch. I might have to do it by stripping as much as possible out of the app I'm working on and submitting what's left. I'll be back.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner: On Mon, 13 Sep 2010 09:54:45 +0000 The layout algorithm was rewritten in 0.9.29 to…
Mattias Gaertner wrote 35 lines
On Mon, 13 Sep 2010 09:54:45 +0000 Mark Morgan Lloyd wrote: > I've got a form containing main menu, status lines top and bottom, and a > couple of grids. I've been doing other things for a few days but I now > seem to have a problem where resizing the form (diagonal mouse-drag on > bottom-right corner) does not correctly resize/reposition all of the > content. > > Running on x86 Linux (Debian) and looking at the app built with > different versions of Lazarus, each with its own LCL and preferred FPC > version, and for either GTK1 or GTK2: > > With 0.9.28.3 (27343) for GTK, neither status line changes when the form > is resized, one of the grids which is left-aligned also stays unchanged > with part of the bottom status line visible below it. > > With 0.9.28.3 (27343) for GTK2, performance is erratic. The bottom > status line sometimes changes correctly, but the width of the top line > and its panes is always unchanged. > > With 0.9.29 (27343) for both GTK and GTK2, attempting to resize the form > sometimes results in it "snapping back" to the original size or > sometimes to something intermediate; I suspect that this might be a DPI > issue since I'm working over VNC and the setting of the two X servers > might not be the same. Positioning of the status lines etc. appears to > be correct. > > For completeness, 0.9.26.2 (25955) and 0.9.28.2 (27246) appear to behave > as 0.9.28. However I think that I've seen all of those working properly > in the past, although details such as the resizing of panes within a > status line might have been erratic. The layout algorithm was rewritten in 0.9.29 to support complex layouts. Please create a bug report with an example.

I've reviewed my code and not liked what I saw. After reorganising some things overall behavior is far better so I don't think it's worth treating as a bug.

For the record, I'd put in various hacks to work around the fact that a TDrawGrid doesn't have a resize event. This was having non-obvious side-effects including things like the menu bar not tracking the form width properly, moving the DrawGrid and its immediate siblings into a panel hence being able to use the panel's resize appears to have sorted things out.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email