Seems like I can kinda answer two of these questions myself now...

Q: How can loader1.gwt-image be "loading.gif"?

<ui:with type="blah.client.MyClientBundle" field="cb"/>
<ui:image field="loading" resource="{cb.loading}"/>
<ui:style>
   @sprite .loader1 {
       gwt-image: 'loading';
       padding-left: value('loading.getWidth','px');
       width: auto;
       height: auto;
}
</ui:style>


The problem with this is that if (loading.gif && MyClientBundle) are in a
different package/directory to that of the ui.xml BOOM!  This seems a little
stupid to me, re-usablity of ClientBundles across multiple ui.xml templates
is a great idea - but putting them all in the same flat package/directory
structure is not. If anyone can clean this up it would be excellent.

Q: How can loader3.margin-left be "loading.gif.width"?

as above...  padding-left: value('loading.getWidth','px');


If anyone can help with the other stuff... THANKS HEAPS.


On Tue, Sep 7, 2010 at 10:46 AM, Andrew Hughes <[email protected]> wrote:

> Hi Guys,
>
> I'll try to be concise :) I do *NOT* want to use an external css file. All
> style should be in the ui.xml...
>
> *Client Bundle:*
> public interface MyClientBundle extends ClientBundle {
>      @Source("loading.gif") ImageResource loading();
> }
>
> *ui.xml*
> <ui:with type="blah.client.MyClientBundle" field="cb"/>
> <ui:style>
>  .loader1 {
> gwt-image: ????;
>  }
> .loader2 {
> background: ????;
>  }
> .loader3 {
> margin-left: ????;
>  }
> </ui:style>
>
> *Questions:*
>
> Q: How can loader1.gwt-image be "loading.gif"?
> Q: How can loader2.background be "loading.gif"?
> Q: How can loader3.margin-left be "loading.gif.width"?
>
> Thanks Heaps :)
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to