Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[e4-dev] CSS image loading


I'm working on adding the ability to load resources (images) in CSS.  I'm posting this here because it affects the properties config for the modelled UI based apps and thought folks might want to know about the changes.

Previously, resource lookup only worked for java apps but not in the OSGi context.  To support it, I'm following the pattern we established for specifying the style sheet location, but in this case, you specify a path to the resources directory.

For example, in the photo demo you'd add to the plugin.xml:

         <property
               name="applicationCSSResources"
               value="platform:/plugin/org.eclipse.e4.demo.e4photo/images/">
         </property>

directory like:




style sheet like:
Tree {
        font: Verdana 8px;
        color: #666666;
        background: url(bluefade-full.gif);                
}

and result:



I'm not sure if this is the best approach though since:
1) it gives only a single location for all images
2) appends the file name to the end, which maybe isn't cool
3) requires the path have a '/' at end (but maybe we could add one for free if missing).

For discussion, please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=277471.

Kevin

Back to the top