← Back to team overview

desktop-packages team mailing list archive

[Bug 1431794] [NEW] cant use classes to set colors

 

Public bug reported:

in inkscape, when we try to use classes to set a color (important for
kde-plasma workspace theming). inkscape always writes the color of the
element, written in the classdescription directly to the style of the
element. we have to remove it from outside inkscape all the time.

for example:

create an svg file with the content:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/";
   xmlns:cc="http://creativecommons.org/ns#";
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
   xmlns:svg="http://www.w3.org/2000/svg";
   xmlns="http://www.w3.org/2000/svg";
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
   viewBox="0 0 24 24"
   id="svg"
   version="1.1"
   inkscape:version="0.91 r13725"
   width="100%"
   height="100%"
   sodipodi:docname="tmp0.svg">
  <defs
     id="defs1">
    <style
       id="current-color-scheme"
       type="text/css">.ColorScheme-Background {
	color:#333333;
}</style>
  </defs>
  <metadata
     id="metadata1">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <sodipodi:namedview
     pagecolor="#808080"
     bordercolor="#666666"
     borderopacity="1"
     objecttolerance="10"
     gridtolerance="10"
     guidetolerance="10"
     inkscape:pageopacity="0"
     inkscape:pageshadow="2"
     inkscape:window-width="1920"
     inkscape:window-height="1016"
     id="namedview1"
     showgrid="true"
     inkscape:zoom="11.313708"
     inkscape:cx="5.1845261"
     inkscape:cy="25.241479"
     inkscape:window-x="0"
     inkscape:window-y="0"
     inkscape:window-maximized="1"
     inkscape:current-layer="svg"
     borderlayer="true"
     showguides="true"
     inkscape:guide-bbox="true">
    <inkscape:grid
       type="xygrid"
       id="grid1"
       empspacing="5"
       visible="true"
       enabled="true"
       snapvisiblegridlinesonly="true" />
  </sodipodi:namedview>
</svg>


as you can se we embedded the css alreads. so save it as "test.svg", and
open it with inkscape.

now create an element like a circle, open the xml editor and navigate to
the circle element.

in your xml editor you can write now a new attribute "class" with the
value of "ColorScheme-Background" and click on 'set'

next go to the style part and set the value only to "fill:currentColor".


now it *should* change the color to what is giver by the css (that part works).
BUT alongside to the "fill:currentColor" there will now be a "color:#333333". and that should not happen, because it breaks the funktionality of the css.

when you try to remove that part "color:#333333" from xml editor, its
not possible. but you can remove it from outside inkscape. inkscape can
still read the file.


so please make it possible that it wont write the color from css to the
style element, but uses what we write in.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: inkscape 0.91-3ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1
Uname: Linux 3.19.0-9-generic x86_64
ApportVersion: 2.16.2-0ubuntu3
Architecture: amd64
CurrentDesktop: KDE
Date: Fri Mar 13 11:09:06 2015
InstallationDate: Installed on 2015-02-01 (39 days ago)
InstallationMedia: Kubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150130)
SourcePackage: inkscape
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: inkscape (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug vivid

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to inkscape in Ubuntu.
https://bugs.launchpad.net/bugs/1431794

Title:
  cant use classes to set colors

Status in inkscape package in Ubuntu:
  New

Bug description:
  in inkscape, when we try to use classes to set a color (important for
  kde-plasma workspace theming). inkscape always writes the color of the
  element, written in the classdescription directly to the style of the
  element. we have to remove it from outside inkscape all the time.

  for example:

  create an svg file with the content:

  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <svg
     xmlns:dc="http://purl.org/dc/elements/1.1/";
     xmlns:cc="http://creativecommons.org/ns#";
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
     xmlns:svg="http://www.w3.org/2000/svg";
     xmlns="http://www.w3.org/2000/svg";
     xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
     xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
     viewBox="0 0 24 24"
     id="svg"
     version="1.1"
     inkscape:version="0.91 r13725"
     width="100%"
     height="100%"
     sodipodi:docname="tmp0.svg">
    <defs
       id="defs1">
      <style
         id="current-color-scheme"
         type="text/css">.ColorScheme-Background {
  	color:#333333;
  }</style>
    </defs>
    <metadata
       id="metadata1">
      <rdf:RDF>
        <cc:Work
           rdf:about="">
          <dc:format>image/svg+xml</dc:format>
          <dc:type
             rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
          <dc:title></dc:title>
        </cc:Work>
      </rdf:RDF>
    </metadata>
    <sodipodi:namedview
       pagecolor="#808080"
       bordercolor="#666666"
       borderopacity="1"
       objecttolerance="10"
       gridtolerance="10"
       guidetolerance="10"
       inkscape:pageopacity="0"
       inkscape:pageshadow="2"
       inkscape:window-width="1920"
       inkscape:window-height="1016"
       id="namedview1"
       showgrid="true"
       inkscape:zoom="11.313708"
       inkscape:cx="5.1845261"
       inkscape:cy="25.241479"
       inkscape:window-x="0"
       inkscape:window-y="0"
       inkscape:window-maximized="1"
       inkscape:current-layer="svg"
       borderlayer="true"
       showguides="true"
       inkscape:guide-bbox="true">
      <inkscape:grid
         type="xygrid"
         id="grid1"
         empspacing="5"
         visible="true"
         enabled="true"
         snapvisiblegridlinesonly="true" />
    </sodipodi:namedview>
  </svg>


  as you can se we embedded the css alreads. so save it as "test.svg",
  and open it with inkscape.

  now create an element like a circle, open the xml editor and navigate
  to the circle element.

  in your xml editor you can write now a new attribute "class" with the
  value of "ColorScheme-Background" and click on 'set'

  next go to the style part and set the value only to
  "fill:currentColor".

  
  now it *should* change the color to what is giver by the css (that part works).
  BUT alongside to the "fill:currentColor" there will now be a "color:#333333". and that should not happen, because it breaks the funktionality of the css.

  when you try to remove that part "color:#333333" from xml editor, its
  not possible. but you can remove it from outside inkscape. inkscape
  can still read the file.



  so please make it possible that it wont write the color from css to
  the style element, but uses what we write in.

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: inkscape 0.91-3ubuntu1
  ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1
  Uname: Linux 3.19.0-9-generic x86_64
  ApportVersion: 2.16.2-0ubuntu3
  Architecture: amd64
  CurrentDesktop: KDE
  Date: Fri Mar 13 11:09:06 2015
  InstallationDate: Installed on 2015-02-01 (39 days ago)
  InstallationMedia: Kubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150130)
  SourcePackage: inkscape
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1431794/+subscriptions


Follow ups

References