Config file isn't working as expected

Asked by Alex K

Here's the config file for the theme. Check out the !launcher section. Might be esier to read if you copy it into a text editor with html/xml syntax highlighting .

<theme name = "Sillouette">
<!--
 Created by Alex Kaehler
 This work is licensed under a Creative Commons Attribution-Share Alike License
 creativecommons.org
-->
<pixmaps>
 <pixmap_from_file name="button" file="button.png" />
 <pixmap_from_file name="mask" file="mask.png" />
 <pixmap_from_file name="launcherbutton" file="launcherbutton.png" />
</pixmaps>
<button_pixmap gap = "0" aspect_ratio="2/1">
 <get_icon size="-7" />
<!-- <if type="all_minimized">
  <transp_sat opacity="50" saturation="100" />
 </if>
 <if type="some_minimized">
  <pixmap_from_self name="greyed">
   <transp_sat opacity="74" saturation="14" />
  </pixmap_from_self>
  <combine degrees="90" pix1="self" pix2="greyed" />
 </if> -->
 <if type="blink">
  <bright strenght="13" />
 </if>
 <correct_size />

<!--
Can't get the following section to work:
-->

<!-- the goal is to create a black copy of the application's icon, shrink it by a few pixels, and overlay it onto the normal icon, leaving only the edges of the original icon visible.
-->
 <if type="!launcher"> <!--This will affect all buttons eventually, but I'm doing it only on groupbuttons for now -->
  <pixmap_from_self name="inner"> <!-- this is the overlay -->
   <bright strenhgt="100" /> <!-- this turns it white.. -->
   <bright strenhgt="-100" /> <!-- ..and then black, -->
   <shrink pixels="2" /> <!-- shrink it by a small amount.. -->
  </pixmap_from_self>
  <composite bg="self" fg="inner" /> <!-- ..and then overlay it onto the original icon -->
 </if>

<!-- /broken -->

 <if type="launcher">
  <bright strenght="100" />
  <bright strenght="-100" />
  <transp_sat opacity="25" saturation="100" />
 </if>
 <if type="mouse_over">
  <bright strenght="100" />
 </if>
 <if type="active">
  <pixmap name="active_bg">
   <fill color="active_color" opacity="active_opacity" />
  </pixmap>
  <composite bg="active_bg" fg="self" />
 </if>
 <if type="needs_attention">
  <pixmap name="red">
   <fill color="#FF0000" opacity="30" />
   <alpha_mask mask="mask" />
  </pixmap>
  <composite bg="red" fg="self" />

 </if>
</button_pixmap>
</theme>

Question information

Language:
English Edit question
Status:
Solved
For:
DockbarX Edit question
Assignee:
No assignee Edit question
Solved by:
Matias Särs
Solved:
Last query:
Last reply:
Revision history for this message
Best Matias Särs (msevens) said :
#1

<bright strenhgt="100" />, strength is spelled wrong (and not in the same way as I misspelled it in earlier versions "strenght", that one is still accepted for compatibility reasons).

But the real problem is a bug: Shrink command didn't work if aspect ratio was something other than 1. A fix is committed (rev. 107). Thanks for helping me find it.

Also, you can use <colorize color="#000000" /> instead of <bright strenght="100" /><bright strenght="-100" /> (if you are using rev. 106 or newer)

Revision history for this message
Alex K (levviathor) said :
#2

Thanks Matias Särs, that solved my question.

Revision history for this message
Alex K (levviathor) said :
#3

Wow, that sounds cheesy.

Anyway, thanks for the answer. I'm using the latest version from the PPA, but it doesn't have either colorize= or windows=.

Also, you really ought to fix the bright strenght typo. Maybe you could parse either the correct version, *or* the typo as the same thing, to maintain backward compatibility, and then make a note in ThemeingHOWTO.

Or something. I don't know how themes are parsed.

Revision history for this message
Matias Särs (msevens) said :
#4

The last couple of revisions does exactly that, accepting both the typo and the correct spelling.

As the most active theme maker and the creator of the most used third party theme, maybe you should start use code directly from the branch? Then you would be up-to-date whit your theme when new versions comes out, and you could report bugs that affect the theme engine before the are a part published in a new version.

On a only slightly related note, Michael opened a branch for themes, as you requested. Feel free to publish your theme there.

Revision history for this message
Alex K (levviathor) said :
#5

Ah, I didn't know that.

I'll try to update to the latest rev. I messed up on my last attempt :)

I'll see if I can get my theme published to the official branch.