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

Unified Diff: chrome/browser/views/tabs/tab.cc

Issue 3064006: Make the throbber and tab close button correctly respond to theme changes. T... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | « chrome/browser/views/tabs/base_tab.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/tab.cc
===================================================================
--- chrome/browser/views/tabs/tab.cc (revision 53716)
+++ chrome/browser/views/tabs/tab.cc (working copy)
@@ -235,7 +235,8 @@
// The height of the content of the Tab is the largest of the favicon,
// the title text and the close button graphic.
int content_height = std::max(kFavIconSize, font_height());
- content_height = std::max(content_height, close_button_height());
+ gfx::Size close_button_size(close_button()->GetPreferredSize());
+ content_height = std::max(content_height, close_button_size.height());
// Size the Favicon.
showing_icon_ = ShouldShowIcon();
@@ -272,13 +273,12 @@
// Size the Close button.
showing_close_button_ = ShouldShowCloseBox();
if (showing_close_button_) {
- int close_button_top =
- kTopPadding + kCloseButtonVertFuzz +
- (content_height - close_button_height()) / 2;
+ int close_button_top = kTopPadding + kCloseButtonVertFuzz +
+ (content_height - close_button_size.height()) / 2;
// If the ratio of the close button size to tab width exceeds the maximum.
close_button()->SetBounds(lb.width() + kCloseButtonHorzFuzz,
- close_button_top, close_button_width(),
- close_button_height());
+ close_button_top, close_button_size.width(),
+ close_button_size.height());
close_button()->SetVisible(true);
} else {
close_button()->SetBounds(0, 0, 0, 0);
« no previous file with comments | « chrome/browser/views/tabs/base_tab.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698