Opened 7 years ago

Last modified 4 months ago

#8900 assigned enhancement

Design of Contextmenu

Reported by: Morbid Owned by: leavengood
Priority: normal Milestone: R1
Component: User Interface Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description

Contextmenu on Desktop should be streched a little to the right and Shortcuts placed in one column behind the arrows. What do you think?

Attachments (6)

screenshot2.png (106.9 KB ) - added by Morbid 7 years ago.
aligned_shortcuts.png (13.6 KB ) - added by leavengood 7 years ago.
Shortcuts aligned
align_shortcuts_ticket_8900.patch (1.2 KB ) - added by leavengood 7 years ago.
screenshot3.png (79.2 KB ) - added by Morbid 7 years ago.
Just_like_this_Demo_Arrows.png (45.1 KB ) - added by Morbid 7 years ago.
context-menu-alignment.png (124.4 KB ) - added by leavengood 4 months ago.

Download all attachments as: .zip

Change History (32)

by Morbid, 7 years ago

Attachment: screenshot2.png added

comment:1 by anevilyak, 7 years ago

Type: bugenhancement

comment:2 by leavengood, 7 years ago

Owner: changed from stippi to leavengood
Status: newassigned

You are just suggesting leaving the space for the submenu arrow when there is no submenu so that all the shortcuts are in the same column? That seems reasonable and should be easy enough. I'll take a look at this after our alpha4 release is done.

comment:3 by leavengood, 7 years ago

Well turns out this was stupidly easy. See the following attachment.

by leavengood, 7 years ago

Attachment: aligned_shortcuts.png added

Shortcuts aligned

comment:4 by leavengood, 7 years ago

But I'm not sure how much I like it. Other platforms that I've just looked at (Ubuntu and OS X) don't seem to leave this space.

comment:5 by Morbid, 7 years ago

For me it looks a little more professional! Did'nt try Ubuntu and OS X! Maybe we have to ask other guys about it. But i don't want to make an elephant out of a fly. LOL "professional" was the wrong word, sorry for that. "Elegant" is the right word.

Last edited 5 years ago by Morbid (previous) (diff)

comment:6 by leavengood, 7 years ago

I can't speak for all Haiku developers, but for me the small things matter so I'm fine with these sort of suggestions.

What is unique to Haiku compared to those other systems is menu items which have both a shortcut and a submenu, and I think this change makes sense when you consider that. In fact that is why that menu might look a bit strange normally.

But looking around the system with this change I see a few issues (menu items which don't look as good) so I'll hold off for now until after the release.

comment:7 by leavengood, 7 years ago

So I don't lose it, here is the patch which fixes this, including fixing the alignment issues I mentioned in my last comment.

by leavengood, 7 years ago

comment:8 by leavengood, 7 years ago

Has a Patch: set

comment:9 by Morbid, 7 years ago

Thanks again!

comment:10 by axeld, 7 years ago

I would say the spacing should only appear if there is any sub menu, otherwise, I could imagine this won't look as good. I like the changed alignment better in any case, though.

comment:11 by Morbid, 7 years ago

Ok! And what do you think about the Arrows! I like the Arrows in Tracker-Menu! See Screenschot!

by Morbid, 7 years ago

Attachment: screenshot3.png added

comment:12 by axeld, 7 years ago

What are you talking about? The arrows didn't change or did I miss something.

comment:13 by Morbid, 7 years ago

Last edited 7 years ago by Morbid (previous) (diff)

by Morbid, 7 years ago

comment:14 by x-ist, 7 years ago

Has a Patch: unset

My two cents:

  • I find the proposed alignment looks more tidy and improves readability (much like with good codestyle).
  • As axeld said, the spacing should appear in case there are submenus only.
  • The arrows from the demo pic are less intrusive and steal less attention, which I find better too, as the menu item text deserves the primary focus.

comment:15 by Morbid, 7 years ago

Thanks for commenting and to engage with my "cry's"! I know there are other Problems witch are more important to solve. If i may say this here: Great OS and big THANKS for HAIKU.

comment:16 by umccullough, 7 years ago

Has a Patch: set

reset "patch" flag that got turned off by accident

comment:17 by mmadia, 7 years ago

Any status updates on this patch?

comment:18 by leavengood, 7 years ago

I just didn't keep up with Haiku development for a while.

As seen from the patch the basic implementation is pretty simple. It would be a bit more complicated to only do the padding if there are submenus anywhere on the given menu, but I can probably get it to work.

comment:20 by pulkomandy, 17 months ago

Has a Patch: unset

comment:21 by leavengood, 4 months ago

The patch is 404 on Gerrit now. No big deal, the menu code has changed quite a bit since the patch. I see the places that need to change to reproduce it.

Doing what Axel suggested (only shift things over if there are submenus) is kind of a pain because menu items would need to know if any other menu items have a submenu to adjust where they render their shortcut symbol. So as far as I know they would have to query up to their parent to ask and the parent might want to cache that knowledge. But we are sort of running out of room in BMenu, though it is full of crufty booleans that I don't think we need anymore, so I could maybe repurpose one.

I personally would not mind just always moving things over so menus are always consistent, which is basically what the simple version of this change does.

comment:22 by pulkomandy, 4 months ago

The patch is still there (of course), it just seems that I failed copying the URL here.

https://review.haiku-os.org/c/haiku/+/355

comment:23 by pulkomandy, 4 months ago

As mentionned there, adding the space for the shortcut arrow is fine now (as another patch since then made that arow smaller and similar in size to the checkmark on the other side, which always has reserved space as well). We just need to make sure it looks fine when there are no shortcuts in a menu.

comment:24 by leavengood, 4 months ago

OK, thanks, and I see you updated the patch for the current code. I'll download that change from Gerrit and give it a try with various menus to make sure it doesn't cause issues. Then hopefully we can get it merged.

by leavengood, 4 months ago

Attachment: context-menu-alignment.png added

comment:25 by leavengood, 4 months ago

So I cherry-picked the latest patch and applied it. My first reaction was that I do not like it. But now I am not sure. Attached is a comparison between the normal on the left and the patch on the right. I would include the screenshot in this comment but it is a bit too big.

I don't think it is worth it to try to dynamically add the space only when there are submenus in the menu being drawn. Either we add the space or we don't.

FWIW I noticed Windows (8 at least) does this with the left side where there can be icons, like here:

https://www.online-tech-tips.com/wp-content/uploads/2014/02/context-menu-windows-8.jpg.optimal.jpg

I think Windows 10 does too.

So we would not be totally out on our own here to line things up.

comment:26 by pulkomandy, 4 months ago

The new layout looks fine to me except for the "data bits" submenu which is clearly unbalanced. I think the current layout is:

  • checkmark
  • label + margin
  • shortcut (if used)
  • arrow

And we could switch to:

  • checkmark
  • label
  • margin + shortcut (if used)
  • arrow

However that's a minor thing, if it's too complex to achieve I would just merge the change as is

Note: See TracTickets for help on using tickets.