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

Side by Side Diff: chrome/browser/gtk/location_bar_view_gtk.cc

Issue 1560015: Replace omnibox icons with new set that are all the same size (19x19).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/location_bar_view_gtk.h" 5 #include "chrome/browser/gtk/location_bar_view_gtk.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/gtk_dnd_util.h" 9 #include "app/gtk_dnd_util.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 void LocationBarViewGtk::SetStarred(bool starred) { 934 void LocationBarViewGtk::SetStarred(bool starred) {
935 if (starred == starred_) 935 if (starred == starred_)
936 return; 936 return;
937 937
938 starred_ = starred; 938 starred_ = starred;
939 UpdateStarIcon(); 939 UpdateStarIcon();
940 } 940 }
941 941
942 void LocationBarViewGtk::UpdateStarIcon() { 942 void LocationBarViewGtk::UpdateStarIcon() {
943 gtk_image_set_from_pixbuf(GTK_IMAGE(star_image_), 943 gtk_image_set_from_pixbuf(GTK_IMAGE(star_image_),
944 theme_provider_->GetPixbufNamed(starred_ ? IDR_STARRED : IDR_STAR)); 944 theme_provider_->GetPixbufNamed(
945 starred_ ? IDR_OMNIBOX_STAR_LIT : IDR_OMNIBOX_STAR));
945 } 946 }
946 947
947 void LocationBarViewGtk::AdjustChildrenVisibility() { 948 void LocationBarViewGtk::AdjustChildrenVisibility() {
948 int text_width = location_entry_->TextWidth(); 949 int text_width = location_entry_->TextWidth();
949 int available_width = entry_box_width_ - text_width - kInnerPadding; 950 int available_width = entry_box_width_ - text_width - kInnerPadding;
950 951
951 // Only one of |tab_to_search_box_|, |tab_to_search_hint_| and 952 // Only one of |tab_to_search_box_|, |tab_to_search_hint_| and
952 // |type_to_search_hint_| can be visible at the same time. 953 // |type_to_search_hint_| can be visible at the same time.
953 if (!show_selected_keyword_ && GTK_WIDGET_VISIBLE(tab_to_search_box_)) { 954 if (!show_selected_keyword_ && GTK_WIDGET_VISIBLE(tab_to_search_box_)) {
954 gtk_widget_hide(tab_to_search_box_); 955 gtk_widget_hide(tab_to_search_box_);
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 1315
1315 std::string badge_text = page_action_->GetBadgeText(tab_id); 1316 std::string badge_text = page_action_->GetBadgeText(tab_id);
1316 if (badge_text.empty()) 1317 if (badge_text.empty())
1317 return FALSE; 1318 return FALSE;
1318 1319
1319 gfx::CanvasPaint canvas(event, false); 1320 gfx::CanvasPaint canvas(event, false);
1320 gfx::Rect bounding_rect(widget->allocation); 1321 gfx::Rect bounding_rect(widget->allocation);
1321 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); 1322 page_action_->PaintBadge(&canvas, bounding_rect, tab_id);
1322 return FALSE; 1323 return FALSE;
1323 } 1324 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/location_bar_view_mac.mm ('k') | chrome/browser/theme_resources_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698