From: Carlos Lopez Date: Sun, 13 Dec 2009 09:50:04 +0000 (+0100) Subject: Fix File chooser button label to fit into the button size. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ea136b4b5f94deb671d1a475111a9b1083e98186;p=synfig.git Fix File chooser button label to fit into the button size. Application font sizes needs a whole redefinition. --- diff --git a/synfig-studio/src/gtkmm/widget_filename.cpp b/synfig-studio/src/gtkmm/widget_filename.cpp index a178614..1e94ef7 100644 --- a/synfig-studio/src/gtkmm/widget_filename.cpp +++ b/synfig-studio/src/gtkmm/widget_filename.cpp @@ -58,12 +58,24 @@ using namespace studio; Widget_Filename::Widget_Filename() { entry_filename=manage(new Gtk::Entry()); - button_choose=manage(new Gtk::Button(_("Find"))); + label_find= manage(new Gtk::Label(_("Find"))); + button_choose=manage(new Gtk::Button()); + Pango::AttrList attr_list; + { + Pango::AttrInt pango_size(Pango::Attribute::create_attr_size(Pango::SCALE*7)); + pango_size.set_start_index(0); + pango_size.set_end_index(64); + attr_list.change(pango_size); + } + label_find->set_attributes(attr_list); + label_find->set_ellipsize(Pango::ELLIPSIZE_END); + button_choose->add(*label_find); pack_start(*entry_filename); pack_start(*button_choose); entry_filename->show(); button_choose->show(); + label_find->show(); button_choose->signal_clicked().connect(sigc::mem_fun(*this, &studio::Widget_Filename::on_button_choose_pressed)); //entry_filename->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_Filename::on_value_changed)); diff --git a/synfig-studio/src/gtkmm/widget_filename.h b/synfig-studio/src/gtkmm/widget_filename.h index eb8e954..69cfb48 100644 --- a/synfig-studio/src/gtkmm/widget_filename.h +++ b/synfig-studio/src/gtkmm/widget_filename.h @@ -47,6 +47,7 @@ class Widget_Filename : public Gtk::HBox { Gtk::Entry *entry_filename; Gtk::Button *button_choose; + Gtk::Label *label_find; void on_button_choose_pressed();