[Bf-blender-cvs] [2bc6c2de062] greasepencil-object: Fix: GP Color Picker text positioning/sizing was using an absolute pixel size for an offset
Joshua Leung
noreply at git.blender.org
Tue Feb 6 15:05:48 CET 2018
Commit: 2bc6c2de062b42140477c7e3da6946104daa8dac
Author: Joshua Leung
Date: Wed Feb 7 02:39:34 2018 +1300
Branches: greasepencil-object
https://developer.blender.org/rB2bc6c2de062b42140477c7e3da6946104daa8dac
Fix: GP Color Picker text positioning/sizing was using an absolute pixel size for an offset
This would break when changing the DPI settings
===================================================================
M source/blender/editors/gpencil/gpencil_colorpick.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_colorpick.c b/source/blender/editors/gpencil/gpencil_colorpick.c
index 26908695ef6..849c69651c4 100644
--- a/source/blender/editors/gpencil/gpencil_colorpick.c
+++ b/source/blender/editors/gpencil/gpencil_colorpick.c
@@ -101,7 +101,7 @@ static void gp_draw_color_name(tGPDpick *tgpk, tGPDpickColor *col, const uiFontS
/* color name */
BLI_strncpy(drawstr, col->name, sizeof(drawstr));
UI_text_clip_middle_ex((uiFontStyle *)fstyle, drawstr, okwidth, minwidth, max_len, '\0');
- UI_fontstyle_draw_simple(fstyle, col->rect.xmin, col->rect.ymin - (GP_BOX_GAP / 2) - 3,
+ UI_fontstyle_draw_simple(fstyle, col->rect.xmin, col->rect.ymin - (GP_BOX_GAP / 2) - (3 * U.ui_scale),
drawstr, text_col);
}
More information about the Bf-blender-cvs
mailing list