From c259adc37c0b0df32a28d70e51d7fde0968b4cdc Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 25 Apr 2018 16:29:08 +0200 Subject: Implement FontSelectorToolbar. A version of FontSelector designed for the text toolbar. This is meant as a replacement for Ink_ComboBoxEntry_Action. It is not ready for use. Also includes some code cleanup. --- src/ui/dialog/text-edit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/dialog/text-edit.cpp') diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 2c122da49..d283e6549 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -248,16 +248,16 @@ void TextEdit::onReadSelection ( gboolean dostyle, gboolean /*docontent*/ ) // Update family/style based on selection. font_lister->selection_update(); - - // Get fontspec for selection. Glib::ustring fontspec = font_lister->get_fontspec(); - font_selector.set_fontspec (fontspec); + + // Update Font Face. + font_selector.update_font (); // Update Size. Inkscape::Preferences *prefs = Inkscape::Preferences::get(); int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT); double size = sp_style_css_size_px_to_units(query.font_size.computed, unit); - font_selector.set_size (size); + font_selector.update_size (size); // Update Preview setPreviewText (fontspec, phrase); -- cgit v1.2.3