Closed Bug 393737 Opened 18 years ago Closed 18 years ago

GTK buttons should have a "default button" style if its the default button

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha8

People

(Reporter: ventnor.bugzilla, Assigned: ventnor.bugzilla)

References

Details

Attachments

(1 file, 1 obsolete file)

Summary: GTK buttons should have a "default button → GTK buttons should have a "default button" style if its the default button
Attached patch Patch (obsolete) — Splinter Review
Whoops, submitted this bug accidentally and too early. On other platforms we support giving default buttons (the button activated when you hit Return, eg. the OK button in dialogs) a special styling. On GTK, there is commented-out code for this, but the code is wrong. We can apply the GTK theme's "default button" style by setting one flag, so I imagine this patch is trivial enough for 1.9.
Assignee: nobody → ventnor.bugzilla
Status: NEW → ASSIGNED
Attachment #278266 - Flags: superreview?(roc)
Attachment #278266 - Flags: review?(roc)
Blocks: 329846
+ if (state->isDefault) + GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_DEFAULT); Could this be unconditional? I'm assuming GTK_WIDGET_UNSET_FLAGS is very cheap.
Would it be cheaper than an if() statement though? I only put it there because I'm not sure whether that macro will cause problems if the flag isn't set anyway.
It doesn't have to be cheaper than an if() statement, it just has to be similar ... then removing one line of code would be a good thing. > I only put it there because I'm not sure whether that macro will cause > problems if the flag isn't set anyway. It won't: #define GTK_WIDGET_UNSET_FLAGS(wid,flag) G_STMT_START{ (GTK_WIDGET_FLAGS (wid) &= ~(flag)); }G_STMT_END
Attached patch Patch 2Splinter Review
Attachment #278266 - Attachment is obsolete: true
Attachment #278382 - Flags: superreview?(roc)
Attachment #278382 - Flags: review?(roc)
Attachment #278266 - Flags: superreview?(roc)
Attachment #278266 - Flags: review?(roc)
Attachment #278382 - Flags: superreview?(roc)
Attachment #278382 - Flags: superreview+
Attachment #278382 - Flags: review?(roc)
Attachment #278382 - Flags: review+
Attachment #278382 - Flags: approval1.9?
Attachment #278382 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
mozilla/widget/src/gtk2/gtk2drawing.c 1.29 mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp 1.102
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: