-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
menu: support titles defined by <separator label="">
#1976
Conversation
I put a separator with label part way down the menu and it does something similar to the above Edit to add: never mind on the above, I had forgotten to adjust the menu max width in the theme |
Finally figured out what was going on. The separator_create needed to have menu->item_height set because it |
I feel like we should also add a font face for headers so users can for example make headers bold / italic use a smaller or bigger fonts size compared to the other menu items. |
We don't handle a pipemenu without a parent (well technically the parent is "openbox_menu", not "current_menu".) So, I'm thinking of copying init_rootmenu, adding another parm ie title, where the title matches the id= from Does this sound like the direction to go? |
Yes, good point. Will do. I'll probably leave this though until we're on 0.18 |
Ok, got pipemenus straightened out. Leaving out angle brackets (does funny formatting)
Either way shows the pipe menu |
menuitem->height = theme->menu_separator_line_thickness | ||
2 * theme->menu_separator_padding_height; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
menuitem->height needs check for being zero, otherwise you get funny results
copy lines 197-200 and you should be fine.
Ok, so far, I have pipemenus working, both with and without parent I have started working on client-list-menu. Edit to add: 07/31 have added client-list-combined-menu and client-send-to-menu Looking at what you referenced in OP about theme elements, I have these mentioned in many of my I don't think we address them at this time, the font and text color for title and menu would be useful. ETA2: added entry for MenuHeader (font), So with this, my separator labels are sligthly larger than items, bg blue, fg yellow with an oblique slant. ETA3: center justification to separator label |
various menu changes necessary for further menu work
various menu changes necessary for further menu work
various menu changes necessary for further menu work
various menu changes necessary for further menu work
various menu changes necessary for further menu work
various menu changes necessary for further menu work
various menu changes necessary for further menu work
From the todo list only menu.title.bg.border.color is not done, as I didn't venture into the border area. Only thing wrong with this code is it needs to pass code check, scripts/check will point that out. If you make many more changes than what you have already, |
various menu changes necessary for further menu work
various menu changes necessary for further menu work
various menu changes necessary for further menu work
src/menu/menu.c:281: ERROR: space required before the open brace '{' |
@droc12345 is adding that in a subsequent commit |
Ready for review from my perspective. |
various menu changes necessary for further menu work
Something weird going with on with the Void check which feel like it could be related to the patch. |
various menu changes necessary for further menu work
various menu changes necessary for further menu work
various menu changes necessary for further menu work
Not sure what's going on with void. I used your current code as a base and void didn't complain, compiled fine. I looked at the output log, but didn't see anything that stood out. and it took 3 minutes, so maybe it was Edit to add: After I made this comment, I started thinking that I had had a problem with void early on. I had to add a fix in the separator to recognize the label being blank ie "", and make it a separator line As I say, my changes will fix that. So don't worry about it. |
On Void it compiles fine, but the smoke test fails and the gdb stack-trace points to code in the PR. So doesn't feel right to ignore without investigating. So here goes the investigation:
So that Hooray for smoke test. Right, will sort some patches later. |
On my end, I just made sure never to send a "" label, as it didn't parse well. How does one do anything to a zero length string? |
...defined by `<separator label="">`. Also add the theme option `menu.title.bg.color: #589bda` The following will be added in separate commits - menu.title.bg.border.color: #7cb6ec - menu.title.text.color: #ffffff - menu.title.text.justify: center
...and set it in theme.c post_processing()
Have force pushed with fixes for the Void-smoke-test-failure. Also added documentation. |
various menu changes necessary for further menu work
LGTM |
Thanks. |
@droc12345 |
For visibility only so nobody else duplicates effort.
Cc: @heroin-moose (as you mentioned this some time ago).
Have implemented
menu.title.bg.color: #589bda
TODO: