Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-12-20 20:50:39 +0400
committerTon Roosendaal <ton@blender.org>2012-12-20 20:50:39 +0400
commit566d35036961dbe2c786b70a2972ca77055420a6 (patch)
tree0d970133be2850333bc4e97c59b9fd505de4e931 /source/blender/editors/interface/resources.c
parent4d3f0cb8c1e7a47dda400727dea8657fb74265d8 (diff)
UI todo:
- Recoded soft shadow drawing for menus, giving better predictable results (and round off nicer on top side, was looking bad still) - Brought it under DPI control - Added Theme setting to control size and strength for it. Max size 24 pix: http://wiki.blender.org/index.php/File:MenuShadow.png
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r--source/blender/editors/interface/resources.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 3036961d279..4127c1b9abc 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -677,6 +677,9 @@ void ui_theme_init_default(void)
rgba_char_args_set(btheme->tui.yaxis, 0, 220, 0, 255);
rgba_char_args_set(btheme->tui.zaxis, 0, 0, 220, 255);
+ btheme->tui.menu_shadow_fac = 0.5f;
+ btheme->tui.menu_shadow_width = 12;
+
/* Bone Color Sets */
ui_theme_init_boneColorSets(btheme);
@@ -1259,6 +1262,12 @@ void UI_ThemeClearColor(int colorid)
glClearColor(col[0], col[1], col[2], 0.0);
}
+int UI_ThemeMenuShadowWidth(void)
+{
+ bTheme *btheme = UI_GetTheme();
+ return (int)(btheme->tui.menu_shadow_width * UI_DPI_FAC);
+}
+
void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3], const char axis)
{
unsigned char col[3];
@@ -2061,6 +2070,17 @@ void init_userdef_do_versions(void)
}
}
+ if (bmain->versionfile < 266) {
+ bTheme *btheme;
+
+ for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+ /* rna definition limits fac to 0.01 */
+ if (btheme->tui.menu_shadow_fac == 0.0f) {
+ btheme->tui.menu_shadow_fac = 0.5f;
+ btheme->tui.menu_shadow_width = 12;
+ }
+ }
+ }
if (U.pixelsize == 0.0f)
U.pixelsize = 1.0f;