along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <algorithm>
//calculate our image width based on the track height
double im_ratio = (double)width/(double)height ;
- double im_width = ((double)(trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
+ double im_width = ((double)(trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
- imageframe = new ImageFrame (*group, pbuf, 1.0, 1.0, ANCHOR_NW, im_width, (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE));
+ imageframe = new ImageFrame (*group, pbuf, 1.0, 1.0, ANCHOR_NW, im_width, (trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE));
frame_handle_start->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_start_handle_event), frame_handle_start, this));
frame_handle_end->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_end_handle_event), frame_handle_end, this));
}
}
- if(imageframe)
- {
-delete imageframe;
- imageframe = 0 ;
- }
+ delete imageframe;
+ imageframe = 0 ;
}
frame->raise_to_top();
imageframe->raise_to_top();
name_highlight->raise_to_top();
- name_text->raise_to_top();
+ name_pixbuf->raise_to_top();
frame_handle_start->raise_to_top();
frame_handle_end->raise_to_top();
- name_text->property_y() = h - TimeAxisViewItem::NAME_Y_OFFSET;
+ name_pixbuf->property_y() = h - TimeAxisViewItem::NAME_Y_OFFSET;
frame->property_y2() = h;
name_highlight->property_y1() = (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE;