wxSizer* sizer = new wxBoxSizer (wxHORIZONTAL);
sizer->Add (_labels_panel, 0, wxEXPAND);
+ _labels_panel->SetMinSize (wxSize (_labels_view->bbox().width, -1));
sizer->Add (_main_canvas, 1, wxEXPAND);
SetSizer (sizer);
void
Timeline::paint_labels ()
{
- wxPaintDC dc (this);
+ wxPaintDC dc (_labels_panel);
wxGraphicsContext* gc = wxGraphicsContext::Create (dc);
if (!gc) {
void
Timeline::paint_main ()
{
- wxPaintDC dc (this);
+ wxPaintDC dc (_main_canvas);
_main_canvas->DoPrepareDC (dc);
wxGraphicsContext* gc = wxGraphicsContext::Create (dc);
/* Outline */
wxGraphicsPath path = gc->CreatePath ();
- path.MoveToPoint (time_x (position) + 1, y_pos (_track.get()) + 4);
+ path.MoveToPoint (time_x (position) + 2, y_pos (_track.get()) + 4);
path.AddLineToPoint (time_x (position + len) - 1, y_pos (_track.get()) + 4);
path.AddLineToPoint (time_x (position + len) - 1, y_pos (_track.get() + 1) - 4);
- path.AddLineToPoint (time_x (position) + 1, y_pos (_track.get() + 1) - 4);
- path.AddLineToPoint (time_x (position) + 1, y_pos (_track.get()) + 4);
+ path.AddLineToPoint (time_x (position) + 2, y_pos (_track.get() + 1) - 4);
+ path.AddLineToPoint (time_x (position) + 2, y_pos (_track.get()) + 4);
gc->StrokePath (path);
gc->FillPath (path);