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

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 150078: GTK custom frame: Don't show the border when maximized. Enlarge the close but... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: now with bidi support Created 11 years, 6 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/gtk/browser_titlebar.cc ('k') | chrome/browser/gtk/custom_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_window_gtk.cc
===================================================================
--- chrome/browser/gtk/browser_window_gtk.cc (revision 19526)
+++ chrome/browser/gtk/browser_window_gtk.cc (working copy)
@@ -415,7 +415,6 @@
}
// Draw the default background.
- // TODO(tc): Handle maximized windows.
cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(widget->window));
cairo_rectangle(cr, event->area.x, event->area.y, event->area.width,
event->area.height);
@@ -432,7 +431,7 @@
// canvas->DrawBitmapInt(*theme_overlay, 0, 0);
// }
- if (window->use_custom_frame_.GetValue()) {
+ if (window->use_custom_frame_.GetValue() && !window->IsMaximized()) {
if (!custom_frame_border) {
custom_frame_border = new NineBox(
theme_provider,
@@ -1068,9 +1067,12 @@
gdk_region_union_with_rect(mask, &bot_rect);
gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, mask, 0, 0);
gdk_region_destroy(mask);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 1,
+ kFrameBorderThickness, kFrameBorderThickness, kFrameBorderThickness);
} else {
// Disable rounded corners.
gdk_window_shape_combine_region(GTK_WIDGET(window_)->window, NULL, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 0, 0, 0, 0);
}
}
@@ -1095,12 +1097,6 @@
gtk_window_set_decorated(window_, !enable);
titlebar_->UpdateCustomFrame(enable);
UpdateWindowShape(bounds_.width(), bounds_.height());
- if (enable) {
- gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 1,
- kFrameBorderThickness, kFrameBorderThickness, kFrameBorderThickness);
- } else {
- gtk_alignment_set_padding(GTK_ALIGNMENT(window_container_), 0, 0, 0, 0);
- }
}
void BrowserWindowGtk::SaveWindowPosition() {
« no previous file with comments | « chrome/browser/gtk/browser_titlebar.cc ('k') | chrome/browser/gtk/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698