diff options
| author | Martin Owens <doctormo@gmail.com> | 2016-03-12 23:50:04 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2016-03-12 23:50:04 +0000 |
| commit | 1c9e7ee09d40b8e06b80d0a09eca17d1b0fb8357 (patch) | |
| tree | c660c2c4b4002e3c142d386582afeddd5f5b35b3 /src/desktop-style.cpp | |
| parent | Add new TTF to the logo in seamless pattern extension (diff) | |
| download | inkscape-1c9e7ee09d40b8e06b80d0a09eca17d1b0fb8357.tar.gz inkscape-1c9e7ee09d40b8e06b80d0a09eca17d1b0fb8357.zip | |
Add a units box to line height and wire in the style units, plus some cleanup
(bzr r14701)
Diffstat (limited to '')
| -rw-r--r-- | src/desktop-style.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp index c36bcee44..c28302d22 100644 --- a/src/desktop-style.cpp +++ b/src/desktop-style.cpp @@ -1049,6 +1049,7 @@ objects_query_fontnumbers (const std::vector<SPItem*> &objects, SPStyle *style_r double letterspacing_prev = 0; double wordspacing_prev = 0; double linespacing_prev = 0; + int linespacing_unit = 0; int texts = 0; int no_size = 0; @@ -1105,6 +1106,11 @@ objects_query_fontnumbers (const std::vector<SPItem*> &objects, SPStyle *style_r linespacing_current = style->line_height.computed; linespacing_normal = false; } + if (linespacing_unit == 0) { + linespacing_unit = style->line_height.unit; + } else if (linespacing_unit != style->line_height.unit) { + linespacing_unit = SP_CSS_UNIT_PERCENT; + } linespacing += linespacing_current; if ((size_prev != 0 && style->font_size.computed != size_prev) || @@ -1148,7 +1154,7 @@ objects_query_fontnumbers (const std::vector<SPItem*> &objects, SPStyle *style_r style_res->line_height.normal = linespacing_normal; style_res->line_height.computed = linespacing; style_res->line_height.value = linespacing; - style_res->line_height.unit = SP_CSS_UNIT_PERCENT; + style_res->line_height.unit = linespacing_unit; if (texts > 1) { if (different) { |
