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-25 19:49:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-25 19:49:52 +0400
commitb7eac1edcf472df7c705e6c3463e8404f72422df (patch)
tree6966686125b6e31c820edd44c8e1818b2388dd34 /source/blender/editors/interface/interface_draw.c
parentb44a82f3c4d00a84e36c81512080c0c616ac8bad (diff)
picky style edits with screen/view/drawing, also remove own bad example doc.
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r--source/blender/editors/interface/interface_draw.c40
1 files changed, 13 insertions, 27 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index dd7d2ca765f..76ed9891b8e 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -530,14 +530,11 @@ static void ui_draw_but_CHARTAB(uiBut *but)
int charmax = G.charmax;
/* FO_BUILTIN_NAME font in use. There are TTF FO_BUILTIN_NAME and non-TTF FO_BUILTIN_NAME fonts */
- if(!strcmp(G.selfont->name, FO_BUILTIN_NAME))
- {
- if(G.ui_international == TRUE)
- {
+ if(!strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
+ if(G.ui_international == TRUE) {
charmax = 0xff;
}
- else
- {
+ else {
charmax = 0xff;
}
}
@@ -562,16 +559,13 @@ static void ui_draw_but_CHARTAB(uiBut *but)
cs = G.charstart;
/* Set the font, in case it is not FO_BUILTIN_NAME font */
- if(G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME))
- {
+ if(G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
// Is the font file packed, if so then use the packed file
- if(G.selfont->packedfile)
- {
+ if(G.selfont->packedfile) {
pf = G.selfont->packedfile;
FTF_SetFont(pf->data, pf->size, 14.0);
}
- else
- {
+ else {
char tmpStr[256];
int err;
@@ -580,10 +574,8 @@ static void ui_draw_but_CHARTAB(uiBut *but)
err = FTF_SetFont((unsigned char *)tmpStr, 0, 14.0);
}
}
- else
- {
- if(G.ui_international == TRUE)
- {
+ else {
+ if(G.ui_international == TRUE) {
FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, 14.0);
}
}
@@ -595,8 +587,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
glRectf((rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax));
glColor3ub(0, 0, 0);
- for(y = 0; y < 6; y++)
- {
+ for(y = 0; y < 6; y++) {
// Do not draw more than the category allows
if(cs > charmax) break;
@@ -676,23 +667,19 @@ static void ui_draw_but_CHARTAB(uiBut *but)
glShadeModel(GL_FLAT);
/* Return Font Settings to original */
- if(U.fontsize && U.fontname[0])
- {
+ if(U.fontsize && U.fontname[0]) {
result = FTF_SetFont((unsigned char *)U.fontname, 0, U.fontsize);
}
- else if (U.fontsize)
- {
+ else if (U.fontsize) {
result = FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize);
}
- if (result == 0)
- {
+ if (result == 0) {
result = FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, 11);
}
/* resets the font size */
- if(G.ui_international == TRUE)
- {
+ if(G.ui_international == TRUE) {
// uiSetCurFont(but->block, UI_HELV);
}
}
@@ -1604,7 +1591,6 @@ void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select))
#endif
{
a= i*aspect;
-
}
for(; i--; a-=aspect) {