diff options
author | Kristian Rietveld <kris@gtk.org> | 2003-06-05 19:00:32 +0000 |
---|---|---|
committer | Kristian Rietveld <kristian@src.gnome.org> | 2003-06-05 19:00:32 +0000 |
commit | 2ee0192022566c976566846c18f08829e3098af3 (patch) | |
tree | 159f5e2a91f41075bb7415400737a480dc4d41b7 | |
parent | 1accb306d9a23ac9dad4f7bb7ffed92266c7044f (diff) | |
download | gnome-desktop-l33t-gnome-about.tar.gz |
change tmpcolor difference to 6 (avoids blink of the name in the middle),l33t-gnome-about
Thu Jun 5 20:58:02 2003 Kristian Rietveld <kris@gtk.org>
* gnome-about.c (animate_contributor): change tmpcolor difference to
6 (avoids blink of the name in the middle),
(animate_contributor), (display_contributors): fix the residue
problem by having a white rectangle below the text item, with
a bit wider bounding box,
(create_canvas): update the links, so you don't get 404s. FIXME:
need to update these links when the new website comes online.
-rw-r--r-- | gnome-about/ChangeLog | 10 | ||||
-rw-r--r-- | gnome-about/gnome-about.c | 56 |
2 files changed, 51 insertions, 15 deletions
diff --git a/gnome-about/ChangeLog b/gnome-about/ChangeLog index 4c400b0f..12a2451d 100644 --- a/gnome-about/ChangeLog +++ b/gnome-about/ChangeLog @@ -1,3 +1,13 @@ +Thu Jun 5 20:58:02 2003 Kristian Rietveld <kris@gtk.org> + + * gnome-about.c (animate_contributor): change tmpcolor difference to + 6 (avoids blink of the name in the middle), + (animate_contributor), (display_contributors): fix the residue + problem by having a white rectangle below the text item, with + a bit wider bounding box, + (create_canvas): update the links, so you don't get 404s. FIXME: + need to update these links when the new website comes online. + Tue Jun 3 17:59:59 2003 Kristian Rietveld <kris@gtk.org> Of course I can get nothing right at once P: diff --git a/gnome-about/gnome-about.c b/gnome-about/gnome-about.c index 078b8248..824e3354 100644 --- a/gnome-about/gnome-about.c +++ b/gnome-about/gnome-about.c @@ -80,21 +80,32 @@ animate_contributor (gpointer data) "size_points", &size, NULL); - y = ani_data->item->y1; + y = ani_data->item->parent->y1; + + /* ugh */ + g_object_set (GNOME_CANVAS_GROUP (ani_data->item->parent)->item_list->data, + "x1", -1.0 * (tmp / 2.0 + 3.0), + "y1", -1.0 * (tmp2 / 2.0 + 3.0), + "x2", tmp / 2.0 + 3.0, + "y2", tmp2 / 2.0 + 3.0, + NULL); before_middle = 130.0 + ((canvas_height - 130.0 - version_info_height - tmp2) / 2.0) < y; /* update the color */ tmpcolor = color & 0xff; - tmpcolor += before_middle ? -7 : 7; + tmpcolor += before_middle ? -6 : 6; size += before_middle ? 1.0 : -1.0; size = MAX (0.0, size); color = GNOME_CANVAS_COLOR_A (tmpcolor, tmpcolor, tmpcolor, tmpcolor); - g_object_set (ani_data->item, "fill_color_rgba", color, "size_points", size, NULL); + g_object_set (ani_data->item, + "fill_color_rgba", color, + "size_points", size, + NULL); /* move damnit!! */ - gnome_canvas_item_move (ani_data->item, 0.0, -2.5); + gnome_canvas_item_move (ani_data->item->parent, 0.0, -2.5); y -= 2.5; @@ -143,20 +154,33 @@ display_contributors (gpointer data) AnimationData *ani_data; static GnomeCanvasItem *contributor = NULL; + static GnomeCanvasItem *contributor_rect = NULL; + static GnomeCanvasItem *contributor_text = NULL; if (!contributors[contrib_i]) { g_signal_handlers_disconnect_by_func (canvas, canvas_button_press_event, - contributor); + contributor_text); return FALSE; } if (!contributor) { gchar *text; - text = g_strdup_printf ("<b>%s</b>", contributors[contrib_i]); contributor = gnome_canvas_item_new (GNOME_CANVAS_GROUP (canvas->root), + gnome_canvas_group_get_type (), + NULL); + + contributor_rect = + gnome_canvas_item_new (GNOME_CANVAS_GROUP (contributor), + gnome_canvas_rect_get_type (), + "fill_color", "White", + NULL); + + text = g_strdup_printf ("<b>%s</b>", contributors[contrib_i]); + contributor_text = + gnome_canvas_item_new (GNOME_CANVAS_GROUP (contributor), gnome_canvas_text_get_type (), "markup", text, "anchor", GTK_ANCHOR_CENTER, @@ -165,7 +189,8 @@ display_contributors (gpointer data) g_free (text); g_signal_connect (canvas, "button_press_event", - G_CALLBACK (canvas_button_press_event), contributor); + G_CALLBACK (canvas_button_press_event), + contributor_text); gnome_canvas_item_move (contributor, canvas_width / 2.0, @@ -174,7 +199,7 @@ display_contributors (gpointer data) gchar *text; text = g_strdup_printf ("<b>%s</b>", contributors[contrib_i]); - gnome_canvas_item_set (contributor, + gnome_canvas_item_set (contributor_text, "markup", text, "fill_color_rgba", 0xffffffff, "size_points", 0.0, @@ -183,13 +208,12 @@ display_contributors (gpointer data) gnome_canvas_item_move (contributor, 0.0, canvas_height - version_info_height - contributor->y1); - gnome_canvas_update_now (canvas); } ani_data = g_new0 (AnimationData, 1); ani_data->canvas = canvas; - ani_data->item = contributor; + ani_data->item = contributor_text; g_timeout_add (75, animate_contributor, ani_data); contrib_i++; @@ -836,7 +860,7 @@ create_canvas (void) href = href_item_new (root, _("About GNOME"), - "http://www.gnome.org/about.html", + "http://www.gnome.org/intro/findout.html", ¤t_x, ¤t_y); /* make a nice guess for the dot delta */ @@ -846,16 +870,18 @@ create_canvas (void) /* draw a dot */ item = create_dot (root, ¤t_x, ¤t_y, dot_delta); - /* and more items on a likewise way */ + /* and more items on a likewise way (FIXME: update the links + * if the new website ever comes online) + */ href = href_item_new (root, _("Download"), - "http://www.gnome.org/download.html", + "http://www.gnome.org/start/2.2/", ¤t_x, ¤t_y); item = create_dot (root, ¤t_x, ¤t_y, dot_delta); href = href_item_new (root, _("Users"), - "http://www.gnome.org/users.html", + "http://www.gnome.org/", ¤t_x, ¤t_y); item = create_dot (root, ¤t_x, ¤t_y, dot_delta); @@ -873,7 +899,7 @@ create_canvas (void) href = href_item_new (root, _("Contact"), - "http://www.gnome.org/contact.html", + "http://mail.gnome.org/", ¤t_x, ¤t_y); /* resize */ |