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

Side by Side Diff: chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc

Issue 7484035: Reapplies r91761. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/omnibox/omnibox_popup_view_gtk.h" 5 #include "chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 GtkWidget* location_bar) 274 GtkWidget* location_bar)
275 : model_(new AutocompletePopupModel(this, edit_model, profile)), 275 : model_(new AutocompletePopupModel(this, edit_model, profile)),
276 omnibox_view_(omnibox_view), 276 omnibox_view_(omnibox_view),
277 location_bar_(location_bar), 277 location_bar_(location_bar),
278 window_(gtk_window_new(GTK_WINDOW_POPUP)), 278 window_(gtk_window_new(GTK_WINDOW_POPUP)),
279 layout_(NULL), 279 layout_(NULL),
280 theme_service_(GtkThemeService::GetFrom(profile)), 280 theme_service_(GtkThemeService::GetFrom(profile)),
281 font_(font.DeriveFont(kEditFontAdjust)), 281 font_(font.DeriveFont(kEditFontAdjust)),
282 ignore_mouse_drag_(false), 282 ignore_mouse_drag_(false),
283 opened_(false) { 283 opened_(false) {
284 GTK_WIDGET_UNSET_FLAGS(window_, GTK_CAN_FOCUS); 284 gtk_widget_set_can_focus(window_, FALSE);
285 // Don't allow the window to be resized. This also forces the window to 285 // Don't allow the window to be resized. This also forces the window to
286 // shrink down to the size of its child contents. 286 // shrink down to the size of its child contents.
287 gtk_window_set_resizable(GTK_WINDOW(window_), FALSE); 287 gtk_window_set_resizable(GTK_WINDOW(window_), FALSE);
288 gtk_widget_set_app_paintable(window_, TRUE); 288 gtk_widget_set_app_paintable(window_, TRUE);
289 // Have GTK double buffer around the expose signal. 289 // Have GTK double buffer around the expose signal.
290 gtk_widget_set_double_buffered(window_, TRUE); 290 gtk_widget_set_double_buffered(window_, TRUE);
291 291
292 // Cache the layout so we don't have to create it for every expose. If we 292 // Cache the layout so we don't have to create it for every expose. If we
293 // were a real widget we should handle changing directions, but we're not 293 // were a real widget we should handle changing directions, but we're not
294 // doing RTL or anything yet, so it shouldn't be important now. 294 // doing RTL or anything yet, so it shouldn't be important now.
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 (text_width - actual_content_width - 681 (text_width - actual_content_width -
682 (actual_description_width / PANGO_SCALE)), 682 (actual_description_width / PANGO_SCALE)),
683 content_y, layout_); 683 content_y, layout_);
684 } 684 }
685 } 685 }
686 686
687 g_object_unref(gc); 687 g_object_unref(gc);
688 688
689 return TRUE; 689 return TRUE;
690 } 690 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc ('k') | chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698