diff options
author | Ton Roosendaal <ton@blender.org> | 2003-10-24 02:28:49 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-10-24 02:28:49 +0400 |
commit | 904c039e3c8f9e40ece9f9cfa9ddf3dec8fe6e2c (patch) | |
tree | d35eea32681a1ae03b2f5aed3ae6276cf2ebbc0a /source | |
parent | 734637215b30a87641df83d2e33148f14a360455 (diff) |
- added ifdef INTERNATIONAL for changes in interface.c
- changed switching to smaller/larger fonts, it now does only 1 pnt size.
with standard font (11), medium is 10, small 9
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/ftfont/intern/FTF_TTFont.cpp | 8 | ||||
-rw-r--r-- | source/blender/src/interface.c | 40 | ||||
-rw-r--r-- | source/blender/src/language.c | 2 |
3 files changed, 26 insertions, 24 deletions
diff --git a/source/blender/ftfont/intern/FTF_TTFont.cpp b/source/blender/ftfont/intern/FTF_TTFont.cpp index ef17a610cd9..5dbcf368331 100644 --- a/source/blender/ftfont/intern/FTF_TTFont.cpp +++ b/source/blender/ftfont/intern/FTF_TTFont.cpp @@ -185,8 +185,8 @@ int FTF_TTFont::SetFont(char* str, int size) fontl = new FTGLPixmapFont(str); success = fonts->FaceSize(size-2<8?8:size-2); - success = fontm->FaceSize(size); - success = fontl->FaceSize(size+2); + success = fontm->FaceSize(size-1<8?8:size-1); + success = fontl->FaceSize(size); if(!success) return 0; success = fonts->CharMap(ft_encoding_unicode); @@ -238,8 +238,8 @@ void FTF_TTFont::SetEncoding(char* str) void FTF_TTFont::SetSize(int size) { fonts->FaceSize(size-2<8?8:size-2); - fontm->FaceSize(size); - fontl->FaceSize(size+2); + fontm->FaceSize(size-1<8?8:size-1); + fontl->FaceSize(size); font_size = size; } diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index 012072a94ae..f55f041b0bb 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -466,7 +466,6 @@ static void ui_positionblock(uiBlock *block, uiBut *but) ui_graphics_to_window(block->win, &block->minx, &block->miny); ui_graphics_to_window(block->win, &block->maxx, &block->maxy); - } @@ -598,7 +597,7 @@ void uiDrawBlock(uiBlock *block) } ui_draw_links(block); - + uiPanelPop(block); // matrix restored } @@ -1695,7 +1694,7 @@ static int ui_do_but_BLOCK(uiBut *but) but->flag |= UI_SELECT; ui_draw_but(but); - block= but->block_func(0); + block= but->block_func(but->poin); block->xofs = -2; /* for proper alignment */ ui_positionblock(block, but); @@ -2354,6 +2353,24 @@ static int ui_mouse_motion_towards_block(uiBlock *block, uiEvent *uevent) return 0; } + +static void ui_set_ftf_font(uiBlock *block) +{ + +#ifdef INTERNATIONAL + if(block->aspect<1.15) { + FTF_SetFontSize('l'); + } + else if(block->aspect<1.59) { + FTF_SetFontSize('m'); + } + else { + FTF_SetFontSize('s'); + } +#endif +} + + /* return: * UI_NOTHING pass event to other ui's * UI_CONT don't pass event to other ui's @@ -3055,21 +3072,6 @@ static void ui_set_but_val(uiBut *but, double value) } -static void ui_set_ftf_font(uiBlock *block) -{ - - if(block->aspect<1.05) { - FTF_SetFontSize('l'); - } - else if(block->aspect<1.59) { - FTF_SetFontSize('m'); - } - else { - FTF_SetFontSize('s'); - } - -} - void uiSetCurFont(uiBlock *block, int index) { @@ -3765,7 +3767,7 @@ short pupmenu(char *instr) short a, startx, starty, endx, endy, boxh=TBOXH, x1, y1; static char laststring[UI_MAX_NAME_STR]; MenuData *md; - + /* block stuff first, need to know the font */ block= uiNewBlock(&listb, "menu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin); uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_NUMSELECT); diff --git a/source/blender/src/language.c b/source/blender/src/language.c index dfe29615e87..a8918c3862f 100644 --- a/source/blender/src/language.c +++ b/source/blender/src/language.c @@ -212,7 +212,7 @@ void start_interface_font(void) { } } else { U.language= 0; - U.fontsize= 10; + U.fontsize= 11; U.encoding= 0; #if defined (__APPLE__) |