SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations > Diamond
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Diamond This forums is for discussing the user-created Diamond plugin for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-11-2011, 12:46 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Creating sub-themes

Is there a doc that lists the dos and don'ts for creating your own sub-themes? I would like to try creating my own theme with some of my own photos and perhaps change fonts, colors, etc.

Have you guys written any docs on this yet?

Any advice on using your own photos? What is the optimal size? Should you do any processing of your photos before using them, ie make them less "white", etc?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #2  
Old 04-13-2011, 08:42 AM
jorton jorton is offline
Sage Icon
 
Join Date: Jul 2005
Location: Canada
Posts: 1,273
Nothing official written yet (I'm not a great documentor...) but here are a few things to follow on top of looking in the Manual as I think there is some basic info there as well.

1. For Diamond, all new sub themes must begin with "Diamond" as the STVi is coded to check for this to make sure that you are not running a none Diamond theme with the UI Mod as we add quite a few images to the STV. So a new sub theme would need to be in the form "Diamond My Theme"


2. When you create a sub theme you must set the parent theme that you want to use. For example the “Diamond” theme sets the “Standard” theme as the parent. All other “Diamond XXXXX” themes set the parent theme as “Diamond” to utilize the assests in the main “Diamond” theme without duplicating them in the sub themes.

3. Don't make changes to the main theme.properties file in the main "Diamond" theme folder. This is the master that we often add to or change as we work on the STVi. Find the property you are interested in the main theme.properties file and then add to a theme.properties file in your sub theme folder and that sub theme property will override the main. No need to copy the whole main theme.properties file to the sub theme, just add the properties you want to change to the file in Notepad etc...

Here is an example of a subtheme theme.properties file that just replaces images,

Code:
ThemeParent=Diamond


Here is an example of a subtheme theme.properties file that sets the backgrounds to be a single image,

Code:
ThemeParent=Diamond
Code:
# Basic menu background
ImageFile/gBackgroundImage=background.jpg
# Menu background: Exit
ImageFile/gExitBackgroundImage=background.jpg
# Menu background: Settings
ImageFile/gSettingsBackgroundImage=background.jpg
# Menu background: Online
ImageFile/gOnlineBackgroundImage=background.jpg
# Menu background: Search
ImageFile/gSearchBackgroundImage=background.jpg
# Menu background: Photo
ImageFile/gPhotoBackgroundImage=background.jpg
# Menu background: Music
ImageFile/gMusicBackgroundImage=background.jpg
# Menu background: Video
ImageFile/gVideoBackgroundImage=background.jpg
# Menu background: TV
ImageFile/gTVBackgroundImage=background.jpg
Here is an example of a subtheme theme.properties file that changes some of the fonts of the main menu,

Code:
ThemeParent=Diamond Simplified
Code:
String/gFontNameMainMenu=DejaVuSans
String/gFontNameMenuTitle=DejaVuSans
String/gFontNameClock=DejaVuSans
String/gFontStyleMainMenu=Plain
String/gFontStyleMenuTitle=plain
String/gFontStyleClock=Plain
NumberInteger/gFontSizeMainMenu1=50
NumberInteger/gFontSizeMainMenu2=20
NumberInteger/gFontSizeMainMenu3=20
4. You can also have a sub theme that is based on a sub theme ("Diamond" is actually a subtheme of the "Standard" theme) so you could use any of the "themes" as a base for another theme just like in the above example,

Code:
ThemeParent=Diamond Simplfied
And then add any other entries you want to tweak.

5. You only have to add images to the sub theme folders that you are wanting to replace, so no need to have all the images from the main “Diamond” folder in the new sub theme folder, just add the new images with the same name to the sub theme folder.

6. For details on each of the properties you can use in the theme.properties files the best place to look is the theme.properties file in the "Standard" theme folder. Sagetv have done a lot of documenting right in the file itself so it's usually easy to find the setting you are interested by scanning or searching through it for what you are interested. For example when I first opened it I was interested in all the "Font" settings so I just kept searching for the word "Font" and would be taken to each setting in the file from top to bottom. I take a copy of the file and put it on my desktop for easy access and then you don't have to wory about messing up the original and goofing up you Sagetv setup

7. Also Opus4 has mentioned a few times that the option to put a "User Images" folder inside a theme folder that contains overriding custom images for backgrounds and other image assets. This way you can use an existing theme and not overwrite the original images but your custom ones will show.

Quote:
Originally Posted by Opus4 View Post
Creating a whole new theme offers more flexibility, but if all you want to do is replace a few images, you don't need to create a new theme. In the theme you are using, add your replacements in the "User Images" folder inside your current theme's folder.
Quote:
Originally Posted by Opus4 View Post

Themes should not be adding images to the "User Images" folder, so the custom images should still be in place after a theme update.


Good luck!

J
Reply With Quote
  #3  
Old 04-13-2011, 08:57 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
[QUOTE=jorton;492683]7. Also Opus4 has mentioned a few times that the option to put a "User Images" folder inside a theme folder that contains overriding custom images for backgrounds and other image assets. This way you can use an existing theme and not overwrite the original images but your custom ones will show.QUOTE]I assume then that you need to give the names of your image files in the User Images folder the same name as the original files - I can't look this up right now since I am at work. So for example if the TV background file in the Diamond theme is called TV_Background.jpg you would just create your own image file and store it as /User Images/TV_Background.jpg?

It would be nice if you could have a bunch of images and have Sage or Diamond cycle through them - or even have the image depend on the month so for December you have a Christmas photo, for October Halloween, etc. I think Phoenix has dynamic backgrounds based on weather or time of day.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #4  
Old 04-13-2011, 09:01 AM
jorton jorton is offline
Sage Icon
 
Join Date: Jul 2005
Location: Canada
Posts: 1,273
[quote=wayner;492687]
Quote:
Originally Posted by jorton View Post
7. Also Opus4 has mentioned a few times that the option to put a "User Images" folder inside a theme folder that contains overriding custom images for backgrounds and other image assets. This way you can use an existing theme and not overwrite the original images but your custom ones will show.QUOTE]I assume then that you need to give the names of your image files in the User Images folder the same name as the original files - I can't look this up right now since I am at work. So for example if the TV background file in the Diamond theme is called TV_Background.jpg you would just create your own image file and store it as /User Images/TV_Background.jpg?

It would be nice if you could have a bunch of images and have Sage or Diamond cycle through them - or even have the image depend on the month so for December you have a Christmas photo, for October Halloween, etc. I think Phoenix has dynamic backgrounds based on weather or time of day.
Correct on the image name, the must be the same as the original.

We have discussed this and it might become an option in a later release. If you don't mind logging it as an enchancement request it will get looked at.

J
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
So how do I use the new themes? madpoet Sage My Movies 2 10-24-2010 07:52 AM
how to install themes on mac? craigsharp SageTV Mac Edition 0 09-04-2010 08:53 PM
No themes appear whogentogler SageMC Custom Interface 1 12-11-2009 03:57 PM
SageTV 6.2 Themes joe123 SageTV Software 1 10-20-2007 03:49 PM
Themes.... Bohica SageTV Studio 12 03-29-2006 01:02 PM


All times are GMT -6. The time now is 07:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.