JDK-6462825 : GTK L&F: ToggleButton not painted properly for selected/mouseover state
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: generic
  • Submitted: 2006-08-23
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b03Fixed
Related Reports
Relates :  
Description
JToggleButtons under the GTK L&F in the selected state are not rendered like native
GtkToggleButtons when the mouse is hovered over.  This is especially noticeable under
the clearlooks/ubuntulooks engines, which treat this case specially.

This issue was first mentioned in umbrella bug 6417110.

Comments
EVALUATION We already correctly set the GTK state to PRELIGHT when the mouse is over the ToggleButton. However, we also need to set the GtkToggleButton->active field to true when the button is selected, and false when it is not selected. We already do this for CheckBoxes and RadioButtons, so we just need to add similar code to the native gtk2_paint_box() method like so: case TOGGLE_BUTTON: ((GtkToggleButton*)gtk2_widget)->active = ((synth_state & SELECTED) != 0); With this fix in place, we now match native behavior exactly.
23-08-2006