Created attachment 385726 [details] [diff] [review] Patch 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 :-)
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Keywords: checkin-needed → 4xp
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.