SmartGWT skinning - gwt

Some SmartGWT components are composed by a lot of small images. This is the case of IButton for example that gets rendered using images.
I want to adapt the original SmartGWT CSS to fit my needs, that are basically color changes.

This answer is not quite accurate..
If you have staff with experience with image-based skinning and appropriate tools (eg Adobe Fireworks), start from whatever skin you like.
If you don't, and you need to change the colors but don't care about niceties like rounded corners in older IE (which are impossible without images), start from Simplicity, or start from the CSS3 rendering mode provided for the 3 most popular skins (from 3.1 on):
http://blog.isomorphic.com/css3-mode/
The latter approach (CSS3 mode) is more visually rich than Simplicity.

It seems, that the best way of skinning an SmartGWT application is starting from the Simplicity theme.
Isomorphic team suggest starting from this theme, as it uses less images that the others themes.
As far as I've read, everything should be done by hand (editing images, and CSS).

Related

How to develop transparent interface?

This is not completely a programming question. Today when I load LiLi USB creator software I saw the interfaces are transparent. Is that because they are Photoshopped or is transparency a technique of IDE? I'm using both NetbBeans and Eclipse. To be clear, I'm adding a photo too.
For transparency of the entire GUI, including controls (which doesn't seem to be the case in your screenshot), .NET includes the Form.Opacity property.
Additionally, it may be possible to use LayeredWindows to change only the opacity of the top-level component to produce the desired effect.
For Java specifically, there's an official Java tutorial for that, although it seems to set the opacity of the entire window, including all child components.

Changing the GTK Scrollbar image

I would like to change the image of GTK Scrollbar,
i.e) I want to remove the standard looking scrollbar, and add my resources to it.
I dont mind touching gtk code.
I am sure that GTK will maintain all the images as a resources,
Can any one please locate me, where to change the images?
Thanks in advance
Dinesh P
The scrollbars aren't drawn in GTK; the theme engine is responsible for drawing them. In all themes that I know of, they are not drawn using image resources, but instead using GDK or Cairo.
See for example this code from the Clearlooks theme: http://git.gnome.org/browse/gtk-engines/tree/engines/clearlooks/src/clearlooks_draw_glossy.c (line 915, function clearlooks_glossy_draw_scrollbar_stepper())
If you want to use images, you will have to change a theme engine or write your own.
<standard-lecture>
It's generally frowned upon to do this sort of thing in GTK; the toolkit is all about usability. Users with particular needs may have configured their themes in a particular way, for example to be compatible with a screen reader, and drawing your own customized stuff may interfere with that. At the very least, you will piss people off by breaking their desktop themes. As an application developer, you should build your application out of the widgets that GTK and other libraries provide, and the user should be free to decide how it looks on their own desktop. </standard-lecture>

gwt rounded panel (standards based widget akin to DecoratorPanel)

I'm trying to write an app that uses rounded corners for framing the app. I've found a package on google code that has a RoundedLinePanel and it seems to work... kind of.
I'm wondering a few things. Is this what people are using for creating divs with round corners in GWT? The release notes say it hasn't changed in almost a year.
Also, I can't seem to set a fixed height of this div (setHeight sets it on the wrapper div, not the inner one). so it's not useful to me as I have a fixed height app.
Finally, if anyone can suggest a better mechanism for creating rounded corner divs in GWT I'm all ears.
There is a beautiful way to rounded corners using CSS 3 (which thus doesn't work in IE<=8 , but will in IE9 developer preview). Take a look at http://css3please.com/ to see the styles involved. It's fairly simple using a border-radius (or -moz-border-radius or -webkit-border-radius property). In GWT just add a Style Class Name you want to the elements you want to have a rounded border and you are go. Of course supporting rounded corners in legacy browsers is harder, but do you need to do it?
For legacy browsers it is quite harder, depending on the actual context. It always involves images for the borders. You have to create images that mask the border of the box. What works is the trick described in this answer. To use this in GWT you can use either uibinder, htmlelement or you create your own widget. A broader explanation of the technique can also be found here.
The solution most commonly found, the decoratorPanel, is deprecated in the current version of GWT (if you use it with GWT 2.1.1, for example, you'll wind up with a mess of incompatilbility between the GWT-required doctype, the decoratorPanel, and IE, especially IE8).
The required GWT 2.1.1 doctype (!doctype html) also disables the popular rounded-corners.htc for IE8.
You can use the CSS3 series of rounded corner properties to add classes, but they will not work in IE versions prior to 9.
JQuery and other javascript rounded corners have a high probability of conflicting with the native GWT js, so we abandoned those as a possible solution, though I personally did no testing for these.
We wound up having to use rounded corner images in order to be truly cross-browser compliant and create a consistent look.

How are these two iPhone UI pieces accomplished?

This might be trivial for some of you, but I have two screenshots from the Lose It! app in which I'm curious how two different screens were put together.
The first:
That middle graph which shows the statistics chart. Is that a custom image being drawn on top of with Core Graphics / Quartz to achieve the desired numbers? Is the yellow line that's being dynamically allocated all the work of Quartz?
And second:
This one might be a bit easier, but the whole bar which looks like a native UIKit widget, which contains [Budget, Food, Exercise, Net, Under]. There appears to be a drop shadow above it. Are they doing a drop shadow on the UINavigationBar? Is the menu below it just a UIImage that a designer was able to craft to look like the UINavigationBar?
If there's a blog out there which teaches UI tricks such as these, I'd love to read more.
1) Yes, it's likely a view that uses the chart as a background and then uses core graphics to render the line,
2) This could be a single view divided into four sections. Each section has two lines of text drawn with different colors. It's possible that each section may be a view that encapsulates this behavior.
I'm not aware of any blog that teaches these "tricks". It's really a case of understanding what functionality is available and then using it creatively to develop your UI.
For example we know it's possible to;
Draw images at different sizes/positions.
Draw text in different fonts, sizes, colors, alignment
Draw primitives
Really, when you have those you can create pretty much anything.
I think there's an SDK sample that demonstrates using custom views to create a fancy timezone style applications. That might be one worth checking out.
Update: found it, it's here.

