Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK scrollable seems to misbehave compared to WPF/mac #2023

Closed
philstopford opened this issue Aug 30, 2021 · 6 comments · Fixed by #2077
Closed

GTK scrollable seems to misbehave compared to WPF/mac #2023

philstopford opened this issue Aug 30, 2021 · 6 comments · Fixed by #2077
Labels
Milestone

Comments

@philstopford
Copy link
Contributor

Expected Behavior

Add scrollbars when content is out of view.

Actual Behavior

No scrollbars under GTK

Steps to Reproduce the Problem

  1. From https://github.com/philstopford/Quilt_GPL, grab a GTK and/or WPF release or the code (in which case, you'll also need https://github.com/philstopford/DesignLibs_GPL). The projects expect .NET 5 to build.
  2. Run the WPF if you need a reference. Select a shape from the menu in the middle, and you should see a UI of the form :

wpf

Notice the scrollbars when content is out of view, and resizing panels, or the application window has a corresponding effect on the scrollbars.

  1. Run the GTK version. No scrollbars show up :

gtk

Code that Demonstrates the Problem

Repositories above; will work on a smaller test case if desired.

Specifications

  • Version:
  • Platform(s): Gtk3
  • Operating System(s): Ubuntu 21.04
@cwensley
Copy link
Member

Hey @philstopford, thanks for submitting the issue! On some GTK themes the scrollbar only appears when you scroll or move the cursor near the scroll area.. This isn't the case, is it?

@philstopford
Copy link
Contributor Author

philstopford commented Aug 30, 2021 via email

@cwensley
Copy link
Member

@philstopford cool, just wanted to check. I'll take a look! .. and get to that Veldrid issue soon too..

@philstopford
Copy link
Contributor Author

OK. So it looks like a VMware install of Kubuntu does show the scrollbars when I hover over them, but for some reason this isn't behaving consistently with other platforms - the progress bar and label are out-of-view, rather than pinned at the bottom of the window. The scrollable is moving the full content of the left panel :

image

@cwensley cwensley added this to the 2.6.x milestone Nov 27, 2021
cwensley added a commit to cwensley/Eto that referenced this issue Nov 28, 2021
cwensley added a commit to cwensley/Eto that referenced this issue Nov 28, 2021
- Get proper preferred height in some cases by implementing OnGetPreferredHeightForWidth
Fixes picoe#2023
@cwensley cwensley modified the milestones: 2.6.x, 2.6.1 Nov 28, 2021
@cwensley
Copy link
Member

Ok, so I got some time to look into this. The main problem was the top level scrollable was expanding its content to fit everything even though you have set a desired height of 270 for the settings panel. So even though it didn't appear like the scrollbar was there, it was in fact there only if you scrolled down to the very bottom of the main panel, as it is a separate scrollable.

The main culprit of this issue was that the OnGetPreferredHeightForWidth method needed to be overridden like OnGetPreferredHeight is.

@philstopford
Copy link
Contributor Author

@cwensley : great - thank you for digging into this and fixing it up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants