OpenCPN icon indicating copy to clipboard operation
OpenCPN copied to clipboard

Settings windows of grib_pi is not resizable or scrollable

Open aviatorhh opened this issue 1 year ago • 13 comments

The settings window as shown cannot be pushed upwards to get the @ sign/button visible. Screenshot 2024-05-12 at 23 44 35

This can be seen on a Debian 12 with fluxbox (1.3.7) as the window manager.

Latest build (3d816b0c6504d5666e32624754e3d92da78fee90) by today.

aviatorhh avatar May 12 '24 22:05 aviatorhh

Preliminary triage findings:

  1. This is reproducible also on Bookworm + Gnome
  2. Not being resizeable is not a bug for a modal dialog. However, not being able to scroll to access widgets if required due to missing vertical space is.
  3. The window ownership is a mess, dialogs are disconnected from the top level window and thus free floating making debugging hard. Hacked the problematic dialog to have MyFrame as top window to proceed.
  4. If the dialog is constrained by the (virtual) screen gtk does the right thing and adds scroolbars making everything accessible.
  5. OTOH, if the dialog is constrained by the opencpn top window gtk does not add any scrollbars.

FWIW, 4) and 5) makes me think that this is perhaps about some missing Fit(), Layout(), etc.

Running out of time, have a yacht to take care of. The ice is almost gone, tomorrow temperature is 24°.

leamas avatar May 14 '24 07:05 leamas

This worked fine, with scroll bars, in O584. So some regression has occurred. Needs a (long) git bisect session.

bdbcat avatar May 15 '24 03:05 bdbcat

Hm... Tested:

  • official 5.8.4+dfsg-1~bpo12+1 bookworm package
  • bookworm source build from the Release_5.8.4 tag.
  • official 5.8.2+dfsg-3~bpo11+1 bullseye package.
  • official 5.2.4+dfsg-1 bullseye package

For me the issue is still present basically unchanged in all four cases. Seems like a long standing issue.

EDIT: Added 5.2.4+dfsg-1

leamas avatar May 15 '24 07:05 leamas

Hmm also... Tested on Windows. See pix. Note scrollbar. Screenshot_20240515_101229

bdbcat avatar May 15 '24 14:05 bdbcat

Hmm^2... Current master works correctly on Windows. Scroll bars shown, all items accessible. But not on linux. Anyone quick test Mac, please?

bdbcat avatar May 15 '24 14:05 bdbcat

It is broken on Linux, 5.8.4 also. Depending on the window manager, if the settings window is too small, the scrollbars either are not shown at all or the scrolled window content size is not correct and scrolling is not possible anyway.. On macOS the scrolling is OK.

nohal avatar May 15 '24 14:05 nohal

Looking at the object tree:

image

There is nothing like a wxScrolledWindow present here? Is it that gtk needs an explicit scrolled window, while Windows/Macos does not?

leamas avatar May 15 '24 15:05 leamas

The object is "GribSettingsDialog", not GRIBUICtrlBarBase.

bdbcat avatar May 15 '24 15:05 bdbcat

yes, of course. And that one has a scrolled window on top: image

Question is then why it does not work as expected on gtk. Back to square one.

leamas avatar May 15 '24 15:05 leamas

After much trial and error, a workable correction pushed to master. Not especially happy with the patched code. There is definitely some funny interaction between wx scrolled windows and GTK. But it works, subject to all-platform tests.

bdbcat avatar May 16 '24 02:05 bdbcat

Works on my side as expected now. Thanks for the fast response/work! Ready for closure?

aviatorhh avatar May 16 '24 04:05 aviatorhh

Not quite. Lets verify on Mac and Windows.

bdbcat avatar May 16 '24 04:05 bdbcat

Rpi5-Bookworm - OK.

Windows10 175% scaled: When shifting between the three tabs, Data, Playback and GUI a msec glimpse of a small window with scroll bar is seen where after the normal sized window is shown. No scroll bar is needed there. I wouldn't say the glimpse is really disturbing. It's just an observation not seen on e.g. Rpi.

Hakansv avatar May 16 '24 06:05 Hakansv

I have just done a Mac build and the window is fine but more to the fact of its size on a bigger screen. The window itself is not resizable so no scrolltesting could be done. Screenshot 2024-05-16 at 11 26 41

aviatorhh avatar May 16 '24 10:05 aviatorhh

If you resize the main OpenCPN window, to something smaller than full screen, the Settings dialog will reduce in size also. This should prompt scroll bars if necessary.

bdbcat avatar May 16 '24 16:05 bdbcat

It works but ... Screenshot 2024-05-16 at 20 20 28

I have encountered a different fault before as can be seen on the image. The scrollable pane is painting in front of its parent respectively pushing over at the top and bottom. I can see this behaviour even on other windows like the plugin list. I cannot exclude the possibility that my machine may be the cause. This bug may only be valid if others can confirm this.

aviatorhh avatar May 16 '24 18:05 aviatorhh

This is broken wxWidgets, I have seen it too with some local builds, should not be present if you use the CI product from https://cloudsmith.io/~david-register/repos/opencpn-unstable/packages/

nohal avatar May 16 '24 19:05 nohal

You are right. It is a local wx build - so disregard. Regarding the scrolling issue I can confirm it is working at least on Mac and Lin. Have not tried Win yet.

aviatorhh avatar May 16 '24 19:05 aviatorhh

Ready to close now. Thanks.

bdbcat avatar May 17 '24 01:05 bdbcat

Thanks Gentlemen

aviatorhh avatar May 17 '24 08:05 aviatorhh

Thanks for reporting this long standing issue!

leamas avatar May 17 '24 09:05 leamas