I don't think there is a different way. Perhaps you could extend the ClientBundle Generator so it includes different images based on a custom property (or simply user.agent) in your gwt.xml, e.g. @Source("home-icon.svg") would be treated as default but the generator also searches for "<your.property.value>/home-icon.png" and uses this image if its available. But not sure if its possible.
Not sure if you can swap out the ClientBundle directly because they are generated, so I guess you may need ClientBundleFactories that you swap out with deferred binding, e.g.
HiDpiFactory extends AppClientBundleFactory {
MyClientBundle createMyClientBundle() {
return GWT.create(HiDpiMyClientBundle.class);
}
}
I would love to see a better solution!
-- J.