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

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

Issue 132023010: linux_aura: Fixes a couple of issues with the button border integration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constant and braces Created 6 years, 11 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 | « no previous file | chrome/browser/ui/libgtk2ui/gtk2_border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/gtk2_border.h
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_border.h b/chrome/browser/ui/libgtk2ui/gtk2_border.h
index 0dde0ddfa02505b9e734bff91574ce2880bb8142..d785480847eb33cc3f82be9f87863a1501416382 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_border.h
+++ b/chrome/browser/ui/libgtk2ui/gtk2_border.h
@@ -6,14 +6,17 @@
#define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_BORDER_H_
#include "ui/gfx/image/image_skia.h"
+#include "ui/native_theme/native_theme.h"
#include "ui/views/border.h"
+#include "ui/views/controls/button/button.h"
namespace gfx {
class Canvas;
}
namespace views {
-class CustomButton;
+class LabelButton;
+class Border;
}
namespace libgtk2ui {
@@ -23,7 +26,7 @@ class Gtk2UI;
class Gtk2Border : public views::Border {
public:
Gtk2Border(Gtk2UI* gtk2_ui,
- views::CustomButton* owning_button,
+ views::LabelButton* owning_button,
scoped_ptr<views::Border> border);
virtual ~Gtk2Border();
@@ -37,15 +40,21 @@ class Gtk2Border : public views::Border {
virtual gfx::Size GetMinimumSize() const OVERRIDE;
private:
+ void PaintState(const ui::NativeTheme::State state,
+ const ui::NativeTheme::ExtraParams& extra,
+ const gfx::Rect& rect,
+ gfx::Canvas* canvas);
+
+ bool ShouldDrawBorder(bool focused, views::Button::ButtonState state);
+
Gtk2UI* gtk2_ui_;
bool use_gtk_;
- gfx::ImageSkia hovered_;
- gfx::ImageSkia pressed_;
+ gfx::ImageSkia button_images_[2][views::Button::STATE_COUNT];
// The view to which we are a border. We keep track of this so that we can
// force invalidate the layout on theme changes.
- views::CustomButton* owning_button_;
+ views::LabelButton* owning_button_;
// Since we don't want to expose the concept of whether we're using a GTK
// theme down to the cross platform views layer, we keep a normal Border and
« no previous file with comments | « no previous file | chrome/browser/ui/libgtk2ui/gtk2_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698