From be5482ba2fa788279434f46eacf504821d1c6223 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 3 Jul 2018 00:46:02 +0200 Subject: UI: Dim color of shortcut label in menus and toolbar The shortcut labels now use the "Item" theme color. Its contrast for hovered items is a bit low, but not too bad. Note that this also changes the color of the little toolbar triangle to be grey (the same color we use for the keymap label). IMHO that looks better though. This doesn't update any themes other than the default one. Part of T54711. --- source/blender/editors/interface/interface_widgets.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/interface/interface_widgets.c') diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index dbd65ade307..4bf2ac4271b 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1961,9 +1961,12 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b /* part text right aligned */ if (drawstr_right) { + const char *col = but->block->flag & (UI_BLOCK_LOOP | UI_BLOCK_SHOW_SHORTCUT_ALWAYS) ? + wcol->item : wcol->text; + fstyle->align = UI_STYLE_TEXT_RIGHT; rect->xmax -= UI_TEXT_CLIP_MARGIN; - UI_fontstyle_draw(fstyle, rect, drawstr_right, (unsigned char *)wcol->text); + UI_fontstyle_draw(fstyle, rect, drawstr_right, (const uchar *)col); } } -- cgit v1.2.3