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:
authorMatt Ebb <matt@mke3.net>2009-03-09 11:56:36 +0300
committerMatt Ebb <matt@mke3.net>2009-03-09 11:56:36 +0300
commit99ef543e56e33777a35ec663d02f162a5ab280c2 (patch)
tree197ab3fdf80a87140071bdd1732421af587e94b6 /source/blender/editors
parent0fd155f78eca62241b1f15b6b820c1fa7924d778 (diff)
* fixed the pulldown text embossing, looked awful on dark themes
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_draw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index c45fc7ed73d..a5c334e350f 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -2221,10 +2221,15 @@ static void ui_draw_text(uiBut *but, float x, float y, int sunken)
/* text color, with pulldown item exception */
if(but->dt==UI_EMBOSSP) {
- if((but->flag & UI_ACTIVE) && but->type!=LABEL) { // LABEL = title in pulldowns
- UI_ThemeColorShadeAlpha(TH_MENU_TEXT_HI, col_offs, alpha_offs);
+ if (sunken) {
+ float col[4];
+ UI_GetThemeColor4ubv(TH_MENU_TEXT, col);
+ if ((col[0] + col[1] + col[2]) / 3.f < 0.5f)
+ UI_ThemeColorShadeAlpha(TH_HEADER, 40, alpha_offs);
+ } else if((but->flag & UI_ACTIVE) && but->type!=LABEL) { // LABEL = title in pulldowns
+ UI_ThemeColorShadeAlpha(TH_MENU_TEXT_HI, 0, alpha_offs);
} else {
- UI_ThemeColorShadeAlpha(TH_MENU_TEXT, col_offs, alpha_offs);
+ UI_ThemeColorShadeAlpha(TH_MENU_TEXT, 0, alpha_offs);
}
}
else {