Skip to main content

Native Gnome L&F in b42

4 replies [Last post]
trembovetski
Offline
Joined: 2003-12-31

Hey folks, check out the new implementation of gnome L&F in mustang b42, it now uses native gnome libs to render the widgets, so it looks much closer to native gnome apps and it supports much more themes.

Please try it out with your favorite gnome theme, let Swing guys know any problems you may run into while we still have time to fix them..

Thanks,
Dmitri
Java2D Team

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
murphee
Offline
Joined: 2003-06-10

A question first:
I'm trying to understand how this works... do you use some native GTK libs to get information about the current themes... or is some actual rendering/drawing done by GTK code?

Some comments:
- Some things are very, very slow (resizing Frames (internal and top level), split pane,...). Is this just me or is this a known issue? Where could this come from?
- Is the File Open/Save dialog implemented in Java or using the native GTK version (I still get the bad old GTK file dialog);

trembovetski
Offline
Joined: 2003-12-31

2murphee:
I put some implementation details on this javalobby thread:
http://www.javalobby.org/java/forums/m91837239.html

I think when you resize a frame all those caches I mentioned in my JL posts get blown away, thus the poor performance. But still, this is not good.

The open-save dialog is a Swing dialog, but the images for all components rendered by gtk, as for the rest of swing with gtk L&F.

Thanks,
Dmitri
Java2D Team

kenada
Offline
Joined: 2005-06-26

The GTK+ LaF is definately getting better, but I did notice a few things (using the ClearLooks theme that comes with Fedora Core 4).

* The native engine checks for GTK+ by dlopening libgtk-x11-2.0.so, but this does not exist on FC4. libgtk-x11-2.0.so.0 does, and symlinking it to libgtk-x11-2.0.so allows native rendering to work.
* Metacity theme rendering has artifacts [url=http://www.cse.ohio-state.edu/~eckenror/Java/MDI.png]pic[/url])
* Tabs have a line across the bottom though native tabs do not. ([url=http://www.cse.ohio-state.edu/~eckenror/Java/Tabs.png]pic[/url])
* Menu things ([url=http://www.cse.ohio-state.edu/~eckenror/Java/Menu.png]pic[/url])
* The highlight on the menu over which the mouse is hovered is rounded on all four corners rather than just the top two.
There also appears to be a bit more vertical padding than in the native theme on items. On the other hand, there is no padding on the separators.
* There is a one pixel border around the menubar.
* Spinners ([url=http://www.cse.ohio-state.edu/~eckenror/Java/Spinners.png]pic[/url])
* The top spinner button appears to be drawn with the border of the bottom one, causing it to be rounded on the bottom rather than the top.
* The text entry widget is rounded on all four sides when the native one is rounded only on the ones that do not touch the buttons.
* The arrows are a bit larger than on the native ones.
* Combo boxes ([url=http://www.cse.ohio-state.edu/~eckenror/Java/Combo.png]pic[/url])
* The uneditable combo box is drawn like an editable one
* The double arrows are too large and off-center
* List box draws focus outline on selected items though the native theme does not
* Corners on the scrollbars are not rounded, and the scrollbar thumbs do not have a dark outline on all sides ([url=http://www.cse.ohio-state.edu/~eckenror/Java/Scroll.png]pic[/url])
* Thumbs on sliders do not have rounded corners and do not draw the slider trough before the slider in the selection color. The focus outline is also dashed rather than dotted and inset one pixel compared to the native theme. ([url=http://www.cse.ohio-state.edu/~eckenror/Java/Slider.png]pic[/url])
* Cursor does not change to a double arrow the mouse is over a separators in a split pane.
* Tooltip background is the wrong color.
* Triangles do not animate when clicked in a tree view.
* Tables ([url=http://www.cse.ohio-state.edu/~eckenror/Java/Table.png]pic[/url])
* Table headers do not draw the lines between columns.
* Table cells separated by lines rather than being drawn in alternating colors.

Now that I have these all writen down, I should go check to see if there are any existing bugs and open some if not. :-)

trembovetski
Offline
Joined: 2003-12-31

Wow, kenada, excellent report! Thanks a lot, I'll let swing folks know about this..

Thanks,
Dmitri
Java2D Team