18#include <sigc++/functors/mem_fun.h>
19#include <gdkmm/pixbuf.h>
20#include <gtkmm/cellrendererpixbuf.h>
22#include <gtkmm/combobox.h>
23#include <gtkmm/label.h>
24#include <gtkmm/liststore.h>
33 if (!s.empty() && s.raw().back() ==
c) {
34 s.resize(s.size() - 1);
40 const Glib::ustring &tooltip,
41 const Glib::ustring &stock_id,
42 Glib::RefPtr<Gtk::ListStore>
store,
49 Glib::ustring tooltip,
50 Glib::ustring stock_id,
51 Glib::RefPtr<Gtk::ListStore>
store,
54 _group_label(
std::move( group_label )),
55 _tooltip(
std::move( tooltip )),
56 _stock_id(
std::move( stock_id )),
63 _container(
Gtk::make_managed<
Gtk::Box>())
73 _combobox = Gtk::make_managed<Gtk::ComboBox>(has_entry);
142 if (prefs->
getBool(
"/theme/symbolicIcons",
false)) {
143 auto children =
_store->children();
144 for (
auto row : children) {
145 auto const &icon = row.get_value(columns.
col_icon);
146 auto const pos = icon.find(
"-symbolic");
147 if (pos == icon.npos) {
148 row.set_value(columns.
col_icon, icon +
"-symbolic");
153 auto const renderer = Gtk::make_managed<Gtk::CellRendererPixbuf>();
154 renderer->set_property (
"stock_size", Gtk::IconSize::LARGE);
155 _combobox->pack_start (*renderer,
false);
158 auto const renderer = Gtk::make_managed<Gtk::CellRendererPixbuf>();
159 _combobox->pack_start (*renderer,
false);
168 for (
auto & cell :
cells) {
197 int row =
_combobox->get_active_row_number();
Preference storage class.
bool getBool(Glib::ustring const &pref_path, bool def=false)
Retrieve a Boolean value.
static Preferences * get()
Access the singleton Preferences object.
std::vector< ItemIterator > _active
void pack_start(Gtk::Box &box, Gtk::Widget &child, bool const expand, bool const fill, unsigned const padding)
Adds child to box, packed with reference to the start of box.
static void append(std::vector< T > &target, std::vector< T > &&source)
Helpers for using Gtk::Boxes, encapsulating large changes between GTK3 & GTK4.
Singleton class to access the preferences file in a convenient way.
std::vector< Edges > cells(cairo_t *, PathVector const &ps)