[anjal] Paint a bit different for non-moblin envs.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] Paint a bit different for non-moblin envs.
- Date: Fri, 12 Jun 2009 05:44:36 -0400 (EDT)
commit 457db6003ccf283b68c5cfa8078bba84743e1241
Author: Srinivasa Ragavan <sragavan novell com>
Date: Fri Jun 12 15:15:32 2009 +0530
Paint a bit different for non-moblin envs.
src/mail-shell.c | 38 +++++++++++++++++++++++++++++++++-----
1 files changed, 33 insertions(+), 5 deletions(-)
---
diff --git a/src/mail-shell.c b/src/mail-shell.c
index 9e48369..cb162ef 100644
--- a/src/mail-shell.c
+++ b/src/mail-shell.c
@@ -154,16 +154,24 @@ mail_shell_class_init (MailShellClass *klass)
static int
color_expose (GtkWidget *w, GdkEventExpose *event, gpointer data)
{
+ GtkWindow *win = (GtkWindow *)data;
cairo_t *cr = gdk_cairo_create (w->window);
int wid = w->allocation.width;
int heig = w->allocation.height;
+ int wwid, wheig;
GdkColor paint;
+ gtk_window_get_size (win, &wwid, &wheig);
gdk_color_parse ("#000000", &paint);
gdk_cairo_set_source_color (cr, &(paint));
- cairo_rectangle (cr, 0, 0, wid+12, heig+12);
+ cairo_rectangle (cr, 0, 0, wwid, wheig);
+ cairo_stroke (cr);
+
+ gdk_color_parse ("#000000", &paint);
+ gdk_cairo_set_source_color (cr, &(paint));
+ cairo_rectangle (cr, 1, 1, wid, heig);
cairo_fill (cr);
-
+
cairo_destroy (cr);
return FALSE;
@@ -286,7 +294,7 @@ void
mail_shell_construct (MailShell *shell)
{
MailShellPrivate *priv = shell->priv;
- GtkWidget *tmp, *img, *box, *ar1, *ar2;
+ GtkWidget *tmp, *img, *box, *ar1, *ar2, *lbl;
GtkStyle *style = gtk_widget_get_default_style ();
int window_width = 1024;
@@ -312,6 +320,11 @@ mail_shell_construct (MailShell *shell)
gtk_box_pack_start ((GtkBox *)priv->box, priv->top_bar, FALSE, FALSE, 0);
gtk_widget_show (priv->top_bar);
gtk_widget_set_size_request (priv->top_bar, -1, 48);
+ if (g_getenv("ANJAL_NO_MAX") || windowed) {
+ g_signal_connect (priv->top_bar, "expose-event",
+ G_CALLBACK (color_expose),
+ shell);
+ }
/* New mail tool button */
PACK_IN_TOOL(priv->new_mail, "mail-message-new");
@@ -364,8 +377,23 @@ mail_shell_construct (MailShell *shell)
/* Sort combo */
tmp = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start ((GtkBox *)tmp, gtk_label_new (_("Sort By")), FALSE, FALSE, 6);
- gtk_box_pack_start ((GtkBox *)tmp, gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE), FALSE, FALSE, 0);
+ lbl = gtk_label_new (_("Sort By"));
+ ar1 = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE);
+
+ if (windowed || g_getenv("ANJAL_NO_MAX") != NULL) {
+ GdkColor color;
+
+ gdk_color_parse ("#000000", &color);
+ gtk_widget_modify_fg (lbl, GTK_STATE_SELECTED, &color);
+ gtk_widget_modify_fg (lbl, GTK_STATE_ACTIVE, &color);
+ gtk_widget_modify_fg (lbl, GTK_STATE_PRELIGHT, &color);
+
+ gdk_color_parse ("#ffffff", &color);
+ gtk_widget_modify_fg (lbl, GTK_STATE_NORMAL, &color);
+ }
+
+ gtk_box_pack_start ((GtkBox *)tmp, lbl, FALSE, FALSE, 6);
+ gtk_box_pack_start ((GtkBox *)tmp, ar1, FALSE, FALSE, 0);
gtk_widget_show_all (tmp);
priv->sort = (GtkWidget *)gtk_tool_button_new (tmp, NULL);
gtk_widget_show_all (priv->sort);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]