[graph-gtk] Improved connecting preview line visuals
- From: Isaac Wagner <isaacbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [graph-gtk] Improved connecting preview line visuals
- Date: Fri, 27 Jul 2012 14:12:47 +0000 (UTC)
commit 049e13c2f4bd139a3814ef1b45867e78a6fd9587
Author: Isaac Wagner <isaacbw src gnome org>
Date: Fri Jul 27 09:40:57 2012 -0400
Improved connecting preview line visuals
graph-gtk/graph-gtk-view.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/graph-gtk/graph-gtk-view.c b/graph-gtk/graph-gtk-view.c
index 945ea82..0b58242 100644
--- a/graph-gtk/graph-gtk-view.c
+++ b/graph-gtk/graph-gtk-view.c
@@ -183,6 +183,13 @@ graph_gtk_view_draw(GtkWidget *widget, cairo_t* cr)
}
}
+ GSList* list;
+ for(list = view->nodes; list != NULL; list = list->next)
+ {
+ GraphGtkNode* node = (GraphGtkNode*)list->data;
+ graph_gtk_node_render(node, cr);
+ }
+
if(view->is_mouse_connecting)
{
int x, y;
@@ -191,18 +198,11 @@ graph_gtk_view_draw(GtkWidget *widget, cairo_t* cr)
cairo_move_to(cr, x, y);
cairo_line_to(cr, view->mouse_x, view->mouse_y);
- cairo_set_source_rgb(cr, 0.0, 1.0, 0.0);
- cairo_set_line_width(cr, 1.0);
+ cairo_set_source_rgb(cr, 0.0, 1, 0.0);
+ cairo_set_line_width(cr, 0.5);
cairo_stroke(cr);
}
- GSList* list;
- for(list = view->nodes; list != NULL; list = list->next)
- {
- GraphGtkNode* node = (GraphGtkNode*)list->data;
- graph_gtk_node_render(node, cr);
- }
-
return FALSE;
}
@@ -284,6 +284,8 @@ graph_gtk_view_button_released(GtkWidget* widget, GdkEventButton* event)
}
else if(self->is_mouse_connecting)
{
+ REDRAW();
+
self->is_mouse_connecting = FALSE;
GSList *nodes;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]