Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1367)

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 243703009: Linux Aura: Use appropriate button style depending on aura/gtk NativeTheme (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updat Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_border.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
index e09d73fc786e809c0cd97e7c141e8472e83be249..62c396e63606ef257f3a6ccb9f2f92657fec9ab6 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -43,6 +43,7 @@
#include "ui/gfx/size.h"
#include "ui/gfx/skbitmap_operations.h"
#include "ui/gfx/skia_util.h"
+#include "ui/views/controls/button/label_button.h"
#include "ui/views/linux_ui/window_button_order_observer.h"
#if defined(USE_GCONF)
@@ -545,8 +546,10 @@ gfx::Image Gtk2UI::GetIconForContentType(
scoped_ptr<views::Border> Gtk2UI::CreateNativeBorder(
views::LabelButton* owning_button,
scoped_ptr<views::Border> border) {
- return scoped_ptr<views::Border>(
- new Gtk2Border(this, owning_button, border.Pass()));
+ if (owning_button->GetNativeTheme() != NativeThemeGtk2::instance())
+ return border.Pass();
+
+ return scoped_ptr<views::Border>(new Gtk2Border(this, owning_button));
}
void Gtk2UI::AddWindowButtonOrderObserver(
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_border.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698