Opened 14 years ago

Closed 11 years ago

Last modified 11 years ago

#6610 closed bug (fixed)

[Interface Kit] it should be possible to open disabled menus

Reported by: diver Owned by: jscipione
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc: jessica.l.hamilton@…
Blocked By: #4147 Blocking:
Platform: All

Description

BeOS R5 has a useful feature which allows you top open disabled menus.



Currently it is not possible in Haiku.

After implementing this feature it would be possible to revert hrev38440.

Attachments (5)

StyledEdit.png (21.7 KB ) - added by diver 14 years ago.
MediaPlayer.png (7.6 KB ) - added by diver 14 years ago.
0002-MediaPlayer-revert-hrev38440.patch (1.5 KB ) - added by jessicah 11 years ago.
0001-BMenu-allow-to-top-open-disabled-menus-in-a-menubar..patch (1.4 KB ) - added by jessicah 11 years ago.
StyledEdit-Font-menu.png (23.2 KB ) - added by diver 11 years ago.

Download all attachments as: .zip

Change History (23)

by diver, 14 years ago

Attachment: StyledEdit.png added

by diver, 14 years ago

Attachment: MediaPlayer.png added

comment:1 by jessicah, 11 years ago

Cc: jessica.l.hamilton@… added

I'll give this one a try :)

comment:2 by jscipione, 11 years ago

Owner: changed from axeld to jscipione
Status: newassigned

comment:3 by jessicah, 11 years ago

patch: 01

comment:4 by jscipione, 11 years ago

Patch 0001 looks good but could you put the item->Frame.Contains(where) condition first and also put curly braces around the if block because the condition spans multiple lines.

comment:5 by jessicah, 11 years ago

Damn, I had the braces there the first time! I went through the style guide twice to try and see if I needed the braces or not. "omit braces for single line statements, place statement on a new line" needs to have an exception for the multi-line condition in the guide then... will amend :)

comment:6 by jscipione, 11 years ago

Ok so, I did some research and there appears to be some debate about whether or not having a multi-line conditional makes an if statement multi line or not. Discussion is here: http://www.freelists.org/post/haiku-commits/r36596-haikutrunksrcappspackageinstaller,2

Since neither the coding guidelines nor the ensuing discussion reached any consensus I guess it is ambiguous. I also managed to find some code that omitted the braces with a multi-line. So disregard that part apparently the issue is not so cut and dry.

comment:7 by jessicah, 11 years ago

Updated the patch anyway. Changed the dynamic_cast to be similar to other examples in the code, and also made it work for keyboard navigation for feature parity.

comment:8 by jscipione, 11 years ago

Ok this looks good now. Will test and apply tomorrow.

comment:9 by jscipione, 11 years ago

Blocked By: 4147 added

(In #4147) This fix for this bug was not right because it caused #6610

comment:10 by jscipione, 11 years ago

Unfortunately this patch does not match the behavior of BeOS R5. It allows for a disabled menu bar to be opened but does not allow disabled submenus of menu bars to be opened as BeOS R5 did.

comment:11 by jscipione, 11 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev45977

comment:12 by jscipione, 11 years ago

The 0002 patch applied in hrev45979 reverting the non-style parts of hrev38440 that are no longer needed now that this bug is fixed. Thanks for all your help jessicah. Please chime in here and let me know if there is any changes that I overlooked or are not correct.

comment:13 by diver, 11 years ago

Thanks! However, is there a reason in enabling menus with submenus on mouse over?

comment:14 by jscipione, 11 years ago

diver, what do you mean by "enabling menus with submenus on mouse over"?

If by "enabling" you mean allowing you to navigate but not select submenus then the reason is two-fold:

  1. BeOS R5 did it.
  2. There is a usability principle which states that you should never hide functionality from the user, only disabled it. That way the user knows what is possible and what is not and is given feedback for what conditions must occurs for things become available or become unavailable.

If by "enabling" you mean that you can actually select the submenu menu item and make it have effect on the program then I have made a mistake.

comment:15 by diver, 11 years ago

I mean that on mouse over menuitem's text color changes from gray to black which might lead to a false impression that this menu have effect on the program:

by diver, 11 years ago

Attachment: StyledEdit-Font-menu.png added

comment:16 by jscipione, 11 years ago

Ahh, okay, you're right, that isn't correct, the text should be grey still to show that it is disabled.

comment:17 by jscipione, 11 years ago

In hrev45981 I've updated the high color (the color of the text and arrow) of the disabled submenu items to appear disabled like the disabled leaf menu items. It was a little tricky because I had to tint the color differently based on the background color for each case and also had to make it work in case your selected background color was light instead of dark.

comment:18 by diver, 11 years ago

It looks ok now, thanks! This ticket can be closed.

Note: See TracTickets for help on using tickets.