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:
authorJulian Eisel <eiseljulian@gmail.com>2020-01-10 16:23:47 +0300
committerJulian Eisel <eiseljulian@gmail.com>2020-01-10 16:28:11 +0300
commitaacdf55a50d8b9a0a95dd191a66deb7b58edca0b (patch)
tree6d91e2af4364791e106a074cc019f61c60f3cb0d /source/blender/editors/animation/time_scrub_ui.c
parentc91ebcd7ab5ea1b284fcce96c9d62aa497356af8 (diff)
Cleanup: ARegion.sizex/y should not be used to access region size
This should only be used to change and recalculate region sizes in a DPI independent way. To get the size with DPI applied, ARegion.winx/y should be used instead. Added note on this in comment.
Diffstat (limited to 'source/blender/editors/animation/time_scrub_ui.c')
-rw-r--r--source/blender/editors/animation/time_scrub_ui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c
index 70a9b7ba1fa..ae489fb5233 100644
--- a/source/blender/editors/animation/time_scrub_ui.c
+++ b/source/blender/editors/animation/time_scrub_ui.c
@@ -179,9 +179,9 @@ void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *ar, bDopeShee
rcti rect;
rect.xmin = 0;
- rect.xmax = ceilf(ar->sizex * UI_DPI_FAC);
- rect.ymin = ar->sizey * UI_DPI_FAC - UI_TIME_SCRUB_MARGIN_Y;
- rect.ymax = ceilf(ar->sizey * UI_DPI_FAC);
+ rect.xmax = ar->winx;
+ rect.ymin = ar->winy - UI_TIME_SCRUB_MARGIN_Y;
+ rect.ymax = ar->winy;
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);