Chromium Code Reviews| Index: chrome/browser/ui/views/download/download_item_view.cc |
| diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc |
| index 769122d652714efd38406da9cbd81bb7878ce1f9..946973fe9811658038269b102cdb31a73c3a16aa 100644 |
| --- a/chrome/browser/ui/views/download/download_item_view.cc |
| +++ b/chrome/browser/ui/views/download/download_item_view.cc |
| @@ -86,7 +86,6 @@ DownloadItemView::DownloadItemView(DownloadItem* download, |
| parent_(parent), |
| status_text_(UTF16ToWide( |
| l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_STARTING))), |
| - show_status_text_(true), |
| body_state_(NORMAL), |
| drop_down_state_(NORMAL), |
| progress_angle_(download_util::kStartAngleDegrees), |
| @@ -355,8 +354,6 @@ void DownloadItemView::OnDownloadUpdated(DownloadItem* download) { |
| complete_animation_->SetSlideDuration(kInterruptedAnimationDurationMs); |
| complete_animation_->SetTweenType(ui::Tween::LINEAR); |
| complete_animation_->Show(); |
| - if (status_text.empty()) |
| - show_status_text_ = false; |
| SchedulePaint(); |
| LoadIcon(); |
| break; |
| @@ -370,8 +367,6 @@ void DownloadItemView::OnDownloadUpdated(DownloadItem* download) { |
| complete_animation_->SetSlideDuration(kCompleteAnimationDurationMs); |
| complete_animation_->SetTweenType(ui::Tween::LINEAR); |
| complete_animation_->Show(); |
| - if (status_text.empty()) |
| - show_status_text_ = false; |
| SchedulePaint(); |
| LoadIcon(); |
| break; |
| @@ -723,7 +718,7 @@ void DownloadItemView::OnPaint(gfx::Canvas* canvas) { |
| // Draw status before button image to effectively lighten text. |
| if (!IsDangerousMode()) { |
| - if (show_status_text_) { |
| + if (!status_text_.empty()) { |
| int mirrored_x = GetMirroredXWithWidthInView( |
| download_util::kSmallProgressIconSize, kTextWidth); |
| // Add font_.height() to compensate for title, which is drawn later. |
| @@ -856,8 +851,8 @@ void DownloadItemView::OnPaint(gfx::Canvas* canvas) { |
| SkColor file_name_color = GetThemeProvider()->GetColor( |
| ThemeService::COLOR_BOOKMARK_TEXT); |
| int y = |
| - box_y_ + (show_status_text_ ? kVerticalPadding : |
| - (box_height_ - font_.GetHeight()) / 2); |
| + box_y_ + (status_text_.empty() ? |
| + (box_height_ - font_.GetHeight()) / 2 : kVerticalPadding); |
|
Peter Kasting
2011/06/14 18:26:06
Nit: I suggest putting the "expr / 2" part in its
haraken1
2011/06/15 00:59:29
Done.
|
| // Draw the file's name. |
| canvas->DrawStringInt(filename, font_, |