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

Unified Diff: chrome/browser/ui/panels/panel_browser_titlebar_gtk.h

Issue 10180011: Support painting panels with chromium themes on GTK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 8 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/panels/panel_browser_titlebar_gtk.h
diff --git a/chrome/browser/ui/panels/panel_browser_titlebar_gtk.h b/chrome/browser/ui/panels/panel_browser_titlebar_gtk.h
index fe5772f65d1121879b1410c4b6dcb885bbf5c0f6..feaa72577b6d1a86d9a310ff2479ece5581ab341 100644
--- a/chrome/browser/ui/panels/panel_browser_titlebar_gtk.h
+++ b/chrome/browser/ui/panels/panel_browser_titlebar_gtk.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_TITLEBAR_GTK_H_
#include "chrome/browser/ui/gtk/browser_titlebar.h"
+#include "ui/gfx/skia_util.h"
class PanelBrowserWindowGtk;
@@ -17,6 +18,23 @@ class PanelBrowserTitlebarGtk : public BrowserTitlebar {
void UpdateMinimizeRestoreButtonVisibility();
+ // When a panel appears in the same position as the one of the panel being
+ // closed and the cursor stays in the close button, the close button appears
+ // not to be clickable. This is because neither "enter-notify-event" nor
+ // "clicked" event for the new panel gets fired if the mouse does not move.
+ // This creates a bad experience when a user has multiple panels of the same
+ // size (which is typical) and tries closing them all by repeatedly clicking
+ // in the same place on the screen.
+ //
+ // Opened a gtk bug for this -
+ // https://bugzilla.gnome.org/show_bug.cgi?id=667841
+ void SendEnterNotifyToCloseButtonIfUnderMouse();
+
+ // Overridden from BrowserTitlebar:
+ virtual void UpdateButtonBackground(CustomDrawButton* button) OVERRIDE;
+ virtual void UpdateTitleAndIcon() OVERRIDE;
+ virtual void UpdateTextColor() OVERRIDE;
+
protected:
// Overridden from BrowserTitlebar:
virtual bool BuildButton(const std::string& button_token,
@@ -38,6 +56,8 @@ class PanelBrowserTitlebarGtk : public BrowserTitlebar {
return unminimize_button_.get();
}
+ SkColor GetTextColor() const;
+
PanelBrowserWindowGtk* browser_window_;
// All other buttons, including close and minimize buttons, are defined in
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_frame_view.cc ('k') | chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698