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:
authorCampbell Barton <ideasman42@gmail.com>2011-08-11 08:53:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-11 08:53:57 +0400
commit226e424cb2cb52edfba0f098a4ac4537fd1db914 (patch)
treed49d1d0376872d008b7315d7600ceca346cd96bf /source/blender/editors/interface/interface_style.c
parent6f08f18d2708b84cab782b0019149b3cb552dbd7 (diff)
parent50277c48ba5bf9eae418453159e421489895dafd (diff)
svn merge -r39057:39286 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/editors/interface/interface_style.c')
-rw-r--r--source/blender/editors/interface/interface_style.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 5f2a757d2e3..8d4b4209120 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -149,9 +149,9 @@ void uiStyleFontDrawExt(uiFontStyle *fs, rcti *rect, const char *str,
int xofs=0, yofs;
uiStyleFontSet(fs);
-
- height= BLF_height(fs->uifont_id, "2"); /* correct offset is on baseline, the j is below that */
- yofs= floor( 0.5f*(rect->ymax - rect->ymin - height));
+
+ height= BLF_ascender(fs->uifont_id);
+ yofs= ceil( 0.5f*(rect->ymax - rect->ymin - height));
if(fs->align==UI_STYLE_TEXT_CENTER) {
xofs= floor( 0.5f*(rect->xmax - rect->xmin - BLF_width(fs->uifont_id, str)));
@@ -206,9 +206,9 @@ void uiStyleFontDrawRotated(uiFontStyle *fs, rcti *rect, const char *str)
uiStyleFontSet(fs);
- height= BLF_height(fs->uifont_id, "2"); /* correct offset is on baseline, the j is below that */
+ height= BLF_ascender(fs->uifont_id);
/* becomes x-offset when rotated */
- xofs= floor( 0.5f*(rect->ymax - rect->ymin - height)) + 1;
+ xofs= ceil( 0.5f*(rect->ymax - rect->ymin - height));
/* ignore UI_STYLE, always aligned to top */