summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-10-01 14:01:30 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-10-01 14:01:30 +0000
commite7b461381da7401ee281e428e72eaf9ed1e2c0c2 (patch)
tree7eacbfe94991a8429e08b358b5626800c3974598 /src
parentMake funtion that add classes to top level windows in diallogs callable from ... (diff)
downloadinkscape-e7b461381da7401ee281e428e72eaf9ed1e2c0c2.tar.gz
inkscape-e7b461381da7401ee281e428e72eaf9ed1e2c0c2.zip
Add tooltip showing larger version of glyph in Glyph dialog.
Partially addresses https://gitlab.com/inkscape/inkscape/issues/436
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/glyphs.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp
index e115dbc56..6702d9357 100644
--- a/src/ui/dialog/glyphs.cpp
+++ b/src/ui/dialog/glyphs.cpp
@@ -304,11 +304,13 @@ class GlyphColumns : public Gtk::TreeModel::ColumnRecord
public:
Gtk::TreeModelColumn<gunichar> code;
Gtk::TreeModelColumn<Glib::ustring> name;
+ Gtk::TreeModelColumn<Glib::ustring> tooltip;
GlyphColumns()
{
add(code);
add(name);
+ add(tooltip);
}
};
@@ -403,6 +405,7 @@ GlyphsPanel::GlyphsPanel() :
iconView = new Gtk::IconView(static_cast<Glib::RefPtr<Gtk::TreeModel> >(store));
iconView->set_text_column(columns->name);
+ iconView->set_tooltip_column(2); // Uses Pango merkup, must use column number.
//iconView->set_columns(16);
sigc::connection conn;
@@ -694,6 +697,7 @@ void GlyphsPanel::rebuild()
tmp += it;
(*row)[columns->code] = it;
(*row)[columns->name] = tmp;
+ (*row)[columns->tooltip] = "<span font_desc=\"" + fontspec + "\" size=\"32000\">" + tmp + "</span>";
}
// Reconnect the model once it has been updated: