From 8322f03e3dd374558bec929c8363454d7a4bf92f Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Wed, 25 Oct 2017 10:30:19 +0200 Subject: [PATCH] added a default border to MyFileChooserButton, and set the widget name to "MyFileChooserButton" (to allow for CSS customization) --- rtgui/guiutils.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index 430e03968..91e223a53 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -1177,14 +1177,20 @@ MyFileChooserButton::MyFileChooserButton(const Glib::ustring &title, Gtk::FileCh lbl_.set_ellipsize(Pango::ELLIPSIZE_MIDDLE); lbl_.set_justify(Gtk::JUSTIFY_LEFT); set_none(); - box_.pack_start(lbl_, true, true); + box_.pack_start(lbl_, true, true, 3); Gtk::Image *img = Gtk::manage(new Gtk::Image()); img->set_from_icon_name("document-open", Gtk::ICON_SIZE_BUTTON); box_.pack_start(*Gtk::manage(new Gtk::VSeparator()), false, false, 5); - box_.pack_start(*img, false, false); + box_.pack_start(*img, false, false, 3); box_.show_all_children(); add(box_); signal_clicked().connect(sigc::mem_fun(*this, &MyFileChooserButton::show_chooser)); + + set_border_width(2); + set_name("MyFileChooserButton"); + lbl_.set_name("MyFileChooserButton"); + box_.set_name("MyFileChooserButton"); + img->set_name("MyFileChooserButton"); }