]> khamidou — GitHub mirrors - electron.git/commitdiff
win: Use system's menu bar color.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 25 Jul 2014 07:20:25 +0000 (15:20 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 25 Jul 2014 07:20:25 +0000 (15:20 +0800)
atom/browser/ui/views/menu_bar.cc

index 5d0e552198ce38a29c71d52dbc4e703edc941065..df66e4edf1a035f4c54c4fc55f1bef1cfc4212a1 100644 (file)
 #include "ui/views/controls/button/menu_button.h"
 #include "ui/views/layout/box_layout.h"
 
+#if defined(OS_WIN)
+#include "ui/gfx/color_utils.h"
+#endif
+
 namespace atom {
 
 namespace {
@@ -32,7 +36,13 @@ base::string16 FilterMenuButtonLabel(const base::string16& label) {
 
 MenuBar::MenuBar()
     : menu_model_(NULL) {
-  set_background(views::Background::CreateSolidBackground(kDefaultColor));
+#if defined(OS_WIN)
+  SkColor background_color = color_utils::GetSysSkColor(COLOR_MENUBAR);
+#else
+  SkColor background_color = kDefaultColor;
+#endif
+  set_background(views::Background::CreateSolidBackground(background_color));
+
   SetLayoutManager(new views::BoxLayout(
       views::BoxLayout::kHorizontal, 0, 0, 0));
 }