-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
5.0
-
Cause Known
-
x86
-
linux
###@###.### 2004-07-22
There is a bug with GTK L&F and custom combo box renderers.
To create a subclass of DefaultComboBoxRenderer, and set it as the
custom cell renderer of a combo box, the background color of the combo
box is not its usual color; it instead has the same color background as
its parent.
###@###.### 10/19/04 17:04 GMT
My previous evaluation is wrong, this problem still exists.
Run the test case and notice the background color of the 2nd combobox is wrong. If you show the popup (with 1.5) the colors in the list are correct. This is happening because native GTK uses different colors for the different states, and as BasicComboBoxRenderer doesn't have a way to express the different states you get the wrong color.
One way to fix this is to add background/foreground colors for when the popup is not shown and have GTK populate these correctly. That way the colors would match when you create a BasicComboBoxRenderer.
Additionally we should look into changing the renderering for comboboxs such that the border part of the label is painted by the combobox itself, not the renderer. This would make plugging in custom renderers a bit easier.
###@###.### 10/19/04 18:44 GMT
There is a bug with GTK L&F and custom combo box renderers.
To create a subclass of DefaultComboBoxRenderer, and set it as the
custom cell renderer of a combo box, the background color of the combo
box is not its usual color; it instead has the same color background as
its parent.
###@###.### 10/19/04 17:04 GMT
My previous evaluation is wrong, this problem still exists.
Run the test case and notice the background color of the 2nd combobox is wrong. If you show the popup (with 1.5) the colors in the list are correct. This is happening because native GTK uses different colors for the different states, and as BasicComboBoxRenderer doesn't have a way to express the different states you get the wrong color.
One way to fix this is to add background/foreground colors for when the popup is not shown and have GTK populate these correctly. That way the colors would match when you create a BasicComboBoxRenderer.
Additionally we should look into changing the renderering for comboboxs such that the border part of the label is painted by the combobox itself, not the renderer. This would make plugging in custom renderers a bit easier.
###@###.### 10/19/04 18:44 GMT
- relates to
-
JDK-5087935 Reg: Changing LAF at Runtime displays class name in Filter of JFileChooser - GTK
-
- Closed
-