Difference between revisions of "Theme Management API"

From WebOS Internals
Jump to navigation Jump to search
(1)
(2)
Line 5: Line 5:
 
# Create a new theme folder in /media/internal/.themes/thisTheme/  
 
# Create a new theme folder in /media/internal/.themes/thisTheme/  
 
# In that new folder, place a file for each image that you intend to theme.  
 
# In that new folder, place a file for each image that you intend to theme.  
## The new file must be placed in the exact same relative path as before... that is to say, if the file was previously at /usr/palm/images/1.png  then the new file must be at /media/internals/.themes/thisTheme/usr/palm/images/1.png  
+
#: The new file must be placed in the exact same relative path as before... that is to say, if the file was previously at /usr/palm/images/1.png  then the new file must be at /media/internals/.themes/thisTheme/usr/palm/images/1.png  
 
#: The new file must have the same name, and be of the same type as the original file.
 
#: The new file must have the same name, and be of the same type as the original file.
 
# The themer must include a file for each CSS file that he wants to theme...  
 
# The themer must include a file for each CSS file that he wants to theme...  
Line 11: Line 11:
 
#:: If the original application was /usr/palm/applications/phone/stylesheets/phone.css  the theming css must be in /media/internals/.themes/thisTheme//usr/palm/applications/phone/stylesheets/theme.css
 
#:: If the original application was /usr/palm/applications/phone/stylesheets/phone.css  the theming css must be in /media/internals/.themes/thisTheme//usr/palm/applications/phone/stylesheets/theme.css
 
#:: the theming file must ALWAYS be called "theme.css"
 
#:: the theming file must ALWAYS be called "theme.css"
 +
# If you are overriding one of the palm global stylesheets they must be placed in the correct place as well.  /usr/palm/framework/stylesheets  and be named  themeXXXXX.css where XXXXX is the global stylesheet being overridden.
 +
# In your theme override stylesheets references to your images that override the default images should refer to /var/activetheme/... not to /media/internals/.theme/mytheme 
 +
# When your theme is chosen as the active theme, the system will symlink YOUR theme directory to /var/activetheme.

Revision as of 23:00, 29 January 2010

Theme Management API

This is an initial attempt at hashing out a secure, reliable Theme Management API. One of the main goals is to modify as little as we can of stock Palm files.

  1. Create a new theme folder in /media/internal/.themes/thisTheme/
  2. In that new folder, place a file for each image that you intend to theme.
    The new file must be placed in the exact same relative path as before... that is to say, if the file was previously at /usr/palm/images/1.png then the new file must be at /media/internals/.themes/thisTheme/usr/palm/images/1.png
    The new file must have the same name, and be of the same type as the original file.
  3. The themer must include a file for each CSS file that he wants to theme...
    If the css file being overridden is an application css, it must be placed in the exact same relative path as it would have been in the application.
    If the original application was /usr/palm/applications/phone/stylesheets/phone.css the theming css must be in /media/internals/.themes/thisTheme//usr/palm/applications/phone/stylesheets/theme.css
    the theming file must ALWAYS be called "theme.css"
  4. If you are overriding one of the palm global stylesheets they must be placed in the correct place as well. /usr/palm/framework/stylesheets and be named themeXXXXX.css where XXXXX is the global stylesheet being overridden.
  5. In your theme override stylesheets references to your images that override the default images should refer to /var/activetheme/... not to /media/internals/.theme/mytheme
  6. When your theme is chosen as the active theme, the system will symlink YOUR theme directory to /var/activetheme.