#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)
Change History (23)
by , 14 years ago
Attachment: | StyledEdit.png added |
---|
by , 14 years ago
Attachment: | MediaPlayer.png added |
---|
comment:1 by , 11 years ago
Cc: | added |
---|
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 11 years ago
patch: | 0 → 1 |
---|
by , 11 years ago
Attachment: | 0002-MediaPlayer-revert-hrev38440.patch added |
---|
comment:4 by , 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 , 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 , 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.
by , 11 years ago
Attachment: | 0001-BMenu-allow-to-top-open-disabled-menus-in-a-menubar..patch added |
---|
comment:7 by , 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:9 by , 11 years ago
Blocked By: | 4147 added |
---|
comment:10 by , 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:12 by , 11 years ago
comment:13 by , 11 years ago
Thanks! However, is there a reason in enabling menus with submenus on mouse over?
comment:14 by , 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:
- BeOS R5 did it.
- 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 , 11 years ago
by , 11 years ago
Attachment: | StyledEdit-Font-menu.png added |
---|
comment:16 by , 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 , 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.
I'll give this one a try :)