Closed
Bug 381639
Opened 17 years ago
Closed 17 years ago
[Mac] Aqua <button> text should not move when button is :active
Categories
(Core :: Widget: Cocoa, defect, P4)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: jaas)
References
()
Details
(Keywords: testcase)
Attachments
(4 files, 1 obsolete file)
19.00 KB,
image/png
|
Details | |
18.72 KB,
image/png
|
Details | |
15.87 KB,
image/png
|
Details | |
1.67 KB,
patch
|
cbarrett
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Steps to reproduce: 1. Load data:text/html,<button>foo</button> 2. Hold the mouse down on the button. Result: "foo" moves right a pixel. Expected: "foo" should not move, for consistency with Aqua widgets in other Mac apps.
Comment 1•17 years ago
|
||
I think this is closely related to bug 375436
Comment 2•17 years ago
|
||
Comment 3•17 years ago
|
||
Comment 4•17 years ago
|
||
Comment 5•17 years ago
|
||
This can actually be fixed by modifying the forms.css file. I was going to post this in a new bug but this can be fixed at the same time so may as well piggyback here. The padding for buttons in forms.css is set to 0px 6px 0px 6px for the normal state and 0px 5px 0px 7px for the clicked (active:hover) state. The difference is why it's shifting a pixel. It's also set too large (which was going to be the bug I filed), IMO. If you set it to 0px 2px 0px 2px then it more closely matches the output you get with Safari (though the button shape is a bit different and Firefox adds the focus thing which is cut off, but whatever) which fixes the case where the buttons are too large and they spill over onto a new line in a form. I'll attach some screenshots that show the unpatched, patched and Safari views.
Comment 5 also sounds a bit like the issue in bug 382147.
Is the css change in comment 5 the correct way to fix this bug, or should it really be fixed in widget/native theme code?
It should be fixed in native theme code -- buttons should override the padding in GetWidgetPadding. Unthemed buttons are supposed to move when clicked.
We probably want something like this, but I haven't messed with it enough to fully endorse this and request review.
Assignee | ||
Comment 10•17 years ago
|
||
Attachment #288445 -
Attachment is obsolete: true
Attachment #288959 -
Flags: review?(cbarrett)
Comment 11•17 years ago
|
||
Comment on attachment 288959 [details] [diff] [review] fix v1.1 Update the comment in GetWidgetBorder and add one in GetWidgetPadding explaining why we're doing the override. r=cbarrett with that.
Attachment #288959 -
Flags: review?(cbarrett) → review+
Attachment #288959 -
Flags: superreview?(roc)
Attachment #288959 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 12•17 years ago
|
||
landed on trunk
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•