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

Side by Side Diff: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc

Issue 7640004: Gtk: Make click target of tabs match their appearance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: single space after period Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_gtk.cc ('k') | chrome/browser/ui/gtk/tabs/tab_strip_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h" 5 #include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // How opaque to make the hover state (out of 1). 66 // How opaque to make the hover state (out of 1).
67 const double kHoverOpacity = 0.33; 67 const double kHoverOpacity = 0.33;
68 68
69 // Max opacity for the mini-tab title change animation. 69 // Max opacity for the mini-tab title change animation.
70 const double kMiniTitleChangeThrobOpacity = 0.75; 70 const double kMiniTitleChangeThrobOpacity = 0.75;
71 71
72 // Duration for when the title of an inactive mini-tab changes. 72 // Duration for when the title of an inactive mini-tab changes.
73 const int kMiniTitleChangeThrobDuration = 1000; 73 const int kMiniTitleChangeThrobDuration = 1000;
74 74
75 const SkScalar kTabCapWidth = 15;
76 const SkScalar kTabTopCurveWidth = 4;
77 const SkScalar kTabBottomCurveWidth = 3;
78
79 // The vertical and horizontal offset used to position the close button 75 // The vertical and horizontal offset used to position the close button
80 // in the tab. TODO(jhawkins): Ask pkasting what the Fuzz is about. 76 // in the tab. TODO(jhawkins): Ask pkasting what the Fuzz is about.
81 const int kCloseButtonVertFuzz = 0; 77 const int kCloseButtonVertFuzz = 0;
82 const int kCloseButtonHorzFuzz = 5; 78 const int kCloseButtonHorzFuzz = 5;
83 79
84 SkBitmap* crashed_favicon = NULL; 80 SkBitmap* crashed_favicon = NULL;
85 81
86 // Gets the bounds of |widget| relative to |parent|. 82 // Gets the bounds of |widget| relative to |parent|.
87 gfx::Rect GetWidgetBoundsRelativeToParent(GtkWidget* parent, 83 gfx::Rect GetWidgetBoundsRelativeToParent(GtkWidget* parent,
88 GtkWidget* widget) { 84 GtkWidget* widget) {
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 1085
1090 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 1086 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
1091 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); 1087 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont);
1092 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); 1088 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize);
1093 title_font_height_ = title_font_->GetHeight(); 1089 title_font_height_ = title_font_->GetHeight();
1094 1090
1095 crashed_favicon = rb.GetBitmapNamed(IDR_SAD_FAVICON); 1091 crashed_favicon = rb.GetBitmapNamed(IDR_SAD_FAVICON);
1096 1092
1097 initialized_ = true; 1093 initialized_ = true;
1098 } 1094 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_gtk.cc ('k') | chrome/browser/ui/gtk/tabs/tab_strip_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698