Author: Yu Chen <jco...@gmail.com> Date: Tue Nov 22 11:58:03 2011 +0800
Reflash preview window by new icons and set the buttons to none relief - replace loop, play and stop icons with the same style as framedial icons - replace re-preview icon with Gtk-Edit icon - replace Erase All icon with Gtk-Clear icon --- synfig-studio/src/gui/iconcontroller.cpp | 2 +- synfig-studio/src/gui/preview.cpp | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/synfig-studio/src/gui/iconcontroller.cpp b/synfig-studio/src/gui/iconcontroller.cpp index a5fb4b7..de12a70 100644 --- a/synfig-studio/src/gui/iconcontroller.cpp +++ b/synfig-studio/src/gui/iconcontroller.cpp @@ -282,7 +282,7 @@ IconController::IconController(const synfig::String& /*basepath*/) INIT_STOCK_ICON(animate_seek_next_frame,"animate_seek_next_frame_icon."IMAGE_EXT,_("Next frame")); INIT_STOCK_ICON(animate_seek_next_keyframe,"animate_seek_next_keyframe_icon."IMAGE_EXT,_("Next keyframe")); INIT_STOCK_ICON(animate_seek_end,"animate_seek_end_icon."IMAGE_EXT,_("Seek to end")); - + INIT_STOCK_ICON(animate_loop,"animate_loop_icon."IMAGE_EXT,_("Aniamte Loop")); INIT_STOCK_ICON(add_to_group,"action_add_to_group_icon."IMAGE_EXT,_("Add Layer to Group")); INIT_STOCK_ICON(remove_from_group,"action_remove_from_group_icon."IMAGE_EXT,_("Remove Layer from Group")); diff --git a/synfig-studio/src/gui/preview.cpp b/synfig-studio/src/gui/preview.cpp index f49fd99..e3ecc8d 100644 --- a/synfig-studio/src/gui/preview.cpp +++ b/synfig-studio/src/gui/preview.cpp @@ -288,11 +288,13 @@ void studio::Preview::frame_finish(const Preview_Target *targ) signal_changed()(); } -#define IMAGIFY_BUTTON(button,stockid,tooltip) \ - icon=manage(new Gtk::Image(Gtk::StockID(stockid),Gtk::ICON_SIZE_BUTTON)); \ - button->add(*icon); \ - button->set_tooltip_text(tooltip); \ - icon->set_padding(0,0);\ +#define IMAGIFY_BUTTON(button,stockid,tooltip) \ + icon = manage(new Gtk::Image(Gtk::StockID(stockid), Gtk::ICON_SIZE_BUTTON)); \ + button->set_tooltip_text(tooltip); \ + button->add(*icon); \ + button->set_relief(Gtk::RELIEF_NONE); \ + button->show(); \ + icon->set_padding(0,0); \ icon->show(); Widget_Preview::Widget_Preview() @@ -351,19 +353,19 @@ playing(false) hbox = manage(new Gtk::HBox); button = &b_loop; - IMAGIFY_BUTTON(button,Gtk::Stock::REFRESH,_("Toggle Looping")); + IMAGIFY_BUTTON(button,"synfig-animate_loop",_("Toggle Looping")); hbox->pack_start(b_loop,Gtk::PACK_SHRINK,0); //attach(b_loop,0,1,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); button = manage(new Gtk::Button(/*_("Play")*/)); button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::play)); - IMAGIFY_BUTTON(button,Gtk::Stock::GO_FORWARD,_("Play")); + IMAGIFY_BUTTON(button,"synfig-animate_play",_("Play")); hbox->pack_start(*button,Gtk::PACK_SHRINK,0); //attach(*button,1,2,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); button = manage(new Gtk::Button(/*_("Stop")*/)); button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::stop)); - IMAGIFY_BUTTON(button,Gtk::Stock::NO,_("Stop")); + IMAGIFY_BUTTON(button,"synfig-animate_stop",_("Stop")); hbox->pack_start(*button,Gtk::PACK_SHRINK,0); //attach(*button,2,3,2,3,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); @@ -381,13 +383,13 @@ playing(false) button = manage(new Gtk::Button(/*_("Re-Preview")*/)); button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::repreview)); - IMAGIFY_BUTTON(button,Gtk::Stock::CONVERT,_("Re-Preview")); + IMAGIFY_BUTTON(button,Gtk::Stock::EDIT,_("Re-Preview")); hbox->pack_start(*button,Gtk::PACK_SHRINK,0); //attach(*button,0,2,4,5,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); button = manage(new Gtk::Button(/*_("Erase All")*/)); button->signal_clicked().connect(sigc::mem_fun(*this,&Widget_Preview::eraseall)); - IMAGIFY_BUTTON(button,Gtk::Stock::DELETE,_("Erase All")); + IMAGIFY_BUTTON(button,Gtk::Stock::CLEAR,_("Erase All")); hbox->pack_start(*button,Gtk::PACK_SHRINK,0); //attach(*button,2,3,4,5,Gtk::EXPAND|Gtk::FILL,Gtk::SHRINK); ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl