summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 01:22:28 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 01:22:28 +0000
commit7b6dd0cd5176e27364fa8c5338792b64bbd18073 (patch)
tree28e4163b5080bb1a581bca372d57914489a2602a /chrome
parent41ee7dc64bdf8d662813245d4bceeba176351c31 (diff)
downloadchromium_src-7b6dd0cd5176e27364fa8c5338792b64bbd18073.zip
chromium_src-7b6dd0cd5176e27364fa8c5338792b64bbd18073.tar.gz
chromium_src-7b6dd0cd5176e27364fa8c5338792b64bbd18073.tar.bz2
Fix the position of the throbber for pinned tabs. It was wrong before,
but we repainted the whole pinned tab so it wasn't as obvious. With this change, the throbber is placed where the favicon will go. BUG=20626 Review URL: http://codereview.chromium.org/175038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.cc18
1 files changed, 5 insertions, 13 deletions
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
index 042ff68..c2580c7 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
@@ -867,20 +867,12 @@ void TabRendererGtk::PaintLoadingAnimation(gfx::Canvas* canvas) {
loading_animation_.loading_animation_frames();
const int image_size = frames->height();
const int image_offset = loading_animation_.animation_frame() * image_size;
- const int dst_y = favicon_bounds_.y();
+ DCHECK(image_size == favicon_bounds_.height());
+ DCHECK(image_size == favicon_bounds_.width());
- // Just like with the Tab's title and favicon, the position for the page
- // loading animation also needs to be mirrored if the UI layout is RTL.
- int dst_x;
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) {
- dst_x = width() - kLeftPadding - image_size;
- } else {
- dst_x = kLeftPadding;
- }
-
- canvas->DrawBitmapInt(*frames, image_offset, 0, image_size,
- image_size, dst_x, dst_y, image_size, image_size,
- false);
+ canvas->DrawBitmapInt(*frames, image_offset, 0, image_size, image_size,
+ favicon_bounds_.x(), favicon_bounds_.y(), image_size, image_size,
+ false);
}
int TabRendererGtk::IconCapacity() const {