Graph themes from xml files.



Hi,

I'm currently working on solving bug #531070 and would like to have a
wider discussion about several points:

- Should used themes be saved with the document? I'm not sure about what
should be done, a local theme might have the same name than a saved
theme, but be actually be different, which might lead to
inconsistencies, and on the other side, if the theme is not saved, we
will fall back to the default theme each time locally unknown theme is
referenced in a file.

- In which directories should themes be installed?  go_sys_data_dir?
$HOME/.goffice? both? other? Note that we don't really need the version
in the path.

The file declaring the theme(s) would be something like:

<?xml version="1.0" encoding="UTF-8"?>
<themes>
        <theme id="my_theme">
                <name>My Theme</name>
                <description>My preferred theme</description>
                <file>my.theme</file>
        </theme>
</themes>

The actual xml file with the theme definition:
<?xml version="1.0"?>
<GogTheme name="black and white">
  <GOStyle class="GogGraph">
    <outline dash="none"/>
    <fill type="none"/>
  </GOStyle>
  <GOStyle class="GogChart">
    <outline dash="solid" color="black"/>
    <fill type="pattern" auto-type="1"/>
       <pattern type="solid" fore="black" back="white"/>
     </fill>
</GOStyle>
...
  <GOStyle role="MajorGrid">
    <line dash="solid" color="dark grey"/>
 </GOStyle>
...
</GogTheme>

If an element is missing it will be retrieved from the default theme.

Waiting for your comments,
Best regards,
Jean




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]