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

The Laundry List of Linux Menu UI Problems #617

Closed
baconpaul opened this issue Feb 15, 2019 · 18 comments
Closed

The Laundry List of Linux Menu UI Problems #617

baconpaul opened this issue Feb 15, 2019 · 18 comments
Labels
Linux Issues which only occur on Linux UI Issues related to UI look&feel

Comments

@baconpaul
Copy link
Collaborator

baconpaul commented Feb 15, 2019

So we have fixed almost all the UI problems with linux menus (there is still the callback problem which means some don't work).

There's only two small changes needed

1: Do we want to add a visual indicator (like a little 'down arrow' and 'up arrow') at the top of menus when they clip? I think so but that's a change to genericoptionmenu in vstgui
2: Enter doesn't select an item when you navigate with the keyboard. Again probably somewhere in genericoptionmenu. (This is done and in master and is also merged with vstgui)

@baconpaul
Copy link
Collaborator Author

@tank-trax and @rghvdberg tagging you on this issue as you've both mentioned these things to me I think.

@baconpaul baconpaul added UI Issues related to UI look&feel Linux Issues which only occur on Linux labels Feb 15, 2019
@tank-trax
Copy link
Collaborator

Confirmed about the item 2

@rghvdberg
Copy link
Contributor

I'd like to have the visual indicators
(U+2303)
(U+2304)

@baconpaul
Copy link
Collaborator Author

OK the reason for enter not working is pretty clear. vstgui doesn't respond to enter!

https://github.com/steinbergmedia/vstgui/blob/develop/vstgui/lib/platform/common/genericoptionmenu.cpp

look at the onkeydown

Also that esc handler doesn't work well at all. Segfaults for me

I'll see if I can figure it out quickly.

baconpaul added a commit that referenced this issue Feb 18, 2019
Move the VSTGUI pointer one last to sweep my change to vstgui
which makes enter work in genericoptionmenu. Addresses the more 
important of the two issues in #617
@baconpaul
Copy link
Collaborator Author

Enter now works at master.
The glyph is a right pain - I may just never do it. Happy for a PR or diff if you do!

@baconpaul
Copy link
Collaborator Author

Ahh and @tank-trax reports that menus still misplace at zooms < 100%. Let me add that to this issue too which we can use as a placeholder for linux menu problems generally until they are all gone.

@baconpaul
Copy link
Collaborator Author

Linux menu GUI problems. #536 is the linux menu callback issue.

@baconpaul baconpaul changed the title Last of the Linux Menu UI problems Add indicator glyph to linux menus to indicate more options Feb 20, 2019
@baconpaul baconpaul changed the title Add indicator glyph to linux menus to indicate more options The Laundry List of Linux Menu UI Problems Feb 21, 2019
@tank-trax
Copy link
Collaborator

This would be a best case scenario so in essence a Feature Request.

In Windows when the Mouse navigates over the Preset Menu there is a delay so that the sub-Menu will not expand unless the mouse lingers for a bit.

surge win menu delay

As well, there are Arrows at the top and bottom. Active only if there are items the exceed the boundaries.

surge win menu arrows

In Linux, Ardour has a similar features (delay and up/down arrows) for its Menus.

ardour menu

Currently there are two options for Linux. Up, Down, Left, Right Arrows and Enter allow for efficient and seamless navigation and selections.

menu lin arrow key l r

When scrolling up and down using the Arrows on the Keyboard the sub-Menus will not expand. They only expand when using the right arrow and the either up or down will start the scrolling on the sub-Menu.

menu lin arrow key

Using the Mouse to navigate will always expand the sub-Menus. Once the bottom of the Menu is reached the Scroll Wheel on the Mouse is needed to get to the items below.

menu lin mouse

Ideally

  1. there would be a delay from when the Mouse has the pointer over the Menu item and when its sub-Menu expands

  2. there would be Arrows at the Top and Bottom that scroll towards the hidden items when hovered over or mouse down.

@baconpaul
Copy link
Collaborator Author

Thanks again for a great and clear report @tank-trax - I'm not working on this now but let me add some comments for the intrepid linux dev who chooses to!

These problems are all in vstgui; specifically in vstgui/lib/platform/common/genericoptionmenu.cpp. As of this writing our version of genericoptionmenu is ahead of both steinberg's master and develop, applying the transform changes which are in an open PR. So they have not addressed either issue at vstgui.

Of the two issues, the painting of an arrow is the easier. In ::setupGenericOptionMenu you can see where both the view rect is clipped to the frame and also where the offset is calculated. Look around like 450 as of this writing. Then later around line 504 you bound the viewRect by the frame size. So to do the glyphs, probably want to do something around that bound which checks clipping and choses to put the glyphs on. But it's not easy because the menu actually doesn't know it is clipped; it is just sailing around in offset space with a cliprect. The actual painting of the menu happens in vstgui/lib/cdatabrowser.cpp (the linux menus work by providing a data source to the list view control basically) and that is a VSTGUI::CScrollView so probably have to pop up that inheritance stack to do the glyph draw.

The second one is quite a bit harder. The opening of submenus happens two places in genericoptionmenu. (1) when you press VKEY_RIGHT and (2) in the onMouseMoved handler. To get the effect you want you would want to add a function called "delayedOpenSubMenu()" which sets a timer (somehow) to call openSubMenu then call that from dbOnMouseMoved and also from the keyboard up down navigation. The trick is you need to cancel that timer if you move out of the cell so the state management is hard as well as the timer management. But that's where the code has to go.

And after those changes are happened, we need to roll em up and submit em as a PR to steinberg. That's a bit tricky.

So if you are going to work on this issue, please do tag me here and I can give you some tips.

@tank-trax
Copy link
Collaborator

@baconpaul

I noticed Enter does not work when using up, down, left, right arrows on Menus

it last worked on a build dated 02/19/2019 10:30 PM
On this build, Enter works, whereas the Menu/About function does not.

on the next build dated 02/20/2019 at 05:31 PM
the Enter will not select a preset however the Menu/About functions.

@baconpaul
Copy link
Collaborator Author

baconpaul commented Feb 21, 2019

I just took a quick look and it worked for me. Could your vstgui be stale?

Does "git status" show you at master? Did you "git pull" and "git submodule update --init --recursive"?

Also do you see this version?

paul@ubuntu:/surge$ git log vstgui.surge | head -1
commit 3b05091

@baconpaul
Copy link
Collaborator Author

paul@ubuntu:~/surge$ (cd vstgui.surge; git log | head -1)
commit 1c614c352fa92cffcaa33a22fede07c1daca4bc0

is the correct rev sorry

@tank-trax
Copy link
Collaborator

@baconpaul as per your request

the example of the menu ghosting/lag

surge menu ghost

baconpaul added a commit to baconpaul/surge that referenced this issue Jul 10, 2019
Move the VSTGUI pointer one last to sweep my change to vstgui
which makes enter work in genericoptionmenu. Addresses the more 
important of the two issues in surge-synthesizer#617

Former-commit-id: a348feecd29db89db56d69ae96493a5d773131d0 [formerly 3b05091]
Former-commit-id: fa67e8be5903546ca3e56558064eafdf1c44405d
Former-commit-id: aa79d5658263ec10f408fe10f436a2a685441233
@tank-trax
Copy link
Collaborator

I'd like to resurrect this request if possible
tagging @jpcima or @falkTX

the latest improvements to the menus in Linux have been significant, greatly appreciated, the stability, quickness of response and that the ghosting no longer happens

was wondering if these modifications could be implemented

  1. have a delay when navigating with the mouse over menus so the submenus do not immediately expand
  2. arrows that appear and can be pressed to continue with the menu scrolling when the top or bottom of the menu has been navigated to with the mouse
  3. that the submenus for the Menu button on the bottom right and the Effects drop down menu expand to the left rather than to the right (which causes overlap and makes it cumbersome to select items)

@baconpaul baconpaul modified the milestones: 1.6.n, Currently Unscheduled Oct 4, 2019
@baconpaul
Copy link
Collaborator Author

I actually think the menus are pretty good now with both the animation and opening side fixed. @tank-trax if you think there's anything still needing doing in this issue lets open a separate more specific one but I'm gonna close this.

@tank-trax
Copy link
Collaborator

@baconpaul the only other thing I'd like to see added would be....

  • an up arrow at the top of the menu and a down arrow at the bottom whenever there are items outside the up or down boundaries

apart from that the menu in Linux is in very good shape (the expanding on left for FX and Menu being a huge improvement for workflow)

@baconpaul baconpaul reopened this Jun 4, 2020
@baconpaul
Copy link
Collaborator Author

oh yeah thanks. lemme re-open and see if that's hard

@baconpaul
Copy link
Collaborator Author

Just gonna make it a separate issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linux Issues which only occur on Linux UI Issues related to UI look&feel
Projects
None yet
Development

No branches or pull requests

4 participants