e4 css styling does not work right (Buttons, Text) [message #806706] |
Sat, 25 February 2012 10:30 |
Karl Weber Messages: 63 Registered: September 2010 |
Member |
|
|
I am using css styling for SWT / GTK with 4.2 I20120209-1230. The styling I have so far, looks like:
As can be seen, the text, button, and table fields are rectangular grey areas containing the text, button, and table widgets. Hence, there is a grey boundary around these widgets, which looks quite ugly -- this boundary should not be visible, i.e. it should be white. I have no idea about how to archive this.
I have already looked at the contacts demo, e.g. in blue-gradient style. It does not seem to have this problem with text fields, but i don't know how it is done. The css-file does not help.
[Updated on: Sat, 25 February 2012 10:34] Report message to a moderator
|
|
|
Re: e4 css styling does not work right (Buttons, Text) [message #806767 is a reply to message #806706] |
Sat, 25 February 2012 12:55 |
Karl Weber Messages: 63 Registered: September 2010 |
Member |
|
|
O.k. I am one step further: The contacts demo uses the method
parent.getShell().setBackgroundMode(SWT.INHERIT_DEFAULT);
This helps for text fields but not for buttons. For the latter to work as well, one has to use
parent.getShell().setBackgroundMode(SWT.INHERIT_FORCE);
Furthermore I still head some style parameters set in the constructor, e.g.
new Text(parent, SWT.BORDER);
One should use instead
new Text(parent, SWT.NONE);
The result is then:
This solves part of the problem. My Text field also had SWT.SEARCH set in the constructor. I don't know what this does anyway, but if set it yields the same result as SWT.BORDER, hence it cannot be used any more.
Furthermore, the table needs more styling. When it has content, it looks as
One problem is, that the border of the table is only o.k. when it has no content, otherwise the unwanted grey boundary shows up again. Furthermore I don't know how to set a zebra-like background color. Setting a background color for the table works as in the contacts demo -- without zebra-style.
Can someone give me a little more help about css styling?
[Updated on: Sat, 25 February 2012 13:00] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03594 seconds