Remove code duplication.
authorAndrea Weikert <elubie@gmx.net>
Sun, 7 Nov 2010 18:16:27 +0000 (18:16 +0000)
committerAndrea Weikert <elubie@gmx.net>
Sun, 7 Nov 2010 18:16:27 +0000 (18:16 +0000)
Will look into nicely using uiStyleFontDraw later.

source/blender/editors/space_file/file_draw.c

index 719c29c3d3c6310d3fbb19b10b4bcb3c3416f8c7..6f499b3ecfd7806b6ac904b7798c8cc0abab4f49 100644 (file)
@@ -306,14 +306,8 @@ static void file_draw_string(int sx, int sy, const char* string, float width, in
        x = (float)(sx);
        y = (float)(sy-height);
 
-       if (style->widget.kerning == 1)
-               BLF_enable(style->widget.uifont_id, BLF_KERNING_DEFAULT);
-
-       uiStyleFontSet(&style->widget);
-       BLF_position(style->widget.uifont_id, x, y, 0);
-       BLF_draw(style->widget.uifont_id, fname);
-       if (style->widget.kerning == 1)
-               BLF_disable(style->widget.uifont_id, BLF_KERNING_DEFAULT);
+       UI_DrawString(x,y, fname);
+
 }
 
 void file_calc_previews(const bContext *C, ARegion *ar)