Merging r50049 through r50076 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / space_clip / clip_buttons.c
index 5bf6bcc047f38a38e71fcebe3bb8a27d78eb4e8e..0a1e1d750985ae504744c0e805edaa591ef495a1 100644 (file)
@@ -41,6 +41,7 @@
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 #include "BLI_listbase.h"
+#include "BLI_rect.h"
 
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
@@ -173,7 +174,7 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
        scopes->track_preview_height =
                (scopes->track_preview_height <= UI_UNIT_Y) ? UI_UNIT_Y : scopes->track_preview_height;
 
-       uiDefBut(block, TRACKPREVIEW, 0, "", rect.xmin, rect.ymin, rect.xmax - rect.xmin,
+       uiDefBut(block, TRACKPREVIEW, 0, "", rect.xmin, rect.ymin, BLI_RCT_SIZE_X(&rect),
                 scopes->track_preview_height, scopes, 0, 0, 0, 0, "");
 }