Closed
Bug 1138359
Opened 10 years ago
Closed 9 years ago
Cocoa native theme code needs to consider writing mode for padding of button contents
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
4.89 KB,
patch
|
smontagu
:
review+
|
Details | Diff | Splinter Review |
On OS X, a button such as <button>Click Me</button> gets padding at the beginning and end of the text, thanks to margins returned by nsNativeThemeCocoa::GetWidgetBorder. However, with a vertical writing-mode button <button style="writing-mode:vertical-lr">Click Me</button> the padding gets applied "over" and "under" the text rather than at the start and end, because it is still specified in physical terms as going on the left and right. To fix this, we need to make the nsNativeThemeCocoa pay attention to the writing mode (not only to LTR/RTL directionality, which it already considers in certain cases) and remap the padding accordingly.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8571270 -
Flags: review?(smontagu)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
Note that while this fixes the margins of the button contents (and hence the sizing of the button itself), it doesn't address the fact that vertical writing-mode buttons still don't get the nice rounded corners that we expect on horizontal ones. That's because we automatically switch to rectangular buttons above a height of 26px (see DO_SQUARE_BUTTON_HEIGHT in nsNativeThemeCocoa.mm), as the rounded buttons look bad at larger heights.
Updated•9 years ago
|
Attachment #8571270 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 3•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/05dc91957f46
Comment 4•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/05dc91957f46
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•