Closed
Bug 501104
Opened 16 years ago
Closed 16 years ago
Our handling of default button borders doesn't match GTK
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: ventnor.bugzilla, Assigned: ventnor.bugzilla)
References
Details
Attachments
(1 file)
11.99 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
The patch fixes 2 things:
1. We calculate the overflow rect for all buttons to include the default overflow. This could potentially cause a lot of unnecessary work, and I now know that GetWidgetOverflow is called every time, not just once for each widget type.
2. We don't calculate the default border correctly. There is actually a second property we need to read that GTK uses called "default-border", rather than just "default-outside-border".
GTK's button size allocation includes default-outside-border (if any), but it paints the default border then insets by default-border, not default-outside-border. So what we do is outset by default-outside-border, paint the default border, then inset by default-border. This makes us match GTK in the end, and also fixes themes that have their default border inside the button (they expect the default button itself to be slightly smaller, as is what GTK does). Such themes include the High Contrast theme.
I did have to move moz_gtk_button_paint, but the only changes are within the if(state->isDefault).
If all that was too much to comprehend, just get this: what we were doing before was wrong. This is right :-)
Attachment #385726 -
Flags: superreview?(roc)
Attachment #385726 -
Flags: review?(roc)
Attachment #385726 -
Flags: superreview?(roc)
Attachment #385726 -
Flags: superreview+
Attachment #385726 -
Flags: review?(roc)
Attachment #385726 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Keywords: 4xp
Updated•15 years ago
|
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•