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

Unified Diff: chrome/browser/ui/gtk/browser_titlebar.cc

Issue 6903017: GTK: Add download notifications to the unity dock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: evnam comments Created 9 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/download/download_util.cc ('k') | chrome/browser/ui/gtk/browser_window_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/browser_titlebar.cc
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index 1ff3df9f131c74d4ec4dfc822a443200d3bfe162..96807364101e934703482eb91f11079c991a8310 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.cc
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc
@@ -30,6 +30,7 @@
#include "chrome/browser/ui/gtk/menu_gtk.h"
#include "chrome/browser/ui/gtk/nine_box.h"
#include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h"
+#include "chrome/browser/ui/gtk/unity_service.h"
#include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
#include "chrome/browser/ui/toolbar/wrench_menu_model.h"
#include "chrome/common/pref_names.h"
@@ -523,16 +524,17 @@ CustomDrawButton* BrowserTitlebar::BuildTitlebarButton(int image,
void BrowserTitlebar::UpdateCustomFrame(bool use_custom_frame) {
using_custom_frame_ = use_custom_frame;
- if (use_custom_frame) {
+ if (!use_custom_frame ||
+ (browser_window_->IsMaximized() && unity::IsRunning())) {
if (titlebar_left_buttons_vbox_)
- gtk_widget_show_all(titlebar_left_buttons_vbox_);
+ gtk_widget_hide(titlebar_left_buttons_vbox_);
if (titlebar_right_buttons_vbox_)
- gtk_widget_show_all(titlebar_right_buttons_vbox_);
+ gtk_widget_hide(titlebar_right_buttons_vbox_);
} else {
if (titlebar_left_buttons_vbox_)
- gtk_widget_hide(titlebar_left_buttons_vbox_);
+ gtk_widget_show_all(titlebar_left_buttons_vbox_);
if (titlebar_right_buttons_vbox_)
- gtk_widget_hide(titlebar_right_buttons_vbox_);
+ gtk_widget_show_all(titlebar_right_buttons_vbox_);
}
UpdateTitlebarAlignment();
UpdateMaximizeRestoreVisibility();
@@ -607,7 +609,8 @@ void BrowserTitlebar::UpdateTitlebarAlignment() {
top_padding = kTitlebarHeight;
} else if (using_custom_frame_ && browser_window_->IsMaximized()) {
vertical_offset = 0;
- side_padding = kMaximizedTabstripPadding;
+ if (!unity::IsRunning())
+ side_padding = kMaximizedTabstripPadding;
}
}
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/ui/gtk/browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698