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

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

Issue 196044: GTK Theme: Don't render IDR_THEME_TOOLBAR on GtkWidgets. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/gtk/rounded_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/find_bar_gtk.h" 5 #include "chrome/browser/gtk/find_bar_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/gfx/gtk_util.h" 10 #include "base/gfx/gtk_util.h"
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 gdk_window_shape_combine_region(widget->window, NULL, 0, 0); 728 gdk_window_shape_combine_region(widget->window, NULL, 0, 0);
729 gdk_window_shape_combine_region(widget->window, mask_region, 0, 0); 729 gdk_window_shape_combine_region(widget->window, mask_region, 0, 0);
730 gdk_region_destroy(mask_region); 730 gdk_region_destroy(mask_region);
731 731
732 bar->container_width_ = widget->allocation.width; 732 bar->container_width_ = widget->allocation.width;
733 bar->container_height_ = widget->allocation.height; 733 bar->container_height_ = widget->allocation.height;
734 } 734 }
735 735
736 GdkDrawable* drawable = GDK_DRAWABLE(e->window); 736 GdkDrawable* drawable = GDK_DRAWABLE(e->window);
737 GdkGC* gc = gdk_gc_new(drawable); 737 GdkGC* gc = gdk_gc_new(drawable);
738 gdk_gc_set_clip_rectangle(gc, &e->area);
738 GdkColor color = bar->theme_provider_->GetBorderColor(); 739 GdkColor color = bar->theme_provider_->GetBorderColor();
739 gdk_gc_set_rgb_fg_color(gc, &color); 740 gdk_gc_set_rgb_fg_color(gc, &color);
740 741
741 // Stroke the frame border. 742 // Stroke the frame border.
742 std::vector<GdkPoint> points = MakeFramePolygonPoints( 743 std::vector<GdkPoint> points = MakeFramePolygonPoints(
743 widget->allocation.width, widget->allocation.height, FRAME_STROKE); 744 widget->allocation.width, widget->allocation.height, FRAME_STROKE);
744 gdk_draw_lines(drawable, gc, &points[0], points.size()); 745 gdk_draw_lines(drawable, gc, &points[0], points.size());
745 746
746 g_object_unref(gc); 747 g_object_unref(gc);
747 } else { 748 } else {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 } 794 }
794 795
795 // static 796 // static
796 gboolean FindBarGtk::OnButtonPress(GtkWidget* text_entry, GdkEventButton* e, 797 gboolean FindBarGtk::OnButtonPress(GtkWidget* text_entry, GdkEventButton* e,
797 FindBarGtk* find_bar) { 798 FindBarGtk* find_bar) {
798 find_bar->StoreOutsideFocus(); 799 find_bar->StoreOutsideFocus();
799 800
800 // Continue propagating the event. 801 // Continue propagating the event.
801 return FALSE; 802 return FALSE;
802 } 803 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/gtk/rounded_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698