UI: Fix drawing of the sidebar tabs.
Details
Diff Detail
- Repository
- rB Blender
Event Timeline
This is awesome, really great to clean up this stuff. All this one-off tab drawing code had no business existing in this file anyway.
For anyone who isn't zooming in very very close, I don't think I would exactly call this a "fix", it's really a cleanup and a slight visual change.
The end result looks good in my opinion. The rectangles for inactive tabs are darker, but I think it's a good balance. I would suggest the following tweaks to accompany this though:
- Tab outline to 2E2E2E -- Makes the edge of the inactive tabs pop just a little bit, so they still look clickable
- Tab active to 424242 -- Just a subtle change to match the active tab in the properties editor and the panel headers
- Decrease the factor for padding between tabs from 6 to 4. -- They look a bit too spaced out after this change IMO, and this will also let people fit more tabs
| Patch | With my tweaks |
| source/blender/editors/interface/interface_panel.c | ||
|---|---|---|
| 1229 | This should be 6.0f to make it clear that it's a float | |
| 1231 | Same here, (although I suggest 4.0f in my comment :) | |
| 1384 | I know it's obvious now, but sometime in the future it would probably help someone to have a comment here: /* Draw filled rectangle and outline for tab. */ | |
Code wise this looks good to me. And low risk too because it's just using existing code.
I'd like @Pablo Vazquez (pablovazquez) to offer an opinion on the visuals here though.
Pablo was okay with this in chat, so I went ahead and committed this patch with some minor tweaks, mainly moving the two values we discussed to defines above the function.



