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:
authorJulian Eisel <eiseljulian@gmail.com>2018-07-03 01:46:02 +0300
committerJulian Eisel <eiseljulian@gmail.com>2018-07-03 01:54:46 +0300
commitbe5482ba2fa788279434f46eacf504821d1c6223 (patch)
tree41fe790358958f12f5f209a45f4ec147115b963f /source/blender/editors/interface/interface_widgets.c
parent98d205508977a6f72bf554ae244328da9191f4b3 (diff)
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.
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r--source/blender/editors/interface/interface_widgets.c5
1 files changed, 4 insertions, 1 deletions
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);
}
}