Commit 4ba4f927 authored by shrike's avatar shrike Committed by Commit bot

Fix text wrapping problem in the download_item_controller on Yosemite.

The code in [DownloadItemController showDangerousWarning:] calls
[GTMUILocalizerAndLayoutTweaker sizeToFitFixedHeightTextField:minWidth:]
to wrap the warning string within the DownloadItemController's
dangerousDownloadLabel_ textField. Within the nib this textField is 22
points tall and holds two lines of text. Under Yosemite, however, the
font metrics have changed and the two lines are now 24 points tall.

This cl insets the dangerousDownloadLabel_'s frame height by -2 points
when running on Yosemite. dangerousDownloadLabel_ is not as tall as its
superview, so the new frame still fits comfortably within the superview's
frame.

BUG=454782
TEST=Follow instructions in bug 454782 and confirm that text is wrapping
properly on Yosemite.

Review URL: https://codereview.chromium.org/911303002

Cr-Commit-Position: refs/heads/master@{#318927}
parent d2e45539
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<object class="NSTextField" id="146169749"> <object class="NSTextField" id="146169749">
<reference key="NSNextResponder" ref="325658281"/> <reference key="NSNextResponder" ref="325658281"/>
<int key="NSvFlags">290</int> <int key="NSvFlags">290</int>
<string key="NSFrame">{{36, 8}, {261, 22}}</string> <string key="NSFrame">{{36, 7}, {261, 24}}</string>
<reference key="NSSuperview" ref="325658281"/> <reference key="NSSuperview" ref="325658281"/>
<reference key="NSWindow"/> <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="411206214"/> <reference key="NSNextKeyView" ref="411206214"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment