You are here

generate three vista plus (mac) type buttons

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!

This is an adaption of a script that I found (not sure where now but possible to re-find by searching on google). The name under the registration was Lucas Pettett so I guess it was his.
Originally it took some colours and text and produced a vista style button with a gradient dark part and light part horizontally divided. The corners were rounded and it had a border.
I have added the following things (so I can quickly create buttons for some of the applications I am working on):

  1. horizontal edge has rounded corners and feathered
  2. produces three versions:
    • grey - inactive form
    • normal button
    • mouse hover form (i.e. with the blue led shining through)
  3. it's possible to pick up a vector/path type svg file (you can save a path as this by right clicking on the path in the dockable dialogue then choosing export). This will then be scaled to fit your button (so you will get distortion if they are mismatched shapes.)

I'm not a script-fu programmer so most of this is trial and error and would probably benefit from some expert scrutiny.
The GIMP I'm using is 2.6 on windows so I don't know if it works elsewhere.
(examples attached below)

v_but_0.png4.84 KB
v_but_1.png4.01 KB
v_but_3.png5.43 KB
vista_button.scm5.28 KB
GIMP Version: 
Scripting Engine: 


You script file does not mention that it is in the Public Domain, please add this.

This is a nice plugin, there's just one thing I wish... Can you make it so that you can disable the rounded corners? I need a square cornered button. Thanx -Brandon

Brandon Should work OK now with: - corner radius set to 0 (no error trapping so negative values crash it) - zero length text string doesn't produce text layer - toggle 2nd and 3rd style buttons on and off Good luck with it Patrick

It works fine in Gimp pt-br (Brazilian Portuguese) after I changed "FG to Transparent" to "Frente para transparente". I do not know if Script-Fu is able to make i18n-compatible strings. If not, it should be a feature request to the developers.

Tip for this error:
make a new gradient with "FG to Transparent" name, and set right color to Foreground (transparent). And working now with any language... :-)

Thanks for the comment. I don't really know much about these scripts but when I looked at the line you mentioned it seemed redundant as the following one: (gimp-edit-blend layerhighlight FG-TRANSPARENT-MODE ... seems to specify the job required, and when I comment out the line you had to translate, the script seems to work just as well!
Subscribe to Comments for "generate three vista plus (mac) type buttons"