gegl r2724 - in trunk: . bin
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2724 - in trunk: . bin
- Date: Mon, 10 Nov 2008 22:22:38 +0000 (UTC)
Author: ok
Date: Mon Nov 10 22:22:38 2008
New Revision: 2724
URL: http://svn.gnome.org/viewvc/gegl?rev=2724&view=rev
Log:
* bin/editor.c: (cairo_gui_expose), (gui_press_event): made the pie
menu a bit more friendly.
Modified:
trunk/ChangeLog
trunk/bin/editor.c
Modified: trunk/bin/editor.c
==============================================================================
--- trunk/bin/editor.c (original)
+++ trunk/bin/editor.c Mon Nov 10 22:22:38 2008
@@ -130,7 +130,7 @@
static gchar *blank_composition =
"<gegl>"
- "<color value='white'/>"
+ "<gegl:color value='white'/>"
"</gegl>";
static void gegl_editor_update_title (void);
@@ -1125,12 +1125,26 @@
(segment+0.5)*(3.1415*2)/segments);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
- cairo_select_font_face (cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
+ cairo_save (cr);
+
+ cairo_select_font_face (cr, "DejaVu Sans", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
- cairo_set_font_size (cr, 20);
+ cairo_set_font_size (cr, 40);
cairo_text_extents (cr, tools.menu_segment_label[segment], &text_extents);
cairo_rel_move_to (cr, -text_extents.width/2, +text_extents.height/2);
cairo_show_text (cr, tools.menu_segment_label[segment]);
+
+ cairo_restore (cr);
+
+ if (segment == tools.menu_segment_active)
+ {
+ cairo_select_font_face (cr, "DejaVu Sans", CAIRO_FONT_SLANT_NORMAL,
+ CAIRO_FONT_WEIGHT_NORMAL);
+ cairo_set_font_size (cr, 15);
+ cairo_text_extents (cr, tools.menu_segment_userdata[segment], &text_extents);
+ cairo_rel_move_to (cr, -text_extents.width/2, +text_extents.height/2 + 20);
+ cairo_show_text (cr, tools.menu_segment_userdata[segment]);
+ }
}
}
@@ -1340,32 +1354,36 @@
switch (tools.state)
{
- case STATE_MOVE:
- menu_add ("paint", G_CALLBACK (do_command), "set-state strokes");
- menu_add ("path", G_CALLBACK (do_command), "set-state edit-nodes");
- menu_add ("raise", G_CALLBACK (do_command), "raise-item");
- menu_add ("lower", G_CALLBACK (do_command), "lower");
- menu_add ("width", G_CALLBACK (do_command), "set-state edit-width");
- menu_add ("remove", G_CALLBACK (do_command), "remove-item");
+ case STATE_MOVE: /* ï ï */
+ menu_add ("â", G_CALLBACK (do_command), "set-state strokes");
+ menu_add ("~", G_CALLBACK (do_command), "set-state edit-nodes");
+ menu_add ("â", G_CALLBACK (do_command), "lower");
+ menu_add ("â", G_CALLBACK (do_command), "raise-item");
+ menu_add ("â", G_CALLBACK (do_command), "remove-item");
/* check the current curve type,. */
break;
case STATE_EDIT_NODES:
menu_add ("+", G_CALLBACK (do_command), "insert-node");
- menu_add ("del", G_CALLBACK (do_command), "remove-node");
- menu_add ("--", G_CALLBACK (do_command), "help");
- menu_add ("smooth", G_CALLBACK (do_command), "help");
- menu_add ("spiro", G_CALLBACK (do_command), "help");
- menu_add ("move", G_CALLBACK (do_command), "set-state move");
+ menu_add ("â", G_CALLBACK (do_command), "remove-node");
+ menu_add ("â", G_CALLBACK (do_command), "set-state edit-width");
+ menu_add ("â", G_CALLBACK (do_command), "set-state move");
break;
- case STATE_EDIT_WIDTH:
case STATE_STROKES:
+ menu_add ("~", G_CALLBACK (do_command), "set-state edit-nodes");
+ menu_add ("â", G_CALLBACK (do_command), "set-state move");
+ break;
+ case STATE_EDIT_WIDTH:
+ menu_add ("â", G_CALLBACK (do_command), "set-state move");
+ menu_add ("â", G_CALLBACK (do_command), "set-state strokes");
+ break;
case STATE_EDIT_OPACITY:
+ menu_add ("â", G_CALLBACK (do_command), "set-state move");
+ menu_add ("â", G_CALLBACK (do_command), "set-state strokes");
+ break;
case STATE_FREE_REPLACE:
default:
- menu_add ("paint", G_CALLBACK (do_command), "set-state strokes");
- menu_add ("path", G_CALLBACK (do_command), "set-state edit-nodes");
- menu_add ("width", G_CALLBACK (do_command), "set-state edit-width");
- menu_add ("move", G_CALLBACK (do_command), "set-state move");
+ menu_add ("â", G_CALLBACK (do_command), "set-state move");
+ menu_add ("â", G_CALLBACK (do_command), "set-state strokes");
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]