summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-09-25 23:35:27 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-09-25 23:35:27 +0000
commitdb78328c47443816f23f32f59acd8f7df0ef4fee (patch)
treedc5a885c6fa833a6eb58e023a194cded47b796e9
parentAdd improvements to meassure segments LPE pointed by CR (diff)
downloadinkscape-db78328c47443816f23f32f59acd8f7df0ef4fee.tar.gz
inkscape-db78328c47443816f23f32f59acd8f7df0ef4fee.zip
CSS fixes to measure line LPE
-rw-r--r--src/live_effects/lpe-measure-segments.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/live_effects/lpe-measure-segments.cpp b/src/live_effects/lpe-measure-segments.cpp
index a3d4627ef..26e6cbe03 100644
--- a/src/live_effects/lpe-measure-segments.cpp
+++ b/src/live_effects/lpe-measure-segments.cpp
@@ -421,11 +421,10 @@ LPEMeasureSegments::createLine(Geom::Point start,Geom::Point end, const char * i
line = xml_doc->createElement("svg:path");
line->setAttribute("id", id);
if (main) {
- line->setAttribute("class", (Glib::ustring(sp_lpe_item->getId()) + Glib::ustring(" ") + Glib::ustring(this->lpeobj->getId()) + Glib::ustring(" measure-DIM-lines")).c_str());
+ line->setAttribute("class", (Glib::ustring(sp_lpe_item->getId()) + Glib::ustring(" ") + Glib::ustring(this->lpeobj->getId()) + Glib::ustring(" measure-DIM-lines measure-lines")).c_str());
} else {
- line->setAttribute("class", (Glib::ustring(sp_lpe_item->getId()) + Glib::ustring(" ") + Glib::ustring(this->lpeobj->getId()) + Glib::ustring(" measure-helper-lines")).c_str());
+ line->setAttribute("class", (Glib::ustring(sp_lpe_item->getId()) + Glib::ustring(" ") + Glib::ustring(this->lpeobj->getId()) + Glib::ustring(" measure-helper-lines measure-lines")).c_str());
}
- line->setAttribute("class", (Glib::ustring(sp_lpe_item->getId()) + Glib::ustring(" ") + Glib::ustring(this->lpeobj->getId()) + Glib::ustring(" measure-line")).c_str());
gchar * line_str = sp_svg_write_path( line_pathv );
line->setAttribute("d" , line_str);
g_free(line_str);
@@ -525,10 +524,9 @@ LPEMeasureSegments::doOnApply(SPLPEItem const* lpeitem)
}
Glib::ustring styleContent = Glib::ustring(textNode->content());
if (styleContent.find(".measure-arrows\n{\n") == -1) {
- styleContent = styleContent + Glib::ustring("\n.measure-arrows") + Glib::ustring("\n{\nfill:#ff0000 !important;\nstroke:none;\n}");
- styleContent = styleContent + Glib::ustring("\n.measure-labels") + Glib::ustring("\n{\nline-height:125%;\nletter-spacing:0;\nword-spacing:0;\ntext-align:center;\ntext-anchor:middle;\nfill:#000000;\nfill-opacity:1;\nstroke:none;\n}");
- styleContent = styleContent + Glib::ustring("\n.measure-DIM-lines") + Glib::ustring("\n{\nstroke:#000000;\nfill:none;\n}");
- styleContent = styleContent + Glib::ustring("\n.measure-helper-lines") + Glib::ustring("\n{\nstroke:#000000;\nfill:none;\n}");
+ styleContent = styleContent + Glib::ustring("\n.measure-arrows") + Glib::ustring("\n{\n}");
+ styleContent = styleContent + Glib::ustring("\n.measure-labels") + Glib::ustring("\n{\nline-height:125%;\nletter-spacing:0;\nword-spacing:0;\ntext-align:center;\ntext-anchor:middle;\nstroke:none;\n}");
+ styleContent = styleContent + Glib::ustring("\n.measure-lines") + Glib::ustring("\n{\n}");
}
// styleContent = styleContent + Glib::ustring("\n.") + Glib::ustring(lpeitem->getId()) + Glib::ustring("\n{}");
// styleContent = styleContent + Glib::ustring("\n.measure-labels.") + Glib::ustring(lpeitem->getId()) + Glib::ustring("\n{}\n");