OLD | NEW |
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 Loading... |
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 |
75 // The vertical and horizontal offset used to position the close button | 79 // The vertical and horizontal offset used to position the close button |
76 // in the tab. TODO(jhawkins): Ask pkasting what the Fuzz is about. | 80 // in the tab. TODO(jhawkins): Ask pkasting what the Fuzz is about. |
77 const int kCloseButtonVertFuzz = 0; | 81 const int kCloseButtonVertFuzz = 0; |
78 const int kCloseButtonHorzFuzz = 5; | 82 const int kCloseButtonHorzFuzz = 5; |
79 | 83 |
80 SkBitmap* crashed_favicon = NULL; | 84 SkBitmap* crashed_favicon = NULL; |
81 | 85 |
82 // Gets the bounds of |widget| relative to |parent|. | 86 // Gets the bounds of |widget| relative to |parent|. |
83 gfx::Rect GetWidgetBoundsRelativeToParent(GtkWidget* parent, | 87 gfx::Rect GetWidgetBoundsRelativeToParent(GtkWidget* parent, |
84 GtkWidget* widget) { | 88 GtkWidget* widget) { |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 | 1089 |
1086 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 1090 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
1087 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); | 1091 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); |
1088 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); | 1092 title_font_ = new gfx::Font(base_font.GetFontName(), kFontPixelSize); |
1089 title_font_height_ = title_font_->GetHeight(); | 1093 title_font_height_ = title_font_->GetHeight(); |
1090 | 1094 |
1091 crashed_favicon = rb.GetBitmapNamed(IDR_SAD_FAVICON); | 1095 crashed_favicon = rb.GetBitmapNamed(IDR_SAD_FAVICON); |
1092 | 1096 |
1093 initialized_ = true; | 1097 initialized_ = true; |
1094 } | 1098 } |
OLD | NEW |