Reply to topic

How can I create my own themes?
Tim Waterston


Joined: 06 Oct 2007
Posts: 8
Reply with quote
I was reading in the change log that it was possible to create a custom theme for the toolbar, but I can't seem to find any information on that..please advise!

Thanks,
Tim
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
Hi Tim,

We are in the process of writing an article that will give step-by-step instructions on how this is done. It may be a couple of weeks until it is finished, because we are also trying to make the whole 'theme creation' process much easier.

Are you a graphics expert?

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Tim Waterston


Joined: 06 Oct 2007
Posts: 8
Reply with quote
Logan,

Thanks for the fast response. I wouldn't call myself an expert. I just want to change one of the current themes..maybe this is something I can do already? I want to add an image. An alpha blended image that has an alpha channel, on top of any of the existing themes. If I could take the Charcoal theme and add a logo on top of the background...somewhere....? Is that possible now?

Thanks,
Tim
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
It is definitely possible to do it in the current version, but.. Smile It's quite a learning curve. There is no documentation explaining how to do it, currently.

Gizmo's theme system uses its own proprietary XML schema. It lets you render graphic elements, in vector fashion, using XML tags and declarations. It supports PNG graphics, therefore the alpha channel is supported. It resizes, rotates, and transforms the images, as the toolbar size changes. (But only if you want it to)

Maybe if I posted an example, you might be able to figure it out. Have you done any work with XML at all?

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Tim Waterston


Joined: 06 Oct 2007
Posts: 8
Reply with quote
I'm familiar enough with XML to take a crack at it. I've worked with XAML a little. Is that what Gizmo uses? Please post that example! Thank you very much!!!


Tim
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
Gizmo does not use XAML or WPF. It has its own graphics rendering engine which is geared towards the needs of Gizmo specifically, and so it is friendlier on system resources!

I'll be sure to post the XML for the Charcoal theme later this evening. The XML schema is still being tested though, and so be forewarned that it is subject to change!

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Tim Waterston


Joined: 06 Oct 2007
Posts: 8
Reply with quote
That sounds great. Thanks again for posting that!
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
You bet, here it is, the XML for the Charcoal theme: charcoal.xml (Note: right-click on this and select 'Save Link As...')

I just want to note, again, just in case anyone else is reading this--the XML schema is not finalized yet, and so it is subject to change, up until the point we post the article on creating themes. After that, we will do our best to support backwards compatibility. Although I don't foresee anything changing at this point really. Smile

I hope it makes sense. The first thing you should probably do is change the <Name>, <Author> and <Engine> tags in the <Synopsis> section. The <Engine> tag should be changed to whatever version of Gizmo you are developing the theme with. (This will help with backwards compatibility) Next, rename the file to reflect the new name of your theme! Then move this file into your My Documents > Gizmo > Themes folder. Refresh Gizmo to see the theme show up in your list. If there is an error in the XML, the shadow console will popup and tell you what the error is, and the toolbar will revert to its defacto theme.

Let me know your thoughts, and if you have any questions!

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Tim Waterston


Joined: 06 Oct 2007
Posts: 8
Reply with quote
ALL RIGHT!!!~ This works. I can change the theme and get it running quite easily. This is pretty nice. But I have some questions of course. The charcoal theme does not have examples in using images. How do I add an image? Second question. What is the proper way to format a color value? I see color values with 6 values, some 3, some 4?
View user's profileSend private message
Tim Waterston


Joined: 06 Oct 2007
Posts: 8
Reply with quote
One more question. What is the difference between Right and RightAnchor?
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
Glad it's working! Smile To add an image, use <Image File="{path-to-image}" Left="{x}" Top="{y}" />

If you specify the filename without a path, then the theme system will look for the image inside the 'Themes' directory, or whichever directory the XML file is in.

Regarding the color values. There is some flexibility there. The long-winded color values are #RRGGBBAA. You can omit AA, which is the alpha channel, and it will default to full opacity. The short-winded color values are #RGBA. Again, you can omit the A to have it default to full opacity.

Here are some examples:

#ff0000ff - Red (Opaque)
#f000088 - Red (Transluncent)
#ff0000 - Red (Opaque)

#f00f - Red (Opaque)
#f008 - Red (Translucent)
#f00 - Red (Opaque)


Regarding Right and RightAnchor. A value defined for 'Right' is relative to x1, where 'RightAnchor' is the delta between the value and x2.

Code:


  x1                       x2
  +-------------------------+ y1
  |                         |
  |                         |
  |                         |
  +-------------------------+ y2



'Right' and 'RightAnchor' are mutually exclusive, and so you can only specify a value for 'Right' or 'RightAnchor'. Not both. It's better to use 'RightAnchor' if your element needs to sized, or position, based on the width of the toolbar. Otherwise, use 'Right' to size your element the same, regardless of the width of the window.

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Tim Waterston


Joined: 06 Oct 2007
Posts: 8
Reply with quote
Logan. For some reason the theme will not find my image. This is how I have it.

<Image File="C:\Users\Tim\Desktop\omega.jpg" Left="0" Top="0" />

I copy the file into the themes directory and change the setting to just the filename. Also changed the setting to the full path to the themes directory. There are no error messages though. Any clues?
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
Ah, I should have been more clear. The *only* image format that the theme system supports is PNG. If you plan to use the alpha channel, then you won't be able to use JPEG anyway. Smile

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Tim Waterston


Joined: 06 Oct 2007
Posts: 8
Reply with quote
OK Very Happy I was using the jpeg as a test. But yes! After switching it to png it finds the image now and it is on the toolbar!! Thank you!!! I have a new theme which I think we can really use. This is pretty handy.
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
Great! Glad to hear it's working for you! If you have any additional questions, please don't hesitate to post them here!

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
How can I create my own themes?
All times are GMT - 8 Hours  
Page 1 of 1  

  
  

 Reply to topic