diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-02-10 02:00:21 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-02-10 02:17:50 +0300 |
commit | 4b365064cfbd4cc802e0e575bcbbfc9539e9fda2 (patch) | |
tree | 8348c420f4342005ff22a32b72aca433ef81523c /source/blender/editors/interface/interface_panel.c | |
parent | 0ce76a427475c469e22fbe02e5b93b9e943aaf47 (diff) |
Remove most (maybe all?) remaining yellow text
Decided to request the text color as argument for UI_fonstyle_draw
functions, rather than keeping it being another state to keep track of.
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 9daddc459aa..1bdc47e5037 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -536,29 +536,29 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, const r rcti hrect; int pnl_icons; const char *activename = panel->drawname[0] ? panel->drawname : panel->panelname; + unsigned char col_title[4]; /* + 0.001f to avoid flirting with float inaccuracy */ if (panel->control & UI_PNL_CLOSE) pnl_icons = (panel->labelofs + 2 * PNL_ICON + 5) / block->aspect + 0.001f; else pnl_icons = (panel->labelofs + PNL_ICON + 5) / block->aspect + 0.001f; - - /* active tab */ + /* draw text label */ - UI_ThemeColor(TH_TITLE); - + UI_GetThemeColor4ubv(TH_TITLE, col_title); + hrect = *rect; if (dir == 'h') { hrect.xmin = rect->xmin + pnl_icons; hrect.ymin += 2.0f / block->aspect; - UI_fontstyle_draw(&style->paneltitle, &hrect, activename); + UI_fontstyle_draw(&style->paneltitle, &hrect, activename, col_title); } else { /* ignore 'pnl_icons', otherwise the text gets offset horizontally * + 0.001f to avoid flirting with float inaccuracy */ hrect.xmin = rect->xmin + (PNL_ICON + 5) / block->aspect + 0.001f; - UI_fontstyle_draw_rotated(&style->paneltitle, &hrect, activename); + UI_fontstyle_draw_rotated(&style->paneltitle, &hrect, activename, col_title); } } |