This adds a theme option for UI emboss style and slightly updates the User Prefereces > Themes > User Interface to reflect it per discussion on T42228. Thanks to @Julian Eisel (Severin) for the helpful walkthrough!
Details
- Reviewers
Campbell Barton (campbellbarton) Pablo Vazquez (pablovazquez) - Maniphest Tasks
- T42228: Remove widget emboss
Diff Detail
- Repository
- rB Blender
- Branch
- interface/widget-emboss-color
Event Timeline
| source/blender/makesdna/DNA_userdef_types.h | ||
|---|---|---|
| 172 | This isn't really needed, you can just change short pad (line 178) to short pad[3], instead | |
Looks good!
Commented inline about a compile error.
| source/blender/editors/interface/interface_widgets.c | ||
|---|---|---|
| 760 | I'm no dev, but I get a build error because of this. (ISO C90 forbids mixed declarations and code) Declarations should be done at the beginning of the block (line 749, where the loop starts). | |
Thanks for the comments @Julian Eisel (Severin) and @venomgfx. Updated the diff.
Anything else needed @Campbell Barton (campbellbarton)?
Suggest not to draw emboss if alpha == 0
Note, on my system emboss isn't being initialized, probably needs version bump? (all zeros, resetting factory defaults fixes)
| source/blender/editors/interface/interface_widgets.c | ||
|---|---|---|
| 762 | this can be handled a little smarter... if (wtb->emboss) {
UI_GetThemeColor4ubv(TH_EMBOSS, emboss);
if (emboss[3]) {
.....glColor4ubv. glVertexPointer, glDrawArrays... etc
} | |
Love the idea of using alpha for emboss.
It initalized correctly the first time here, but changing theme or using "Reset to default" changed it to black with 0 alpha (patched on current master / Graph theme).
Thanks @Campbell Barton (campbellbarton)! Is that's what you meant for the version bump?
Emboss isn't initialized here, R, G, B & A are set to 0.0.
| source/blender/editors/interface/resources.c | ||
|---|---|---|
| 2499 | I believe you should do the version bump here with "U.subversionfile < 2" instead of "U.subversionfile < 1". | |
- Revert "Update widget emboss to only draw if alpha =! to zero"
- Fix version and re-add check for alpha on emboss