Vector drawing tool for iPhone development

This isn't strictly a programming question, but I'm asking it here because it's certainly a software development question, if you take "software development" to include all aspects of creating a software system.
I am an independent iPhone developer. Except for translations, I handle all aspects of my apps myself—graphics included. I have to create icons, buttons, and UI elements of all sorts on a regular basis. I've learned a few tricks along these lines, and while they're certainly not works of art, I can effectively use gradients, shadows, border strokes, transparency, and textures to create minimalistic, attractive effects.
So far, I've used a vector drawing tool called VectorDesigner for all of my development, with occasional raster postprocessing by Pixelmator. It's worked mostly okay so far, but VectorDesigner has a host of issues:
It uses a package format for its files, which interferes with the use of Subversion.
It is very much a print tool, and I have to be very careful not to end up with objects on fractional pixel values which cause antialiasing.
While you can take the union or intersection of shapes, or add and subtract them, curves tend to deform with repeated boolean operations, sometimes quite dramatically.
And it offers very little control over strokes, to the point where I barely use them.
So I'm looking for a better tool for this specific purpose: shape-based drawing of simple icons, buttons, and UI elements on a Mac by someone without graphic design training. Good functions for exporting would be a plus—ideally it should be almost as easy to export a PNG to the place it goes in my project as it is to save (not save as) the file.
The perfect tool for me would be one that would allow you to define an object's shape by stacking up areas and masks defined by primitive shapes (which would remain separately editable), then define properties on those objects like transforms and strokes. I have no idea if something like this exists, though.
Adobe's tools generally strike me as very heavyweight, and are usually expensive, but I suppose they're a possibility. (Fireworks, with its emphasis on screen design, seems like it might be particularly suitable, but I don't know that much about it.) But what else is out there? If you're in a position like me, what do you use? What do you recommend?
Edited to add: Of course a graphic designer could get better results from an ancient copy of MacPaint than I could from Illustrator CS5. No tool can replace skill and taste, and many programmers have little of either. I'm aware of that. But I'm fortunate enough to have at least some taste—enough that my users compliment my apps' appearance in their reviews. I'm not hugely talented, but I do know my limitations, and I don't let myself produce anything ugly. Given my budget, that will have to do for now.
Try Opacity. A little rough on the edges, but one of the coolest and most unique features they have is export as source code (in Quartz, Cocoa, Cocoa Touch, or Canvas)
I'd suggest OmniGraffle
OmniGraffle is easy to use, can save as a PNG, can create binary non-package files (it's an option in the interface). You can also set the units to pixels to ensure exact alignment. (Canvas Size -> Ruler Units)
Finally, the Graffletopia website has some nice iPhone stencils for getting it right:
http://graffletopia.com/search/iphone
I think the only acceptable answer here should be "hire a designer".
But it sounds like Pixelmator/Inkscape are your best bets.
Though if you do find something better, that'd be really cool. Like a jQueryUI but for native.