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
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-02-08 13:05:45 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-02-08 13:05:45 +0400
commitc6865e823c4b8f5fc1b5ebe0e7e40227f5eb890c (patch)
treea8cd8112d43eab58e8d841e6041a10b1d08ef88d /source
parentbc5df753aaaf116520d15df0aa53a054e6b1606a (diff)
Fix #34165: Disappearing active marker label in timeline window
Simply clamp label position from bottom.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/animation/anim_markers.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index ccd8309f794..62725cb6c70 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -41,6 +41,7 @@
#include "RNA_enum_types.h"
#include "BLI_blenlib.h"
+#include "BLI_math_base.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
@@ -401,17 +402,22 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
/* and the marker name too, shifted slightly to the top-right */
if (marker->name && marker->name[0]) {
float x, y;
+
+ /* minimal y coordinate which wouldn't be occluded by scroll */
+ int min_y = 17.0f * UI_DPI_FAC;
if (marker->flag & SELECT) {
UI_ThemeColor(TH_TEXT_HI);
x = xpos * xscale + 4.0f * UI_DPI_FAC;
y = (ypixels <= 39.0f * UI_DPI_FAC) ? (ypixels - 10.0f * UI_DPI_FAC) : 29.0f * UI_DPI_FAC;
+ y = max_ii(y, min_y);
}
else {
UI_ThemeColor(TH_TEXT);
if ((marker->frame <= cfra) && (marker->frame + 5 > cfra)) {
x = xpos * xscale + 8.0f * UI_DPI_FAC;
y = (ypixels <= 39.0f * UI_DPI_FAC) ? (ypixels - 10.0f * UI_DPI_FAC) : 29.0f * UI_DPI_FAC;
+ y = max_ii(y, min_y);
}
else {
x = xpos * xscale + 8.0f * UI_DPI_FAC;