From e7c4526a1f7ed8cd3e1f2fbc9f5a78f5475ab8a8 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sat, 14 Apr 2018 20:44:15 +0200 Subject: Fix a couple of buglets in Font Selector widget... Use designer face name rather than CSS face name in second style column. Add label for second style column. --- src/ui/widget/font-selector.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ui/widget/font-selector.cpp') diff --git a/src/ui/widget/font-selector.cpp b/src/ui/widget/font-selector.cpp index 3e535aee4..5873802d5 100644 --- a/src/ui/widget/font-selector.cpp +++ b/src/ui/widget/font-selector.cpp @@ -61,13 +61,12 @@ FontSelector::FontSelector (bool with_size) // Style style_treecolumn.pack_start (style_cell, false); style_treecolumn.add_attribute (style_cell, "text", 0); - //style_treecolumn.set_cell_data_func (style_cell, &font_lister_style_cell_data_func); style_treecolumn.set_cell_data_func (style_cell, sigc::mem_fun(*this, &FontSelector::style_cell_data_func)); + style_treecolumn.set_title ("Face"); style_treeview.set_model (font_lister->get_style_list()); style_treeview.set_name ("FontSelector: Style"); style_treeview.append_column ("CSS", font_lister->FontStyleList.cssStyle); - //style_treeview.append_column ("Face",font_lister->FontStyleList.displayStyle); style_treeview.append_column (style_treecolumn); style_scroll.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); @@ -243,7 +242,7 @@ FontSelector::style_cell_data_func (Gtk::CellRenderer *renderer, Gtk::TreeIter c } Glib::ustring style = "Normal"; - (*iter).get_value(0, style); + (*iter).get_value(1, style); Glib::ustring style_escaped = Glib::strescape( style ); Glib::ustring font_desc = family + ", " + style; -- cgit v1.2.3