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

Recipe Card Center Scrollbar Jumps to Right When Mouse Pointer Approaches #210

Open
zombiewoof opened this issue Sep 23, 2020 · 5 comments

Comments

@zombiewoof
Copy link

Open a recipe card and move mouse pointer until it almost touches the scrollbar and the scroll bar between description/instructions side and ingredients jumps to the right. It will move to the right several times, if the mouse pointer is moved within the window as described. How many times it moves to the right varies by recipe, but it moves 3 or 4 times. First time is a big jump, seemingly related to the area reserved for the website URL. A long URL will be revealed, but the jump is substantial regardless of URL length, or even with no URL. After first jump, the jumps are small.

This jumping will occur even if there is no scrollbar, only a divider, on short recipes.

Jumping occurs with maximized window as well as size from guiprefs data.

Found one recipe, out of more than a dozen that does not exhibit this behavior. There is nothing obviously different from recipes that exhibit the behavior.

Ingredients can appear truncated at the right of the window, but moving the mouse outside of the window causes proper wrapping.

Environment

gourmet-5ad618be
Operating System: Ubuntu 20.04 (with latest updates)
Desktop: Cinnamon 4.4.8
Installed as Flatpak

@cydanil
Copy link
Collaborator

cydanil commented Sep 25, 2020

Thanks for reporting the issue!
I'm having trouble replicating this (perhaps as I use XFCE).
I know it's cumbersome to do, but may I ask you for a recording of this behaviour? There exist a number of tools for doing this.
I personally use simple screen recorder, which is available from apt:

sudo apt-get install simplescreenrecorder

Thank you!

@zombiewoof
Copy link
Author

zombiewoof commented Sep 26, 2020 via email

@zombiewoof
Copy link
Author

Had some extra time and got simplescreenrecorder installed. Very easy to use. I have attached
Gourmet_bar_jump-2020-09-26_10.42.36.mkv.tar.gz

You will note that there is no click within the card window, just mouse movement.

I learned, when attempting to make the recording, that clicking outside of the Gourmet card window will also cause the behavior. Previously, I had kept the mouse pointer within the window, so I did not know of the action triggered by clicking outside of the window. I had to use hotkey to start the recording in order to not trigger the action before I was recording.

@cydanil
Copy link
Collaborator

cydanil commented Sep 27, 2020

Thanks, I now able to reproduce that.
I'm not sure exactly what triggers it, but it has to do with Gtk.VBox and Gtk.HBox being resized to adapt to window size.

A fix is to make them fixed size, instead of dynamically sized.

@zombiewoof
Copy link
Author

From what I just read about the two Gtk box descriptions, and my limited programming knowledge, I'd guess that it is Gtk.HBox which is causing the problem. Might it be possible to use the width of the card window, picked up from guiprefs to calculate the width of the window, in pixels (if not already in pixels), then divide that in half (use integer) to determine a 'hard' width for the left HBox (description box) and use the remainder for the right HBox (ingredients box)? Or possibly allow the user to drag the bar to a location and save that location as a part of guiprefs?

The latter would be my choice as I've often wanted to position that bar more to the left when I have long descriptions for ingredients, which requires making the card window very wide in order to prevent wrapping with the bar splitting the window in half. Ingredient description wrapping was not pretty in the python2 version as there was no indent on subsequent lines and each line appeared to be an additional ingredient.

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

No branches or pull requests

2 participants