| Index: ui/aura_shell/shell_tooltip_manager.cc
|
| diff --git a/ui/aura_shell/shell_tooltip_manager.cc b/ui/aura_shell/shell_tooltip_manager.cc
|
| index 0544ca8c4f65105b5aa8ddc915129ccb005170f7..a8d6cf920fc7d3a68f3ef6b8e87893e46f2c9fcc 100644
|
| --- a/ui/aura_shell/shell_tooltip_manager.cc
|
| +++ b/ui/aura_shell/shell_tooltip_manager.cc
|
| @@ -29,6 +29,8 @@ namespace {
|
| SkColor kTooltipBackground = 0xFFFFFFCC;
|
| SkColor kTooltipBorder = 0xFF000000;
|
| int kTooltipBorderWidth = 1;
|
| +int kTooltipHorizontalPadding = 3;
|
| +int kTooltipVerticalPadding = 1;
|
| int kTooltipTimeoutMs = 500;
|
|
|
| // FIXME: get cursor offset from actual cursor size.
|
| @@ -126,8 +128,9 @@ class ShellTooltipManager::Tooltip {
|
| location.x(), location.y());
|
| label_.SetText(tooltip_text);
|
|
|
| - SetTooltipBounds(location, max_width + 2 * kTooltipBorderWidth,
|
| - label_.GetPreferredSize().height());
|
| + SetTooltipBounds(location,
|
| + max_width + 2 * kTooltipBorderWidth + 2 * kTooltipHorizontalPadding,
|
| + label_.GetPreferredSize().height() + 2 * kTooltipVerticalPadding);
|
| }
|
|
|
| // Shows the tooltip.
|
| @@ -278,4 +281,10 @@ int TooltipClient::GetMaxWidth(int x, int y) {
|
| return (monitor_bounds.width() + 1) / 2;
|
| }
|
|
|
| +// static
|
| +void TooltipClient::UpdateTooltip(Window* target) {
|
| + if (aura_shell::Shell::GetInstance()->tooltip_manager())
|
| + aura_shell::Shell::GetInstance()->tooltip_manager()->UpdateTooltip(target);
|
| +}
|
| +
|
| } // namespace aura
|
|
|