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

Unified Diff: chrome/browser/ui/views/about_chrome_view.cc

Issue 7274001: Get Chrome About dialog 'official build' label to display properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
Index: chrome/browser/ui/views/about_chrome_view.cc
===================================================================
--- chrome/browser/ui/views/about_chrome_view.cc (revision 90548)
+++ chrome/browser/ui/views/about_chrome_view.cc (working copy)
@@ -9,7 +9,6 @@
#endif // defined(OS_WIN)
#include <algorithm>
-#include <string>
#include <vector>
#include "base/callback.h"
@@ -50,12 +49,6 @@
#endif // defined(OS_WIN)
namespace {
-// The pixel width of the version text field. Ideally, we'd like to have the
-// bounds set to the edge of the icon. However, the icon is not a view but a
-// part of the background, so we have to hard code the width to make sure
-// the version field doesn't overlap it.
-const int kVersionFieldWidth = 195;
-
// These are used as placeholder text around the links in the text in the about
// dialog.
const wchar_t* kBeginLink = L"BEGIN_LINK";
@@ -152,16 +145,16 @@
std::string version_modifier =
chrome::VersionInfo::GetVersionStringModifier();
if (!version_modifier.empty())
- version_details_ += " " + version_modifier;
+ version_details_ += ASCIIToUTF16(" ") + ASCIIToUTF16(version_modifier);
#if !defined(GOOGLE_CHROME_BUILD)
- version_details_ += " (";
- version_details_ += l10n_util::GetStringUTF8(
+ version_details_ += ASCIIToUTF16(" (");
+ version_details_ += l10n_util::GetStringUTF16(
version_info.IsOfficialBuild() ?
IDS_ABOUT_VERSION_OFFICIAL : IDS_ABOUT_VERSION_UNOFFICIAL);
- version_details_ += " ";
- version_details_ += version_info.LastChange();
- version_details_ += ")";
+ version_details_ += ASCIIToUTF16(" ");
+ version_details_ += ASCIIToUTF16(version_info.LastChange());
+ version_details_ += ASCIIToUTF16(")");
#endif
// Views we will add to the *parent* of this dialog, since it will display
@@ -206,7 +199,7 @@
// This is a text field so people can copy the version number from the dialog.
version_label_ = new views::Textfield();
- version_label_->SetText(ASCIIToUTF16(current_version_ + version_details_));
+ version_label_->SetText(ASCIIToUTF16(current_version_) + version_details_);
version_label_->SetReadOnly(true);
version_label_->RemoveBorder();
version_label_->SetTextColor(SK_ColorBLACK);
@@ -349,7 +342,8 @@
about_title_label_->y() +
about_title_label_->height() +
views::kRelatedControlVerticalSpacing,
- kVersionFieldWidth,
+ panel_size.width() -
+ about_dlg_background_logo_->width(),
sz.height());
// Then we have the version number right below it.
@@ -359,7 +353,8 @@
version_label_->y() +
version_label_->height() +
views::kRelatedControlVerticalSpacing,
- kVersionFieldWidth,
+ panel_size.width() -
+ about_dlg_background_logo_->width(),
sz.height());
// For the width of the main text label we want to use up the whole panel
@@ -419,7 +414,6 @@
sz.height());
}
-
void AboutChromeView::OnPaint(gfx::Canvas* canvas) {
views::View::OnPaint(canvas);
« chrome/browser/ui/views/about_chrome_view.h ('K') | « chrome/browser/ui/views/about_chrome_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698