0
#define TEXT_Y (ICON_Y + ICON_HEIGHT + (2 * V_PADDING))
0
#define TEXT_WIDTH (MAX_WIDTH - (2 * H_PADDING))
0
#define BG_ROUND_RADIUS 24
0
@@ -188,7 +188,11 @@ on_button_enter (ClutterActor *actor,
0
ClutterColor white = { 255, 255, 255, 255 };
0
- clutter_rectangle_set_color (CLUTTER_RECTANGLE (actor), &white);
0
+ if (CLUTTER_IS_RECTANGLE (actor))
0
+ clutter_rectangle_set_color (CLUTTER_RECTANGLE (actor), &white);
0
clutter_label_set_text (CLUTTER_LABEL (info->button_tip),
0
g_object_get_data (G_OBJECT (actor), "button-tip"));
0
@@ -218,7 +222,9 @@ on_button_leave (ClutterActor *actor,
0
ClutterColor black = { 0, 0, 0, 255 };
0
- clutter_rectangle_set_color (CLUTTER_RECTANGLE (actor), &black);
0
+ if (CLUTTER_IS_RECTANGLE (actor))
0
+ clutter_rectangle_set_color (CLUTTER_RECTANGLE (actor), &black);
0
tweet_actor_animate (info->button_tip, TWEET_LINEAR, 150,
0
"opacity", tweet_interval_new (G_TYPE_UCHAR, 255, 0),
0
@@ -321,7 +327,15 @@ tweet_status_info_constructed (GObject *gobject)
0
- info->star_button = clutter_rectangle_new ();
0
+ tweet_texture_new_from_icon_name (NULL, "favorite-status", -1);
0
+ if (!info->star_button)
0
+ info->star_button = clutter_rectangle_new ();
0
+ clutter_rectangle_set_color (CLUTTER_RECTANGLE (info->star_button),
0
g_object_set_data_full (G_OBJECT (info->star_button), "button-tip",
0
g_strdup ("Favorite this update"),
0
@@ -334,7 +348,6 @@ tweet_status_info_constructed (GObject *gobject)
0
g_signal_connect (info->star_button,
0
"button-press-event", G_CALLBACK (on_button_press),
0
- clutter_rectangle_set_color (CLUTTER_RECTANGLE (info->star_button), &text_color);
0
clutter_actor_set_size (info->star_button, BUTTON_SIZE, BUTTON_SIZE);
0
clutter_actor_set_parent (info->star_button, CLUTTER_ACTOR (info));
0
clutter_actor_set_position (info->star_button,
Comments
No one has commented yet.