diff options
author | Ton Roosendaal <ton@blender.org> | 2009-06-02 22:10:06 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-06-02 22:10:06 +0400 |
commit | ca24322413e78b60ece51902da1b8a9ac22d13ba (patch) | |
tree | f9111a453452e478a941fa4f35344bc4f382020b /source/blender/editors/interface/interface_style.c | |
parent | 67494dcad3330b1c056cef4b9aa21030c856cf5d (diff) |
2.5
Part one of new text button type: SEARCH_MENU
This opens a popup showing all matches for a typed string, nice
for object names, materials, operators, and so on.
Warning: Currently menu doesn't function yet! Only draws choices.
As test I've added an operator search button in top bar. It only
shows operators that can be used in this context now. Also that
is part of the WIP, tomorrow more fun :)
Diffstat (limited to 'source/blender/editors/interface/interface_style.c')
-rw-r--r-- | source/blender/editors/interface/interface_style.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index fca88132771..62a4c01bc6c 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -170,7 +170,7 @@ void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, char *str) if(fs->align==UI_STYLE_TEXT_CENTER) xofs= floor( 0.5f*(rect->xmax - rect->xmin - BLF_width(str))); else if(fs->align==UI_STYLE_TEXT_RIGHT) - xofs= rect->xmax - rect->xmin - BLF_width(str); + xofs= rect->xmax - rect->xmin - BLF_width(str) - 1; /* clip is very strict, so we give it some space */ BLF_clipping(rect->xmin-1, rect->ymin-4, rect->xmax+1, rect->ymax+4); |