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

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: Use new find bar assets on cros only. 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..d933cb43bff2129ac3ef6f0c2f15ecbb337a7b92 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -48,6 +48,9 @@ static const int kMatchCountExtraWidth = 9;
// Minimum width for the match count label.
static const int kMatchCountMinWidth = 30;
+// The background color of the find box.
+static const SkColor kFindBoxBackgroundColor = SkColorSetARGB(0, 255, 255, 255);
+
// The text color for the match count label.
static const SkColor kTextColorMatchCount = SkColorSetRGB(178, 178, 178);
@@ -55,7 +58,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);
@@ -81,6 +84,7 @@ FindBarView::FindBarView(FindBarHost* host)
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
find_text_ = new SearchTextfieldView();
+ find_text_->SetBackgroundColor(kFindBoxBackgroundColor);
sky 2012/09/14 21:57:30 Don't you only want this for chromeos?
flackr 2012/09/15 01:46:34 It doesn't change the appearance on Windows since
find_text_->set_id(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
find_text_->SetFont(rb.GetFont(ui::ResourceBundle::BaseFont));
find_text_->set_default_width_in_chars(kDefaultCharWidth);
@@ -104,8 +108,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 +125,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 +139,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));
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 +499,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