This is the mail archive of the
mauve-discuss@sourceware.org
mailing list for the Mauve project.
Re: [cp-patches]: L&F fix
- From: Lillian Angel <langel at redhat dot com>
- To: Roman Kennke <roman at kennke dot org>
- Cc: mauve-discuss at sources dot redhat dot com
- Date: Thu, 22 Sep 2005 13:17:26 -0400
- Subject: Re: [cp-patches]: L&F fix
- References: <1127403142.25403.29.camel@tow.toronto.redhat.com> <1127407082.6513.19.camel@localhost.localdomain>
On Thu, 2005-09-22 at 18:38 +0200, Roman Kennke wrote:
> Hi Lillian,
>
> you have committed the following:
>
> - "Tree.textBackground", new ColorUIResource(new Color(255, 255,
> 255)),
> - "Tree.textForeground", new ColorUIResource(Color.black),
> + "Tree.textBackground", new ColorUIResource(new Color(192, 192,
> 192)),
> + "Tree.textForeground", new ColorUIResource(new Color(0, 0, 0)),
>
> IMO writing new ColorUIResource(Color.BLACK) is slightly more efficient
> than new ColorUIResource(new Color(0, 0, 0)).
>
> Also, have you seen that there is a testcase for
> BasicLookAndFeel.initComponentDefaults(). If these values are not
> already in this testcase, please add them.
No problem.
Attached is the patch. I do not have commit access.
Lillian
Index: gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java,v
retrieving revision 1.3
diff -u -r1.3 initComponentDefaults.java
--- gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java 2 Sep 2005 08:49:36 -0000 1.3
+++ gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java 22 Sep 2005 17:14:36 -0000
@@ -449,7 +449,9 @@
harness.check(defaults.get("Tree.rowHeight"), new Integer(16));
harness.check(defaults.get("Tree.scrollsOnExpand"), Boolean.TRUE);
harness.check(defaults.get("Tree.selectionBorderColor"), new ColorUIResource(0, 0, 0));
-
+ harness.check(defaults.get("Tree.textForeground"), new ColorUIResource(Color.black));
+ harness.check(defaults.get("Tree.textBackground"), new ColorUIResource(new Color(192, 192,192));
+
harness.checkPoint("Viewport");
harness.check(defaults.get("Viewport.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
}
Index: gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java,v
retrieving revision 1.1
diff -u -r1.1 getDefaults.java
--- gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java 9 Sep 2005 13:13:37 -0000 1.1
+++ gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java 22 Sep 2005 17:14:36 -0000
@@ -877,7 +877,7 @@
harness.check(defaults.get("Tree.line"), new ColorUIResource(0, 0, 20));
harness.check(defaults.get("Tree.openIcon") instanceof MetalIconFactory.TreeFolderIcon);
harness.check(defaults.getInt("Tree.rightChildIndent"), 13);
- harness.check(defaults.getInt("Tree.rowHeight"), 0);
+ harness.check(defaults.getInt("Tree.rowHeight"), 16);
harness.check(defaults.get("Tree.scrollsOnExpand"), Boolean.TRUE);
harness.check(defaults.get("Tree.selectionBackground"), new ColorUIResource(0, 0, 28));
harness.check(defaults.get("Tree.selectionBorderColor"), new ColorUIResource(0, 0, 12));