[gtk+] entry: Move cairo_save() call for clarity
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] entry: Move cairo_save() call for clarity
- Date: Tue, 19 Apr 2011 20:27:08 +0000 (UTC)
commit 72ebc788a60ab260cfe498eecaf885f4df349873
Author: Benjamin Otte <otte redhat com>
Date: Tue Apr 19 01:13:57 2011 +0200
entry: Move cairo_save() call for clarity
We want save, clip, draw1, restore, save, clip, draw2, restore
and not save, save, clip, draw1, restore, clip, draw2, restore
Functionally the same thing, but not as obvious
gtk/gtkentry.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index b178860..9b32435 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -5774,8 +5774,6 @@ gtk_entry_draw_text (GtkEntry *entry,
cairo_save (cr);
- cairo_save (cr);
-
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
cairo_rectangle (cr, 0, 0, width, height);
@@ -5791,6 +5789,8 @@ gtk_entry_draw_text (GtkEntry *entry,
draw_text_with_color (entry, cr, &text_color);
cairo_restore (cr);
+ cairo_save (cr);
+
cairo_rectangle (cr, progress_x, progress_y,
progress_width, progress_height);
cairo_clip (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]