X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fcanvasview.cpp;h=1a941c8a53dbf8f42b8d83f40efbd3e205f73550;hb=714ab44cd605f122ef1cf311eb301f74f246f71a;hp=da2e672a76d76ef3465f33a3e539536aa699744a;hpb=ca5470619b0ee095f4c12ac67193f10632371b2a;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index da2e672..1a941c8 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -966,13 +966,11 @@ CanvasView::create_time_bar() //Widget_Timeslider *time_scroll = manage(new Widget_Timeslider); timeslider->set_time_adjustment(&time_adjustment()); timeslider->set_bounds_adjustment(&time_window_adjustment()); - //timeslider->set_size_request(-1,12); //layout_table->attach(*timeslider, 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL); //Setup the keyframe list widget widget_kf_list->set_time_adjustment(&time_adjustment()); widget_kf_list->set_canvas_interface(canvas_interface()); widget_kf_list->show(); - widget_kf_list->set_size_request(-1,8); tooltips.set_tip(*time_window_scroll,_("Moves the time window")); tooltips.set_tip(*timeslider,_("Changes the current time")); @@ -1042,12 +1040,21 @@ CanvasView::create_time_bar() timebar = Gtk::manage(new class Gtk::Table(5, 4, false)); + //Adjust both widgets to be the same as the + int header_height = 0; + if(getenv("SYNFIG_TIMETRACK_HEADER_HEIGHT")) + header_height = atoi(getenv("SYNFIG_TIMETRACK_HEADER_HEIGHT")); + if (header_height < 3) + header_height = 24; + timeslider->set_size_request(-1,header_height-header_height/3+1); + widget_kf_list->set_size_request(-1,header_height/3+1); + //Attach widgets to the timebar //timebar->attach(*manage(disp_audio), 1, 5, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); timebar->attach(*current_time_widget, 0, 1, 0, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); timebar->attach(*framedial, 0, 1, 2, 3, Gtk::SHRINK, Gtk::SHRINK); - timebar->attach(*timeslider, 1, 3, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL); - timebar->attach(*widget_kf_list, 1, 3, 1, 2, Gtk::EXPAND|Gtk::FILL,Gtk::EXPAND|Gtk::FILL); + timebar->attach(*timeslider, 1, 3, 1, 2, Gtk::FILL|Gtk::SHRINK, Gtk::FILL|Gtk::SHRINK); + timebar->attach(*widget_kf_list, 1, 3, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::SHRINK); timebar->attach(*time_window_scroll, 1, 3, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); timebar->attach(*keyframedial, 3, 4, 0, 2, Gtk::SHRINK, Gtk::SHRINK); timebar->attach(*animatebutton, 4, 5, 0, 2, Gtk::SHRINK, Gtk::SHRINK); @@ -1116,10 +1123,10 @@ CanvasView::create_status_bar() Gtk::Widget* CanvasView::create_display_bar() { - displaybar = manage(new class Gtk::Table(1, 7, false)); - + displaybar = manage(new class Gtk::Table(10, 1, false)); + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon_16x16"); // Setup the ToggleDuckDial widget - toggleducksdial = Gtk::manage(new class ToggleDucksDial()); + toggleducksdial = Gtk::manage(new class ToggleDucksDial(iconsize)); Duck::Type m = work_area->get_type_mask(); toggleducksdial->update_toggles(m); @@ -1145,7 +1152,7 @@ CanvasView::create_display_bar() toggleducksdial->show(); // Set up the ResolutionDial widget - resolutiondial=Gtk::manage(new class ResolutionDial()); + resolutiondial=Gtk::manage(new class ResolutionDial(iconsize)); resolutiondial->update_lowres(work_area->get_low_resolution_flag()); resolutiondial->signal_increase_resolution().connect( @@ -1172,7 +1179,7 @@ CanvasView::create_display_bar() // Set up the show grid toggle button show_grid = Gtk::manage(new class Gtk::ToggleButton()); show_grid->set_active(work_area->grid_status()); - Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID("synfig-toggle_show_grid"), Gtk::IconSize::from_name("synfig-small_icon"))); + Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID("synfig-toggle_show_grid"), iconsize)); icon->set_padding(0, 0); icon->show(); show_grid->add(*icon); @@ -1185,7 +1192,7 @@ CanvasView::create_display_bar() // Set up the snap to grid toggle button snap_grid = Gtk::manage(new class Gtk::ToggleButton()); snap_grid->set_active(work_area->grid_status()); - Gtk::Image *icon2 = manage(new Gtk::Image(Gtk::StockID("synfig-toggle_snap_grid"), Gtk::IconSize::from_name("synfig-small_icon"))); + Gtk::Image *icon2 = manage(new Gtk::Image(Gtk::StockID("synfig-toggle_snap_grid"), iconsize)); icon2->set_padding(0, 0); icon2->show(); snap_grid->add(*icon2); @@ -1198,7 +1205,7 @@ CanvasView::create_display_bar() // Set up the onion skin toggle button onion_skin = Gtk::manage(new class Gtk::ToggleButton()); onion_skin->set_active(work_area->get_onion_skin()); - Gtk::Image *icon3 = manage(new Gtk::Image(Gtk::StockID("synfig-toggle_onion_skin"), Gtk::IconSize::from_name("synfig-small_icon"))); + Gtk::Image *icon3 = manage(new Gtk::Image(Gtk::StockID("synfig-toggle_onion_skin"), iconsize)); icon3->set_padding(0, 0); icon3->show(); onion_skin->add(*icon3); @@ -1539,7 +1546,7 @@ CanvasView::init_menus() sigc::mem_fun(*this, &studio::CanvasView::play) ); - action_group->add( Gtk::Action::create("dialog-flipbook", _("Flipbook Dialog")), + action_group->add( Gtk::Action::create("dialog-flipbook", _("Preview Window")), sigc::mem_fun0(*preview_dialog, &studio::Dialog_Preview::present) );