Menu vertical alignment and highlight (with patch)

Hello again :slight_smile:

Similar to the SelectList, the vertical position of the text in a Menu (and friends such as ComboBox) is a bit off. Also the highlight bar doesn’t adjust it’s width when the scrollbar.

Before patch (from here, apply to root src/tonegod/gui/controls) …

After patch …

RR

4 Likes

This and the SelectList patch have been applied. I’ll push out the update tonight.

Great :slight_smile:

Just a quick note. I’m hoping to get this pushed out tonight… It will be tomorrow night at the latest. Hoping today.

@rockfire
Heh… another note:

I had to alter the patch for menu, as it broke menu. Forgot to mention this.

Please let me know if it still works as intended. As far as I can tell, it looks like it fixed the alignment issue you showed in the images still, but need to know from you if this is the case.

If it doesn’t, let me know and we’ll figure out how to get them both working together.

It mostly still works. The initial alignment is still good, but if you resize the container so that the scrollbar is no longer required, the borders of the scrollable area extend, but the selection highlight no longer extends as well.

That was what I added ScrollArea.onAdjustWidthForScroll() hook for, and overrid that method in SelectList. Did that cause problems?

@rockfire said: It mostly still works. The initial alignment is still good, but if you resize the container so that the scrollbar is no longer required, the borders of the scrollable area extend, but the selection highlight no longer extends as well.

That was what I added ScrollArea.onAdjustWidthForScroll() hook for, and overrid that method in SelectList. Did that cause problems?

Nope… there was a line removed in Menu that scrolled the menu to the menuPadding. I replaced this with 0 and added the padding to the submenu arrow to fix the alignment/scrolling issue. None of this should have effected the patch. Would it be a huge bother to have you compare the updates to your patch and make sure the rest was applied properly?