Created attachment 467699 [details] test program showing the problem Description of problem: The Ok button in the JFileChooser is so narrow in the GTK LookAndFeel that all you can see is the icon, not the text. This looks ridiculous. Version-Release number of selected component (if applicable): java-1.6.0-openjdk-1.6.0.0-49.1.9.3.fc14.x86_64 How reproducible: Always. Steps to Reproduce: 1. java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel Test Actual results: Ok button is too narrow. Expected results: Ok button should be readable.
Created attachment 467700 [details] screenshot of the problem
Can you please paste the result of: xprop -root | grep - i xft Thanks!
(In reply to comment #2) > Can you please paste the result of: > xprop -root | grep - i xft > > Thanks! I'm guessing that's supposed to be '-i', not '- i'? [uckelman@scylla ~]$ xprop -root | grep -i xft RESOURCE_MANAGER(STRING) = "Xft.antialias:\t1\nXft.dpi:\t96\nXft.hinting:\t1\nXft.hintstyle:\thintslight\nXft.rgba:\tnone\n"
(In reply to comment #3) > > xprop -root | grep - i xft > I'm guessing that's supposed to be '-i', not '- i'? Yup. Sorry, my typo. > [uckelman@scylla ~]$ xprop -root | grep -i xft > RESOURCE_MANAGER(STRING) = > "Xft.antialias:\t1\nXft.dpi:\t96\nXft.hinting:\t1\nXft.hintstyle:\thintslight\nXft.rgba:\tnone\n" Hmm.. can you try changing your font settings to "Monochrome" or "Subpixel smoothing" using gnome-appearance-properties to see if that makes the problem disappear? If that fixes the problem, then I believe it is an issue with how text lengths are computed in the presence of antialiasing. Thanks!
(In reply to comment #4) > > Hmm.. can you try changing your font settings to "Monochrome" or "Subpixel > smoothing" using gnome-appearance-properties to see if that makes the problem > disappear? If that fixes the problem, then I believe it is an issue with how > text lengths are computed in the presence of antialiasing. > > Thanks! With Monochrome, all the text shows up on the Ok button. Switching the font rendering made me notice a related problem---the Cancel and Ok buttons aren't the same width, which also looks strange.
(In reply to comment #5) > With Monochrome, all the text shows up on the Ok button. Thanks. I think I know what this problem is. This has been fixed upstream in OpenJDK7 through http://hg.openjdk.java.net/jdk7/swing/jdk/rev/281fbd82a971. Unfortunately, backporting it to OpenJDK6 (or IcedTea6) is not trivial - there were lots of code changes (which are not public) in between. I will see if a simpler fix is possible. > > Switching the font rendering made me notice a related problem---the Cancel and > Ok buttons aren't the same width, which also looks strange. This _should_ be simple enough to fix.
Created attachment 473559 [details] result with same button sizes This image shows how the buttons look with the same sizes. I am not sure if this is ideal.
Created attachment 473560 [details] patch to make buttons the same size
The following two patches combined seem to do the trick. http://hg.openjdk.java.net/jdk7/swing/jdk/rev/e78c2f17a60 http://hg.openjdk.java.net/jdk7/swing/jdk/rev/281fbd82a971 I will request a backport of these two patches
(In reply to comment #7) > Created attachment 473559 [details] > result with same button sizes > > This image shows how the buttons look with the same sizes. I am not sure if > this is ideal. Buttons are equal width in all GNOME dialogs, though, so far as I've seen, so it would be inconsistent not to do it here.
(In reply to comment #10) > Buttons are equal width in all GNOME dialogs, though, so far as I've seen, so > it would be inconsistent not to do it here. Good point. The Sun/Oracle engineers agree with your point. I have backported the patches: http://icedtea.classpath.org/hg/icedtea6/rev/c78edcdba40f http://icedtea.classpath.org/hg/icedtea6/rev/974192ac0471 The next IcedTea6 version should include this fix.
The newer versions of icedtea6 (in F15 or later) should contain these fixes. But since F14 has been EOL'ed, the fix wont be added there. Sorry.