Commit 3db3cb7d authored by falken@chromium.org's avatar falken@chromium.org

Fix resizing behavior of the input method button in the chromeos status bar.

BUG=chromium-os:12188
TEST=manually on netbook

Review URL: http://codereview.chromium.org/6532050

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75366 0039d316-1c4b-4281-b951-d872f2087c98
parent 28bb7926
...@@ -79,8 +79,11 @@ void StatusAreaButton::SetText(const std::wstring& text) { ...@@ -79,8 +79,11 @@ void StatusAreaButton::SetText(const std::wstring& text) {
// TextButtons normally remember the max text size, so the button's preferred // TextButtons normally remember the max text size, so the button's preferred
// size will always be as large as the largest text ever put in it. // size will always be as large as the largest text ever put in it.
// We clear that max text size, so we can adjust the size to fit the text. // We clear that max text size, so we can adjust the size to fit the text.
ClearMaxTextSize(); // The order is important. ClearMaxTextSize sets the size to that of the
// current text, so it must be called after SetText.
views::MenuButton::SetText(text); views::MenuButton::SetText(text);
ClearMaxTextSize();
PreferredSizeChanged();
} }
void StatusAreaButton::DrawIcon(gfx::Canvas* canvas) { void StatusAreaButton::DrawIcon(gfx::Canvas* canvas) {
......
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