Surge: The Laundry List of Linux Menu UI Problems

Created on 15 Feb 2019  Â·  18Comments  Â·  Source: surge-synthesizer/surge

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)

Linux UI

Most helpful comment

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

All 18 comments

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

Confirmed about the item 2

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

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.

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!

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.

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

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.

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.

@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.

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 3b0509183db13b3e224f1ef61d9d2645d74fb16a~

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

is the correct rev sorry

@baconpaul as per your request

the example of the menu ghosting/lag

surge menu ghost

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)

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.

@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)

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

Just gonna make it a separate issue

Was this page helpful?
0 / 5 - 0 ratings