A little smaller, and better look. I don't like it so much though. Have to think...
[synfig.git] / synfig-studio / trunk / src / gtkmm / widget_timeslider.cpp
index f46b0c8..1687371 100644 (file)
@@ -549,6 +549,7 @@ bool Widget_Timeslider::redraw(bool /*doublebuffer*/)
                double t = (time/scale - floor(time/scale))*subdiv; // the difference from the big mark in 0:1
                //sdindex = (int)floor(t + 0.5); //get how far through the range it is...
                sdindex = round_to_int(t); //get how far through the range it is...
+               if (sdindex == subdiv) sdindex = 0;
 
                //synfig::info("Extracted fr %.2lf -> %d", t, sdindex);
        }
@@ -575,7 +576,7 @@ bool Widget_Timeslider::redraw(bool /*doublebuffer*/)
 
                        //gc->set_rgb_fg_color(Gdk::Color("#000000"));
                        layout->set_text(timecode);
-                       window->draw_layout(gc,xpx+2,heightsmall,layout);
+                       window->draw_layout(gc,xpx+2,0,layout);
                }else
                {
                        window->draw_line(gc,xpx,0,xpx,heightsmall);
@@ -792,7 +793,7 @@ bool Widget_Timeslider::on_scroll_event(GdkEventScroll* event) //for zooming
                                        else
                                        {
                                                adj_timescale->set_lower(start - (orig_t-t));
-                                               adj_timescale->set_upper(start - (orig_t-t) + (end-start)); 
+                                               adj_timescale->set_upper(start - (orig_t-t) + (end-start));
                                        }
                                }
                        }