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

Side by Side Diff: chrome/browser/ui/gtk/find_bar_gtk.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: Merge with master. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/gtk/find_bar_gtk.h" 5 #include "chrome/browser/ui/gtk/find_bar_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 close_button_.reset(CustomDrawButton::CloseButton(theme_service_)); 243 close_button_.reset(CustomDrawButton::CloseButton(theme_service_));
244 gtk_util::CenterWidgetInHBox(hbox, close_button_->widget(), true, 244 gtk_util::CenterWidgetInHBox(hbox, close_button_->widget(), true,
245 kCloseButtonPaddingLeft); 245 kCloseButtonPaddingLeft);
246 g_signal_connect(close_button_->widget(), "clicked", 246 g_signal_connect(close_button_->widget(), "clicked",
247 G_CALLBACK(OnClickedThunk), this); 247 G_CALLBACK(OnClickedThunk), this);
248 gtk_widget_set_tooltip_text(close_button_->widget(), 248 gtk_widget_set_tooltip_text(close_button_->widget(),
249 l10n_util::GetStringUTF8(IDS_FIND_IN_PAGE_CLOSE_TOOLTIP).c_str()); 249 l10n_util::GetStringUTF8(IDS_FIND_IN_PAGE_CLOSE_TOOLTIP).c_str());
250 250
251 find_next_button_.reset(new CustomDrawButton(theme_service_, 251 find_next_button_.reset(new CustomDrawButton(theme_service_,
252 IDR_FINDINPAGE_NEXT, IDR_FINDINPAGE_NEXT_H, IDR_FINDINPAGE_NEXT_H, 252 IDR_FINDINPAGE_NEXT, IDR_FINDINPAGE_NEXT_H, IDR_FINDINPAGE_NEXT_H,
253 IDR_FINDINPAGE_NEXT_P, GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_MENU)); 253 IDR_FINDINPAGE_NEXT_D, GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_MENU));
254 g_signal_connect(find_next_button_->widget(), "clicked", 254 g_signal_connect(find_next_button_->widget(), "clicked",
255 G_CALLBACK(OnClickedThunk), this); 255 G_CALLBACK(OnClickedThunk), this);
256 gtk_widget_set_tooltip_text(find_next_button_->widget(), 256 gtk_widget_set_tooltip_text(find_next_button_->widget(),
257 l10n_util::GetStringUTF8(IDS_FIND_IN_PAGE_NEXT_TOOLTIP).c_str()); 257 l10n_util::GetStringUTF8(IDS_FIND_IN_PAGE_NEXT_TOOLTIP).c_str());
258 gtk_box_pack_end(GTK_BOX(hbox), find_next_button_->widget(), 258 gtk_box_pack_end(GTK_BOX(hbox), find_next_button_->widget(),
259 FALSE, FALSE, 0); 259 FALSE, FALSE, 0);
260 260
261 find_previous_button_.reset(new CustomDrawButton(theme_service_, 261 find_previous_button_.reset(new CustomDrawButton(theme_service_,
262 IDR_FINDINPAGE_PREV, IDR_FINDINPAGE_PREV_H, IDR_FINDINPAGE_PREV_H, 262 IDR_FINDINPAGE_PREV, IDR_FINDINPAGE_PREV_H, IDR_FINDINPAGE_PREV_H,
263 IDR_FINDINPAGE_PREV_P, GTK_STOCK_GO_UP, GTK_ICON_SIZE_MENU)); 263 IDR_FINDINPAGE_PREV_D, GTK_STOCK_GO_UP, GTK_ICON_SIZE_MENU));
264 g_signal_connect(find_previous_button_->widget(), "clicked", 264 g_signal_connect(find_previous_button_->widget(), "clicked",
265 G_CALLBACK(OnClickedThunk), this); 265 G_CALLBACK(OnClickedThunk), this);
266 gtk_widget_set_tooltip_text(find_previous_button_->widget(), 266 gtk_widget_set_tooltip_text(find_previous_button_->widget(),
267 l10n_util::GetStringUTF8(IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP).c_str()); 267 l10n_util::GetStringUTF8(IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP).c_str());
268 gtk_box_pack_end(GTK_BOX(hbox), find_previous_button_->widget(), 268 gtk_box_pack_end(GTK_BOX(hbox), find_previous_button_->widget(),
269 FALSE, FALSE, 0); 269 FALSE, FALSE, 0);
270 270
271 // Make a box for the edit and match count widgets. 271 // Make a box for the edit and match count widgets.
272 GtkWidget* content_hbox = gtk_hbox_new(FALSE, 0); 272 GtkWidget* content_hbox = gtk_hbox_new(FALSE, 0);
273 273
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 return FALSE; // Continue propagation. 1001 return FALSE; // Continue propagation.
1002 } 1002 }
1003 1003
1004 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event) { 1004 gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event) {
1005 g_signal_handlers_disconnect_by_func( 1005 g_signal_handlers_disconnect_by_func(
1006 gdk_keymap_get_for_display(gtk_widget_get_display(entry)), 1006 gdk_keymap_get_for_display(gtk_widget_get_display(entry)),
1007 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), this); 1007 reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), this);
1008 1008
1009 return FALSE; // Continue propagation. 1009 return FALSE; // Continue propagation.
1010 } 1010 }
OLDNEW
« no previous file with comments | « chrome/app/theme/touch_100_percent/common/find_prev_pressed.png ('k') | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698