From: Carlos Lopez Date: Sat, 27 Jun 2009 10:05:56 +0000 (+0200) Subject: Move the toggle ducks dial to the new display bar at the top of the window. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a230fed9d2b4f70e80b9f4898d27cc7f87947a8a;p=synfig.git Move the toggle ducks dial to the new display bar at the top of the window. --- diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 2207d24..e8e3a4d 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -736,9 +736,10 @@ CanvasView::CanvasView(etl::loose_handle instance,etl::handleattach(*vpaned, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); layout_table->attach(*create_work_area(), 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + layout_table->attach(*create_display_bar(), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); init_menus(); //layout_table->attach(*App::ui_manager()->get_widget("/menu-main"), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); @@ -1022,32 +1023,6 @@ CanvasView::create_time_bar() keyframedial->show(); keyframebutton=keyframedial->get_lock_button(); - // Setup the ToggleDuckDial widget - toggleducksdial = Gtk::manage(new class ToggleDucksDial()); - - Duck::Type m = work_area->get_type_mask(); - toggleducksdial->update_toggles(m); - - toggleducksdial->signal_ducks_position().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_POSITION) - ); - toggleducksdial->signal_ducks_vertex().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_VERTEX) - ); - toggleducksdial->signal_ducks_tangent().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_TANGENT) - ); - toggleducksdial->signal_ducks_radius().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_RADIUS) - ); - toggleducksdial->signal_ducks_width().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_WIDTH) - ); - toggleducksdial->signal_ducks_angle().connect( - sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_ANGLE) - ); - toggleducksdial->show(); - timebar = manage(new class Gtk::Table(5, 4, false)); //Attach widgets to the timebar @@ -1059,8 +1034,6 @@ CanvasView::create_time_bar() timebar->attach(*keyframedial, 3, 4, 1, 2, Gtk::SHRINK, Gtk::SHRINK); timebar->attach(*animatebutton, 4, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK); //timebar->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); - timebar->attach(*toggleducksdial, 0, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK); - timebar->show(); @@ -1122,6 +1095,43 @@ CanvasView::create_status_bar() return statusbartable; } +Gtk::Widget* +CanvasView::create_display_bar() +{ + displaybar = manage(new class Gtk::Table(1, 1, false)); + // Setup the ToggleDuckDial widget + toggleducksdial = Gtk::manage(new class ToggleDucksDial()); + + Duck::Type m = work_area->get_type_mask(); + toggleducksdial->update_toggles(m); + + toggleducksdial->signal_ducks_position().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_POSITION) + ); + toggleducksdial->signal_ducks_vertex().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_VERTEX) + ); + toggleducksdial->signal_ducks_tangent().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_TANGENT) + ); + toggleducksdial->signal_ducks_radius().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_RADIUS) + ); + toggleducksdial->signal_ducks_width().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_WIDTH) + ); + toggleducksdial->signal_ducks_angle().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_ANGLE) + ); + toggleducksdial->show(); + + displaybar->attach(*toggleducksdial, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->show(); + + return displaybar; + +} + void CanvasView::on_current_time_widget_changed() { diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index 826c8ea..5986da6 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -263,6 +263,7 @@ private: Gtk::Button *treetogglebutton; // not used Gtk::Notebook *notebook; // not used Gtk::Table *timebar; + Gtk::Table *displaybar; Gtk::Button *animatebutton; Gtk::Button *keyframebutton; FrameDial *framedial; @@ -408,6 +409,8 @@ private: Gtk::Widget *create_time_bar(); + Gtk::Widget *create_display_bar(); + //! Pop up menu for the bezier (bline, draw) tool (?) void popup_param_menu_bezier(float location, synfigapp::ValueDesc value_desc) { popup_param_menu(value_desc,location,true); }