[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54382] trunk/blender/source/blender/ editors/animation/anim_markers.c: Fix #34165: Disappearing active marker label in timeline window

Sergey Sharybin sergey.vfx at gmail.com
Fri Feb 8 10:05:46 CET 2013


Revision: 54382
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54382
Author:   nazgul
Date:     2013-02-08 09:05:45 +0000 (Fri, 08 Feb 2013)
Log Message:
-----------
Fix #34165: Disappearing active marker label in timeline window

Simply clamp label position from bottom.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_markers.c

Modified: trunk/blender/source/blender/editors/animation/anim_markers.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_markers.c	2013-02-08 08:18:44 UTC (rev 54381)
+++ trunk/blender/source/blender/editors/animation/anim_markers.c	2013-02-08 09:05:45 UTC (rev 54382)
@@ -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 @@
 	/* 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;




More information about the Bf-blender-cvs mailing list