Closed khaneliman closed 1 year ago
I think the popup system needs a rework some time in the future, it will have to be coupled with the vertical bar update #240, where exactly these annoyances surface as well. I am still not really sure how to handle the vertical configuration properly though.
There is a sketchy way to achieve what you want however... I have implemented popups such that the cell height is controlled by popup.height
of the parent item, BUT if the content of the item is larger (in height) than the configured cell height, it will use the items height as a cell height for that item instead... SO the trick here is to set the popup.height=0
and then change the item height by giving the members of the popup a transparent background with the desired height, i.e.:
background.color=0x00000000
background.height=30
background.drawing=on
now we can add a divider line and it will have smaller bounds, e.g.:
apple_divider=(
icon.drawing=off
label.drawing=off
background.color=$WHITE
background.height=1
padding_left=7
padding_right=7
width=110
background.drawing=on
)
This is the result:
Full example config:
Alright, sounds good. Thank you for the example of how to make it work for this case. I also like how clean it looks using the bash arrays for the item configs. Gonna have to update my code like that. Appreciate your work!
I will close this for now but I have this on my list of things that should be included in the new popup system
This is what worked for me using your example.
I'm trying to extend my apple menu to contain some more functionality and would like a visual way to separate items. I tried adding an item with a horizontal line to separate them but it has the line height too large. I can't seem to find a way to shrink the vertical space between items. There is no padding_top and padding_bottom and item.height / item.icon.height / item.icon.background.height dont seem to do anything. Y offset only shifts an item within the height drawn.