summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2018-10-30 16:26:56 +0000
committerMartin Owens <doctormo@gmail.com>2018-10-30 16:26:56 +0000
commit590a7e4dfa363eaef787cfa5b4a1a361a80c3e93 (patch)
treec1b694328a092d5cb2fea0d8804975cd5f820e44 /src
parentcleanup: remove Base64OutputStream (diff)
downloadinkscape-590a7e4dfa363eaef787cfa5b4a1a361a80c3e93.tar.gz
inkscape-590a7e4dfa363eaef787cfa5b4a1a361a80c3e93.zip
Add some tooltips to svg font editor, two need to be fixes.
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp27
-rw-r--r--src/ui/dialog/svg-fonts-dialog.h4
2 files changed, 17 insertions, 14 deletions
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index d8a1197a4..3e42c99e6 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -100,10 +100,12 @@ Gtk::HBox* SvgFontsDialog::AttrEntry(gchar* lbl, const SPAttributeEnum attr){
}
*/
-SvgFontsDialog::AttrEntry::AttrEntry(SvgFontsDialog* d, gchar* lbl, const SPAttributeEnum attr){
+SvgFontsDialog::AttrEntry::AttrEntry(SvgFontsDialog* d, gchar* lbl, Glib::ustring tooltip, const SPAttributeEnum attr){
this->dialog = d;
this->attr = attr;
- this->add(* Gtk::manage(new Gtk::Label(lbl)) );
+ entry.set_tooltip_text(tooltip);
+ auto label = new Gtk::Label(lbl);
+ this->add(*Gtk::manage(label));
this->add(entry);
this->show_all();
@@ -145,10 +147,11 @@ void SvgFontsDialog::AttrEntry::on_attr_changed(){
}
-SvgFontsDialog::AttrSpin::AttrSpin(SvgFontsDialog* d, gchar* lbl, const SPAttributeEnum attr) {
+SvgFontsDialog::AttrSpin::AttrSpin(SvgFontsDialog* d, gchar* lbl, Glib::ustring tooltip, const SPAttributeEnum attr) {
this->dialog = d;
this->attr = attr;
+ spin.set_tooltip_text(tooltip);
this->add(* Gtk::manage(new Gtk::Label(lbl)) );
this->add(spin);
this->show_all();
@@ -459,16 +462,16 @@ SPGlyph* SvgFontsDialog::get_selected_glyph()
Gtk::VBox* SvgFontsDialog::global_settings_tab(){
_font_label = new Gtk::Label( _("Font Attributes") );
- _horiz_adv_x_spin = new AttrSpin( this, (gchar*) _("Horiz. Advance X"), SP_ATTR_HORIZ_ADV_X);
- _horiz_origin_x_spin = new AttrSpin( this, (gchar*) _("Horiz. Origin X "), SP_ATTR_HORIZ_ORIGIN_X);
- _horiz_origin_y_spin = new AttrSpin( this, (gchar*) _("Horiz. Origin Y "), SP_ATTR_HORIZ_ORIGIN_Y);
+ _horiz_adv_x_spin = new AttrSpin( this, (gchar*) _("Horiz. Advance X"), _("Average amount of horizontal space each letter takes up."), SP_ATTR_HORIZ_ADV_X);
+ _horiz_origin_x_spin = new AttrSpin( this, (gchar*) _("Horiz. Origin X"), _("Average horizontal origin location for each letter."), SP_ATTR_HORIZ_ORIGIN_X);
+ _horiz_origin_y_spin = new AttrSpin( this, (gchar*) _("Horiz. Origin Y"), _("Average vertical origin location for each letter."), SP_ATTR_HORIZ_ORIGIN_Y);
_font_face_label = new Gtk::Label( _("Font Face Attributes") );
- _familyname_entry = new AttrEntry(this, (gchar*) _("Family Name:"), SP_PROP_FONT_FAMILY);
- _units_per_em_spin = new AttrSpin( this, (gchar*) _("Units per em"), SP_ATTR_UNITS_PER_EM);
- _ascent_spin = new AttrSpin( this, (gchar*) _("Ascent:"), SP_ATTR_ASCENT);
- _descent_spin = new AttrSpin( this, (gchar*) _("Descent:"), SP_ATTR_DESCENT);
- _cap_height_spin = new AttrSpin( this, (gchar*) _("Cap Height:"), SP_ATTR_CAP_HEIGHT);
- _x_height_spin = new AttrSpin( this, (gchar*) _("x Height:"), SP_ATTR_X_HEIGHT);
+ _familyname_entry = new AttrEntry(this, (gchar*) _("Family Name:"), _("Name of the font as it appears in font selectors and css font-family properties."), SP_PROP_FONT_FAMILY);
+ _units_per_em_spin = new AttrSpin( this, (gchar*) _("Units per em"), _("Number of display units each letter takes up."), SP_ATTR_UNITS_PER_EM);
+ _ascent_spin = new AttrSpin( this, (gchar*) _("Ascent:"), _("Amount of space taken up by accenders like the tall line on the letter 'h'."), SP_ATTR_ASCENT);
+ _descent_spin = new AttrSpin( this, (gchar*) _("Descent:"), _("Amount of space taken up by decenders like the tail on the letter 'g'."), SP_ATTR_DESCENT);
+ _cap_height_spin = new AttrSpin( this, (gchar*) _("Cap Height:"), _("I don't know what this does."), SP_ATTR_CAP_HEIGHT);
+ _x_height_spin = new AttrSpin( this, (gchar*) _("x Height:"), _("Not sure about this one either."), SP_ATTR_X_HEIGHT);
//_descent_spin->set_range(-4096,0);
diff --git a/src/ui/dialog/svg-fonts-dialog.h b/src/ui/dialog/svg-fonts-dialog.h
index 579948534..87c98e569 100644
--- a/src/ui/dialog/svg-fonts-dialog.h
+++ b/src/ui/dialog/svg-fonts-dialog.h
@@ -88,7 +88,7 @@ public:
class AttrEntry : public Gtk::HBox
{
public:
- AttrEntry(SvgFontsDialog* d, gchar* lbl, const SPAttributeEnum attr);
+ AttrEntry(SvgFontsDialog* d, gchar* lbl, Glib::ustring tooltip, const SPAttributeEnum attr);
void set_text(char*);
private:
SvgFontsDialog* dialog;
@@ -100,7 +100,7 @@ public:
class AttrSpin : public Gtk::HBox
{
public:
- AttrSpin(SvgFontsDialog* d, gchar* lbl, const SPAttributeEnum attr);
+ AttrSpin(SvgFontsDialog* d, gchar* lbl, Glib::ustring tooltip, const SPAttributeEnum attr);
void set_value(double v);
void set_range(double low, double high);
Inkscape::UI::Widget::SpinButton* getSpin() { return &spin; }