This patch is for 6695389 which I submitted recently. I saw that a new
L&F property "ScrollPane.fillUpperCorner" was added recently for the GTK
L&F. Windows also fills the upper corner, see any native file chooser in
details view for example. This patch just sets this property to TRUE for
Windows so we match this behaviour.

If there's no objection, I'd be in favour if setting this for all of the
look and feels, including Metal. It just looks odd with the gap there.

This is my first attempt at a patch. If all goes well, I have quite a
few minor visual tweaks like this that I'd like to fix, mostly for the
Windows L&F. 
# HG changeset patch
# User loubs001
# Date 1210723869 -34200
# Node ID a81f5a4dc7d668dc61fd26cb770e16c0b2a63126
# Parent  2249879c6f222e3a360c565aec5bdc3c5044d32e
Make WinL&F vertical scrollbar fill upper gap in scrollpane

diff -r 2249879c6f22 -r a81f5a4dc7d6 
src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java 
Fri Apr 25 15:18:45 2008 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java 
Wed May 14 09:41:09 2008 +0930
@@ -1232,6 +1232,7 @@
             "ScrollPane.font", ControlFont,
             "ScrollPane.background", ControlBackgroundColor,
             "ScrollPane.foreground", ControlTextColor,
+            "ScrollPane.fillUpperCorner", Boolean.TRUE,
             "ScrollPane.ancestorInputMap",
                new UIDefaults.LazyInputMap(new Object[] {
                            "RIGHT", "unitScrollRight",

Reply via email to