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

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

Issue 10908234: Add high DPI assets and update defaults for CrOS find in page bar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only set transparent background on chromeos where new theme images are used. Created 8 years, 3 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/ui/gtk/find_bar_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_view.cc
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index cbe74878a1e65cfbcaa2aed0b5bfbed6955f68e0..e1de2307033c71bd00e3083bec7ba5370e724a9b 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -55,7 +55,7 @@ static const SkColor kTextColorMatchCount = SkColorSetRGB(178, 178, 178);
static const SkColor kTextColorNoMatch = SK_ColorBLACK;
// The background color of the match count label when results are found.
-static const SkColor kBackgroundColorMatch = SK_ColorWHITE;
+static const SkColor kBackgroundColorMatch = SkColorSetARGB(0, 255, 255, 255);
// The background color of the match count label when no results are found.
static const SkColor kBackgroundColorNoMatch = SkColorSetRGB(255, 102, 102);
@@ -64,6 +64,11 @@ static const SkColor kBackgroundColorNoMatch = SkColorSetRGB(255, 102, 102);
// number brings the width on a "regular fonts" system to about 300px.
static const int kDefaultCharWidth = 43;
+#if defined(OS_CHROMEOS)
+// The background color of the find box.
+static const SkColor kFindBoxBackgroundColor = SkColorSetARGB(0, 255, 255, 255);
+#endif
+
////////////////////////////////////////////////////////////////////////////////
// FindBarView, public:
@@ -86,6 +91,13 @@ FindBarView::FindBarView(FindBarHost* host)
find_text_->set_default_width_in_chars(kDefaultCharWidth);
find_text_->SetController(this);
find_text_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FIND));
+
+#if defined(OS_CHROMEOS)
+ // Use a transparent background on ChromeOS as the theme image for the find
+ // box uses a partially transparent background.
+ find_text_->SetBackgroundColor(kFindBoxBackgroundColor);
+#endif
+
AddChildView(find_text_);
match_count_text_ = new views::Label();
@@ -104,8 +116,10 @@ FindBarView::FindBarView(FindBarHost* host)
rb.GetImageSkiaNamed(IDR_FINDINPAGE_PREV));
find_previous_button_->SetImage(views::CustomButton::BS_HOT,
rb.GetImageSkiaNamed(IDR_FINDINPAGE_PREV_H));
- find_previous_button_->SetImage(views::CustomButton::BS_DISABLED,
+ find_previous_button_->SetImage(views::CustomButton::BS_PUSHED,
rb.GetImageSkiaNamed(IDR_FINDINPAGE_PREV_P));
+ find_previous_button_->SetImage(views::CustomButton::BS_DISABLED,
+ rb.GetImageSkiaNamed(IDR_FINDINPAGE_PREV_D));
find_previous_button_->SetTooltipText(
l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP));
find_previous_button_->SetAccessibleName(
@@ -119,8 +133,10 @@ FindBarView::FindBarView(FindBarHost* host)
rb.GetImageSkiaNamed(IDR_FINDINPAGE_NEXT));
find_next_button_->SetImage(views::CustomButton::BS_HOT,
rb.GetImageSkiaNamed(IDR_FINDINPAGE_NEXT_H));
- find_next_button_->SetImage(views::CustomButton::BS_DISABLED,
+ find_next_button_->SetImage(views::CustomButton::BS_PUSHED,
rb.GetImageSkiaNamed(IDR_FINDINPAGE_NEXT_P));
+ find_next_button_->SetImage(views::CustomButton::BS_DISABLED,
+ rb.GetImageSkiaNamed(IDR_FINDINPAGE_NEXT_D));
find_next_button_->SetTooltipText(
l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_NEXT_TOOLTIP));
find_next_button_->SetAccessibleName(
@@ -131,11 +147,11 @@ FindBarView::FindBarView(FindBarHost* host)
close_button_->set_tag(CLOSE_TAG);
close_button_->set_focusable(true);
close_button_->SetImage(views::CustomButton::BS_NORMAL,
- rb.GetImageSkiaNamed(IDR_CLOSE_BAR));
+ rb.GetImageSkiaNamed(IDR_TAB_CLOSE));
sky 2012/09/17 13:47:06 Sorry, one last question. Are you sure about this?
flackr 2012/09/17 14:02:28 I believe Sebastien wanted the tab close button to
flackr 2012/09/17 18:34:35 Okay, talked to Sebastien and he wants to only use
close_button_->SetImage(views::CustomButton::BS_HOT,
- rb.GetImageSkiaNamed(IDR_CLOSE_BAR_H));
+ rb.GetImageSkiaNamed(IDR_TAB_CLOSE_H));
close_button_->SetImage(views::CustomButton::BS_PUSHED,
- rb.GetImageSkiaNamed(IDR_CLOSE_BAR_P));
+ rb.GetImageSkiaNamed(IDR_TAB_CLOSE_P));
close_button_->SetTooltipText(
l10n_util::GetStringUTF16(IDS_FIND_IN_PAGE_CLOSE_TOOLTIP));
close_button_->SetAccessibleName(
@@ -491,7 +507,7 @@ void FindBarView::OnThemeChanged() {
if (GetThemeProvider()) {
close_button_->SetBackground(
GetThemeProvider()->GetColor(ThemeService::COLOR_TAB_TEXT),
- rb.GetImageSkiaNamed(IDR_CLOSE_BAR),
- rb.GetImageSkiaNamed(IDR_CLOSE_BAR_MASK));
+ rb.GetImageSkiaNamed(IDR_TAB_CLOSE),
+ rb.GetImageSkiaNamed(IDR_TAB_CLOSE_MASK));
}
}
« no previous file with comments | « chrome/browser/ui/gtk/find_bar_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698