Closed Bug 195881 Opened 22 years ago Closed 22 years ago

Buttons should not be able to draw as active when they are disabled

Categories

(Core Graveyard :: GFX: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bryner, Assigned: bryner)

Details

Attachments

(1 file, 1 obsolete file)

If you have a disabled button, the current GTK nsITheme implementation will still allow it to draw in the pressed-in state. Steps to reproduce: 1. Switch to classic skin 2. File -> Open File... 3. Don't click on any files, but click the OK button in the filepicker Expected result: the button does not appear to depress, since it's disabled Actual result: the button depresses
Attached patch patch (obsolete) — Splinter Review
This looks rather large, but it encompasses some additional cleanup. I changed the widget state to be a series of flags rather than a struct, and I changed the tab state flags to use the kEnumValue style rather than ENUM_VALUE. The actual _fix_ is in several places where gtkdrawing.c acts on the "active" state flag, it needs to also check the disabled flag. I thought about putting the logic in nsNativeThemeGtk, but decided that the nsNativeThemeGtk code should fill in all the information that it can obtain, and then leave it up to the drawing implementation how to interpret it.
Attachment #116189 - Flags: review?(blizzard)
Should this be in here? Does this break our error handling? - gdk_flush(); + // gdk_flush(); Also, this is going to break the crap out of the patch that I just made in bug 174471 because it adds real ints to the state struct.
Attachment #116189 - Flags: review?(blizzard)
Attachment #116189 - Attachment is obsolete: true
Attachment #123735 - Flags: superreview?(jaggernaut)
Attachment #123735 - Flags: review?(blizzard)
Comment on attachment 123735 [details] [diff] [review] less invasive patch, updated to the trunk sr=jag
Attachment #123735 - Flags: superreview?(jaggernaut) → superreview+
Comment on attachment 123735 [details] [diff] [review] less invasive patch, updated to the trunk r=blizzard
Attachment #123735 - Flags: review?(blizzard) → review+
Attachment #123735 - Flags: approval1.4?
Comment on attachment 123735 [details] [diff] [review] less invasive patch, updated to the trunk a=sspitzer,asa
Attachment #123735 - Flags: approval1.4? → approval1.4+
checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: