| Index: ui/views/controls/combobox/combobox.cc
|
| diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
|
| index a2afe7004be8b490512e075c59115c2fd00feaf7..6aa6e007c6f47cf29dacffc06e5379dee51df868 100644
|
| --- a/ui/views/controls/combobox/combobox.cc
|
| +++ b/ui/views/controls/combobox/combobox.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "ui/views/controls/combobox/combobox.h"
|
|
|
| +#include <cmath>
|
| +
|
| #include "base/logging.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "grit/ui_resources.h"
|
| @@ -334,7 +336,7 @@ void Combobox::OnModelChanged() {
|
| }
|
|
|
| void Combobox::UpdateFromModel() {
|
| - int max_width = 0;
|
| + float max_width = 0;
|
| const gfx::Font& font = Combobox::GetFont();
|
|
|
| MenuItemView* menu = new MenuItemView(this);
|
| @@ -358,7 +360,7 @@ void Combobox::UpdateFromModel() {
|
| max_width = std::max(max_width, font.GetStringWidth(text));
|
| }
|
|
|
| - content_size_.SetSize(max_width, font.GetHeight());
|
| + content_size_.SetSize(std::ceil(max_width), font.GetHeight());
|
| }
|
|
|
| void Combobox::AdjustBoundsForRTLUI(gfx::Rect* rect) const {
|
|
|