chrome/browser/chromeos/input_method/candidate_window_view.cc
// Wraps the shortcut label, then decorates wrapped shortcut label
// and returns it (never returns NULL).
// The label text is not set in this function.
Wraps the shortcut label, then decorates wrapped shortcut label
and returns it (never returns NULL).
The label text is not set in this function.
Wraps the shortcut label then decorates wrapped shortcut label and returns it ( never returns NULL ) . The label text is not set in this function .
views::View* CreateWrappedShortcutLabel(
    views::Label* shortcut_label,
    InputMethodLookupTable::Orientation orientation) {
  const gfx::Insets kVerticalShortcutLabelInsets(1, 6, 1, 6);
  const gfx::Insets kHorizontalShortcutLabelInsets(1, 3, 1, 0);
  const gfx::Insets insets =
      (orientation == InputMethodLookupTable::kVertical ?
       kVerticalShortcutLabelInsets :
       kHorizontalShortcutLabelInsets);
  views::View* wrapped_shortcut_label =
      WrapWithPadding(shortcut_label, insets);
  if (orientation == InputMethodLookupTable::kVertical) {
    wrapped_shortcut_label->set_background(
        views::Background::CreateSolidBackground(
            kShortcutBackgroundColor));
    shortcut_label->SetBackgroundColor(
        wrapped_shortcut_label->background()->get_color());
  }
  return wrapped_shortcut_label;
}
views :: View * CreateWrappedShortcutLabel ( views :: Label * shortcut_label , InputMethodLookupTable :: Orientation orientation ) { const gfx :: Insets kVerticalShortcutLabelInsets ( 1 , 6 , 1 , 6 ) ; const gfx :: Insets kHorizontalShortcutLabelInsets ( 1 , 3 , 1 , 0 ) ; const gfx :: Insets insets = ( orientation == InputMethodLookupTable :: kVertical ? kVerticalShortcutLabelInsets : kHorizontalShortcutLabelInsets ) ; views :: View * wrapped_shortcut_label = WrapWithPadding ( shortcut_label , insets ) ; if ( orientation == InputMethodLookupTable :: kVertical ) { wrapped_shortcut_label -> set_background ( views :: Background :: CreateSolidBackground ( kShortcutBackgroundColor ) ) ; shortcut_label -> SetBackgroundColor ( wrapped_shortcut_label -> background ( ) -> get_color ( ) ) ; } return wrapped_shortcut_label ; }
Wraps the shortcut label, then decorates wrapped shortcut label
and returns it (never returns NULL).
Wraps the shortcut label then decorates wrapped shortcut label and returns it ( never returns NULL ) .
// Wrap it with padding. // Add decoration based on the orientation. // Set the background color.