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

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

Issue 10260028: Update Panel mininimize/restore button on strip and expansion state change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback changes 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
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_frame_view.cc ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc
diff --git a/chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc b/chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc
index 04231a5c9ff783f1bee3e7a043c44670def22429..bad34c68c242102ad5106e5a98d0924c3a75a1a2 100644
--- a/chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc
@@ -97,11 +97,18 @@ bool PanelBrowserTitlebarGtk::BuildButton(const std::string& button_token,
if (button_token != "close" && button_token != "minimize")
return false;
- // Create unminimze button in order to show it to expand the minimized panel.
- if (button_token == "minimize")
+ if (!BrowserTitlebar::BuildButton(button_token, left_side))
+ return false;
+
+ if (button_token == "minimize") {
+ // Create unminimze button, used to expand the minimized panel.
unminimize_button_.reset(CreateTitlebarButton("unminimize", left_side));
- return BrowserTitlebar::BuildButton(button_token, left_side);
+ // We control visibility of minimize and unminimize buttons.
+ gtk_widget_set_no_show_all(minimize_button()->widget(), TRUE);
+ gtk_widget_set_no_show_all(unminimize_button_->widget(), TRUE);
+ }
+ return true;
}
void PanelBrowserTitlebarGtk::GetButtonResources(const std::string& button_name,
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_frame_view.cc ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698