From d9d1d03d4d159f8755fb4b695a75518601d0e962 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 1 Sep 2014 20:22:38 +0800 Subject: [PATCH] linux: Dont' use native style border. --- atom/browser/ui/views/submenu_button.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/atom/browser/ui/views/submenu_button.cc b/atom/browser/ui/views/submenu_button.cc index 5049ffb0f487..e0a7eee00df9 100644 --- a/atom/browser/ui/views/submenu_button.cc +++ b/atom/browser/ui/views/submenu_button.cc @@ -8,6 +8,7 @@ #include "base/strings/utf_string_conversions.h" #include "ui/gfx/canvas.h" #include "ui/gfx/text_utils.h" +#include "ui/views/controls/button/label_button_border.h" namespace atom { @@ -34,7 +35,11 @@ SubmenuButton::SubmenuButton(views::ButtonListener* listener, text_width_(0), text_height_(0), underline_color_(SK_ColorBLACK) { - SetStyle(views::Button::STYLE_TEXTBUTTON); +#if defined(OS_LINUX) + // Dont' use native style border. + SetBorder(CreateDefaultBorder().PassAs()); +#endif + if (GetUnderlinePosition(title, &accelerator_, &underline_start_, &underline_end_)) gfx::Canvas::SizeStringInt(GetText(), GetFontList(), &text_width_,