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>2012-12-14 12:05:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-14 12:05:56 +0400
commit20846bee03ebae035120744f463c45fc741ca894 (patch)
tree03523c66595ad1ad35af7438117e811ed082e9a8 /source/blender/editors/space_info/textview.c
parent48661fd663ed06aa5ddbca2b4d3f1113aaa95aa0 (diff)
correct scrollbars not working properly with DPI in the console/info view.
Diffstat (limited to 'source/blender/editors/space_info/textview.c')
-rw-r--r--source/blender/editors/space_info/textview.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index cd7a1d785b2..e5f8d6553ed 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -221,7 +221,6 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, const i
}
#define CONSOLE_DRAW_MARGIN 4
-#define CONSOLE_DRAW_SCROLL 16
int textview_draw(TextViewContext *tvc, const int draw, int mval[2], void **mouse_pick, int *pos_pick)
{
@@ -247,9 +246,10 @@ int textview_draw(TextViewContext *tvc, const int draw, int mval[2], void **mous
cdc.cwidth = (int)BLF_fixed_width(mono);
assert(cdc.cwidth > 0);
cdc.lheight = tvc->lheight;
- cdc.console_width = (tvc->winx - (CONSOLE_DRAW_SCROLL + CONSOLE_DRAW_MARGIN * 2) ) / cdc.cwidth;
+ /* note, scroll bar must be already subtracted () */
+ cdc.console_width = (tvc->winx - (CONSOLE_DRAW_MARGIN * 2) ) / cdc.cwidth;
CLAMP(cdc.console_width, 1, INT_MAX); /* avoid divide by zero on small windows */
- cdc.winx = tvc->winx - (CONSOLE_DRAW_MARGIN + CONSOLE_DRAW_SCROLL);
+ cdc.winx = tvc->winx - CONSOLE_DRAW_MARGIN;
cdc.ymin = tvc->ymin;
cdc.ymax = tvc->ymax;
cdc.xy = xy;