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>2019-11-27 16:58:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-11-27 17:04:21 +0300
commitf1c994c555da7c3e27984cc26b7f226badbe670d (patch)
treea42c43762e56cad6f59f50922ef4c341b5632826 /source/blender/editors/space_text/text_autocomplete.c
parentf6cefbef22c8c6583b4927c179dabac3eb57aa22 (diff)
Cleanup: move space text vars into a runtime struct
Also use more descriptive names.
Diffstat (limited to 'source/blender/editors/space_text/text_autocomplete.c')
-rw-r--r--source/blender/editors/space_text/text_autocomplete.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c
index 9b10f9831a5..a560b8af70f 100644
--- a/source/blender/editors/space_text/text_autocomplete.c
+++ b/source/blender/editors/space_text/text_autocomplete.c
@@ -83,11 +83,11 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
text_update_character_width(st);
- x = TXT_BODY_LEFT(st) + (st->cwidth * (st->text->curc - st->left));
- y = ar->winy - st->lheight_dpi * l - 2;
+ x = TXT_BODY_LEFT(st) + (st->runtime.cwidth_px * (st->text->curc - st->left));
+ y = ar->winy - st->runtime.lheight_px * l - 2;
- w = SUGG_LIST_WIDTH * st->cwidth + U.widget_unit;
- h = SUGG_LIST_SIZE * st->lheight_dpi + 0.4f * U.widget_unit;
+ w = SUGG_LIST_WIDTH * st->runtime.cwidth_px + U.widget_unit;
+ h = SUGG_LIST_SIZE * st->runtime.lheight_px + 0.4f * U.widget_unit;
// XXX getmouseco_areawin(mval);
@@ -101,7 +101,7 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
}
/* Work out the target item index in the visible list */
- tgti = (y - mval[1] - 4) / st->lheight_dpi;
+ tgti = (y - mval[1] - 4) / st->runtime.lheight_px;
if (tgti < 0 || tgti > SUGG_LIST_SIZE) {
return 1;
}