[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: BasicComboBoxUI defaults
From: |
David Gilbert |
Subject: |
[cp-patches] FYI: BasicComboBoxUI defaults |
Date: |
Sun, 18 Sep 2005 19:19:09 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050728) |
I committed this patch - the list in the combo box can just use the default
colors:
2005-09-18 David Gilbert <address@hidden>
* javax/swing/plaf/basic/BasicComboBoxUI.java
(installComponents): remove listBox color settings,
* javax/swing/plaf/basic/BasicLookAndFeel.java
(initComponentDefaults): corrected ComboBox and ListBox defaults.
Regards,
Dave
Index: javax/swing/plaf/basic/BasicComboBoxUI.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,v
retrieving revision 1.16
diff -u -r1.16 BasicComboBoxUI.java
--- javax/swing/plaf/basic/BasicComboBoxUI.java 18 Sep 2005 15:27:20 -0000
1.16
+++ javax/swing/plaf/basic/BasicComboBoxUI.java 18 Sep 2005 18:08:58 -0000
@@ -459,14 +459,6 @@
// in order to determine the right colors when rendering
listBox = new JList();
- Color background = arrowButton.getBackground();
- listBox.setBackground(background);
- listBox.setSelectionBackground(background.darker());
-
- Color foreground = arrowButton.getForeground();
- listBox.setForeground(foreground);
- listBox.setSelectionForeground(foreground);
-
// set editor and renderer for the combo box. Editor is used
// only if combo box becomes editable, otherwise renderer is used
// to paint the selected item; combobox is not editable by default.
Index: javax/swing/plaf/basic/BasicLookAndFeel.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v
retrieving revision 1.54
diff -u -r1.54 BasicLookAndFeel.java
--- javax/swing/plaf/basic/BasicLookAndFeel.java 9 Sep 2005 05:13:56
-0000 1.54
+++ javax/swing/plaf/basic/BasicLookAndFeel.java 18 Sep 2005 18:09:01
-0000
@@ -362,7 +362,7 @@
"HOME", "homePassThrough",
"END", "endPassThrough"
}),
- "ComboBox.background", new ColorUIResource(light),
+ "ComboBox.background", new ColorUIResource(Color.white),
"ComboBox.buttonBackground", new ColorUIResource(light),
"ComboBox.buttonDarkShadow", new ColorUIResource(shadow),
"ComboBox.buttonHighlight", new ColorUIResource(highLight),
@@ -371,7 +371,7 @@
"ComboBox.disabledForeground", new ColorUIResource(Color.gray),
"ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
"ComboBox.foreground", new ColorUIResource(Color.black),
- "ComboBox.selectionBackground", new ColorUIResource(Color.black),
+ "ComboBox.selectionBackground", new ColorUIResource(0, 0, 128),
"ComboBox.selectionForeground", new ColorUIResource(Color.white),
"Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
"KP_LEFT", "left",
@@ -528,7 +528,7 @@
"Label.disabledShadow", new ColorUIResource(shadow),
"Label.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Label.foreground", new ColorUIResource(darkShadow),
- "List.background", new ColorUIResource(light),
+ "List.background", new ColorUIResource(Color.white),
"List.border", new BasicBorders.MarginBorder(),
"List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"PAGE_UP", "scrollUp",
@@ -550,8 +550,8 @@
"shift PAGE_UP","scrollUpExtendSelection",
"KP_DOWN", "selectNextRow"
}),
- "List.foreground", new ColorUIResource(darkShadow),
- "List.selectionBackground", new ColorUIResource(Color.black),
+ "List.foreground", new ColorUIResource(Color.black),
+ "List.selectionBackground", new ColorUIResource(0, 0, 128),
"List.selectionForeground", new ColorUIResource(Color.white),
"List.focusCellHighlightBorder",
new BorderUIResource.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: BasicComboBoxUI defaults,
David Gilbert <=