[maemo-commits] [maemo-commits] r17945 - in projects/haf/branches/sapwood/rgba-ng: . demos

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Apr 1 13:17:32 EEST 2009
Author: herzi
Date: 2009-04-01 13:17:30 +0300 (Wed, 01 Apr 2009)
New Revision: 17945

Modified:
   projects/haf/branches/sapwood/rgba-ng/ChangeLog
   projects/haf/branches/sapwood/rgba-ng/demos/rgba-demo.c
   projects/haf/branches/sapwood/rgba-ng/demos/rgba-demo.gtkrc
Log:
2009-01-10  Sven Herzberg  <sven at imendio.com>

	Render the entry with the gradient from the gradient demo

	* demos/rgba-demo.c (window_expose_event), (main): change the
	expose-handler to just clean the window connected to the expose event;
	connect the expose handler also to the signal from the entry (to clear
	frame and text windows)
	* demos/rgba-demo.gtkrc: add the gradient to the entry rendering stuff



Modified: projects/haf/branches/sapwood/rgba-ng/ChangeLog
===================================================================
--- projects/haf/branches/sapwood/rgba-ng/ChangeLog	2009-04-01 10:17:25 UTC (rev 17944)
+++ projects/haf/branches/sapwood/rgba-ng/ChangeLog	2009-04-01 10:17:30 UTC (rev 17945)
@@ -1,5 +1,15 @@
 2009-01-10  Sven Herzberg  <sven at imendio.com>
 
+	Render the entry with the gradient from the gradient demo
+
+	* demos/rgba-demo.c (window_expose_event), (main): change the
+	expose-handler to just clean the window connected to the expose event;
+	connect the expose handler also to the signal from the entry (to clear
+	frame and text windows)
+	* demos/rgba-demo.gtkrc: add the gradient to the entry rendering stuff
+
+2009-01-10  Sven Herzberg  <sven at imendio.com>
+
 	Added a transparent main window to the gradient demo (to check how
 	well it works)
 

Modified: projects/haf/branches/sapwood/rgba-ng/demos/rgba-demo.c
===================================================================
--- projects/haf/branches/sapwood/rgba-ng/demos/rgba-demo.c	2009-04-01 10:17:25 UTC (rev 17944)
+++ projects/haf/branches/sapwood/rgba-ng/demos/rgba-demo.c	2009-04-01 10:17:30 UTC (rev 17945)
@@ -30,7 +30,7 @@
                      GdkEventExpose* event,
                      gpointer        user_data)
 {
-  cairo_t* cr = gdk_cairo_create (widget->window);
+  cairo_t* cr = gdk_cairo_create (event->window);
 
   gdk_cairo_region (cr, event->region);
   cairo_clip (cr);
@@ -79,6 +79,9 @@
 
   gtk_table_set_row_spacings (GTK_TABLE (table), 12);
 
+  g_signal_connect (entry, "expose-event",
+                    G_CALLBACK (window_expose_event), NULL);
+
   g_signal_connect_swapped (button, "clicked",
                             G_CALLBACK (gtk_widget_destroy), window);
 

Modified: projects/haf/branches/sapwood/rgba-ng/demos/rgba-demo.gtkrc
===================================================================
--- projects/haf/branches/sapwood/rgba-ng/demos/rgba-demo.gtkrc	2009-04-01 10:17:25 UTC (rev 17944)
+++ projects/haf/branches/sapwood/rgba-ng/demos/rgba-demo.gtkrc	2009-04-01 10:17:30 UTC (rev 17945)
@@ -53,6 +53,44 @@
   }
 }
 
+style "entry" {
+
+    GtkEntry::inner-border = { 6, 6, 0, 0 }
+
+        engine "sapwood" {
+                image {
+                        function = SHADOW
+                        state = NORMAL
+                }
+        }
+
+        engine "sapwood" {
+                image {
+                        function = FOCUS
+                }
+        }
+
+        engine "sapwood" {
+                image {
+                        function = FLAT_BOX
+                        shadow = NONE
+                        state = INSENSITIVE
+                        file = "gradient.png"
+                        border = { 2, 2, 2, 2 }
+                }
+        }
+
+        engine "sapwood" {
+                image {
+                        function = FLAT_BOX
+                        shadow = NONE
+                        file = "gradient.png"
+                        border = { 2, 2, 2, 2 }
+                }
+        }
+}
+
 class "GtkWindow" style "window"
 class "GtkButton" style "button"
+class "GtkEntry" style "entry"
 


More information about the maemo-commits mailing list