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

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

Issue 239093007: Update Windows UI on system color changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make Widget the observer, address additional comments. 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
Index: chrome/browser/ui/libgtk2ui/gtk2_border.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_border.cc b/chrome/browser/ui/libgtk2ui/gtk2_border.cc
index eefa5a49c7c227fedb6d6d56e240f56724b7f253..4a8004e9169069e8fa170bcda43b429623dfc310 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_border.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_border.cc
@@ -7,6 +7,7 @@
#include <gtk/gtk.h>
#include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
+#include "chrome/browser/ui/libgtk2ui/native_theme_gtk2.h"
#include "third_party/skia/include/effects/SkLerpXfermode.h"
#include "ui/base/theme_provider.h"
#include "ui/gfx/animation/animation.h"
@@ -76,11 +77,11 @@ Gtk2Border::Gtk2Border(Gtk2UI* gtk2_ui,
: gtk2_ui_(gtk2_ui),
owning_button_(owning_button),
border_(border.Pass()) {
- gtk2_ui_->AddNativeThemeChangeObserver(this);
+ NativeThemeGtk2::instance()->AddObserver(this);
Evan Stade 2014/04/24 01:14:52 nit: ScopedObserver
msw 2014/04/24 18:32:00 Done.
}
Gtk2Border::~Gtk2Border() {
- gtk2_ui_->RemoveNativeThemeChangeObserver(this);
+ NativeThemeGtk2::instance()->RemoveObserver(this);
}
void Gtk2Border::Paint(const views::View& view, gfx::Canvas* canvas) {
@@ -144,7 +145,7 @@ gfx::Size Gtk2Border::GetMinimumSize() const {
return gfx::Size(insets.width(), insets.height());
}
-void Gtk2Border::OnNativeThemeChanged() {
+void Gtk2Border::OnNativeThemeUpdate() {
for (int i = 0; i < kNumberOfFocusedStates; ++i) {
for (int j = 0; j < views::Button::STATE_COUNT; ++j) {
button_images_[i][j] = gfx::ImageSkia();

Powered by Google App Engine
This is Rietveld 408576698