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

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

Issue 160281: Move the tabs to the right one pixel so our tab placement (Closed)
Patch Set: offset the whole tabstrip Created 11 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_titlebar.cc
diff --git a/chrome/browser/gtk/browser_titlebar.cc b/chrome/browser/gtk/browser_titlebar.cc
index c745b1c393604d55c90ba2b8f81e7c703ac67acd..16b7e92dd8f90054d98827226fcc22b4ad0b7e3a 100644
--- a/chrome/browser/gtk/browser_titlebar.cc
+++ b/chrome/browser/gtk/browser_titlebar.cc
@@ -49,6 +49,11 @@ const int kOTRSideSpacing = 2;
// titlebar is showing.
const int kFrameBorderThickness = 4;
+// The left padding of the tab strip. In Views, the tab strip has a left
+// margin of FrameBorderThickness + kClientEdgeThickness. This offset is to
+// account for kClientEdgeThickness.
+const int kTabStripLeftPadding = 1;
+
gboolean OnMouseMoveEvent(GtkWidget* widget, GdkEventMotion* event,
BrowserWindowGtk* browser_window) {
// Reset to the default mouse cursor.
@@ -178,9 +183,10 @@ void BrowserTitlebar::UpdateCustomFrame(bool use_custom_frame) {
void BrowserTitlebar::UpdateTitlebarAlignment() {
if (using_custom_frame_ && !browser_window_->IsMaximized()) {
gtk_alignment_set_padding(GTK_ALIGNMENT(titlebar_alignment_),
- kTitlebarHeight, 0, 0, 0);
+ kTitlebarHeight, 0, kTabStripLeftPadding, 0);
} else {
- gtk_alignment_set_padding(GTK_ALIGNMENT(titlebar_alignment_), 0, 0, 0, 0);
+ gtk_alignment_set_padding(GTK_ALIGNMENT(titlebar_alignment_), 0, 0,
+ kTabStripLeftPadding, 0);
}
int close_button_width = close_button_default_width_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698