From: Konstantin Dmitriev Date: Sat, 15 May 2010 06:11:02 +0000 (+0700) Subject: Fix toolbox buttons adjustment in the table. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e130065e9daadd4cff05b8bdac1efce0fc574c94;p=synfig.git Fix toolbox buttons adjustment in the table. Using Gtk::SHRINK prevents them from filling whole toolbox and results in the look like on this screenshot: http://synfig.org/wiki/index.php?title=File:Toolbox_Reset_Colors_Button.png&oldid=12297 --- diff --git a/synfig-studio/src/gtkmm/toolbox.cpp b/synfig-studio/src/gtkmm/toolbox.cpp index bd975e2..d35f010 100644 --- a/synfig-studio/src/gtkmm/toolbox.cpp +++ b/synfig-studio/src/gtkmm/toolbox.cpp @@ -314,17 +314,17 @@ Toolbox::Toolbox(): // Create the file button cluster Gtk::Table *file_buttons=manage(new class Gtk::Table()); - file_buttons->attach(*button_new, 0,1, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - file_buttons->attach(*button_open, 1,2, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - file_buttons->attach(*button_save, 2,3, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - file_buttons->attach(*button_saveas, 3,4, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - file_buttons->attach(*button_save_all, 4,5, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - - file_buttons->attach(*button_undo, 0,1, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - file_buttons->attach(*button_redo, 1,2, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - file_buttons->attach(*button_setup, 2,3, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - file_buttons->attach(*button_about, 3,4, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - file_buttons->attach(*button_help, 4,5, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + file_buttons->attach(*button_new, 0,1, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0); + file_buttons->attach(*button_open, 1,2, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0); + file_buttons->attach(*button_save, 2,3, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0); + file_buttons->attach(*button_saveas, 3,4, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0); + file_buttons->attach(*button_save_all, 4,5, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0); + + file_buttons->attach(*button_undo, 0,1, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0); + file_buttons->attach(*button_redo, 1,2, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0); + file_buttons->attach(*button_setup, 2,3, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0); + file_buttons->attach(*button_about, 3,4, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0); + file_buttons->attach(*button_help, 4,5, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0); file_buttons->show(); @@ -513,7 +513,7 @@ Toolbox::add_state(const Smach::state_base *state) int row=state_button_map.size()/5; int col=state_button_map.size()%5; - tool_table->attach(*button,col,col+1,row,row+1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + tool_table->attach(*button,col,col+1,row,row+1, Gtk::EXPAND, Gtk::EXPAND, 0, 0); state_button_map[name]=button;