From: tweenk Date: Sat, 18 Apr 2009 01:24:27 +0000 (+0000) Subject: Fix most icons in the geometry tool X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a036e2bd5d781c1d15be552648a9d1ea9245a2c9;p=inkscape.git Fix most icons in the geometry tool --- diff --git a/share/icons/hicolor/16x16/actions/Makefile.am b/share/icons/hicolor/16x16/actions/Makefile.am index 1e385412c..10b722554 100644 --- a/share/icons/hicolor/16x16/actions/Makefile.am +++ b/share/icons/hicolor/16x16/actions/Makefile.am @@ -60,6 +60,13 @@ icons_DATA = \ draw-ellipse-whole.png \ draw-eraser.png \ draw-freehand.png \ + draw-geometry-angle-bisector.png \ + draw-geometry-circle-from-radius.png \ + draw-geometry-circle-from-three-points.png \ + draw-geometry-line-parallel.png \ + draw-geometry-line-perpendicular.png \ + draw-geometry-line-segment.png \ + draw-geometry-symmetry.png \ draw-path.png \ draw-polygon.png \ draw-polygon-star.png \ @@ -142,6 +149,7 @@ icons_DATA = \ path-tweak-roughen.png \ path-tweak-shrink.png \ path-union.png \ + randomize.png \ rectangle-make-corners-sharp.png \ selection-bottom.png \ selection-lower.png \ @@ -150,6 +158,7 @@ icons_DATA = \ selection-move-to-layer-below.png \ selection-raise.png \ selection-top.png \ + show-bounding-box.png \ show-dialogs.png \ show-grid.png \ show-guides.png \ diff --git a/share/icons/hicolor/16x16/actions/draw-geometry.png b/share/icons/hicolor/16x16/actions/draw-geometry.png new file mode 100644 index 000000000..2865b25e0 Binary files /dev/null and b/share/icons/hicolor/16x16/actions/draw-geometry.png differ diff --git a/share/icons/hicolor/16x16/actions/show-bounding-box.png b/share/icons/hicolor/16x16/actions/show-bounding-box.png new file mode 100644 index 000000000..e3157a831 Binary files /dev/null and b/share/icons/hicolor/16x16/actions/show-bounding-box.png differ diff --git a/share/icons/hicolor/16x16/status/draw-geometry-angle-bisector.png b/share/icons/hicolor/16x16/status/draw-geometry-angle-bisector.png new file mode 100644 index 000000000..fe86f8177 Binary files /dev/null and b/share/icons/hicolor/16x16/status/draw-geometry-angle-bisector.png differ diff --git a/share/icons/hicolor/16x16/status/draw-geometry-circle-from-radius.png b/share/icons/hicolor/16x16/status/draw-geometry-circle-from-radius.png new file mode 100644 index 000000000..1a7c2f3aa Binary files /dev/null and b/share/icons/hicolor/16x16/status/draw-geometry-circle-from-radius.png differ diff --git a/share/icons/hicolor/16x16/status/draw-geometry-circle-from-three-points.png b/share/icons/hicolor/16x16/status/draw-geometry-circle-from-three-points.png new file mode 100644 index 000000000..a7f702f97 Binary files /dev/null and b/share/icons/hicolor/16x16/status/draw-geometry-circle-from-three-points.png differ diff --git a/share/icons/hicolor/16x16/status/draw-geometry-inactive.png b/share/icons/hicolor/16x16/status/draw-geometry-inactive.png new file mode 100644 index 000000000..e279569f0 Binary files /dev/null and b/share/icons/hicolor/16x16/status/draw-geometry-inactive.png differ diff --git a/share/icons/hicolor/16x16/status/draw-geometry-line-parallel.png b/share/icons/hicolor/16x16/status/draw-geometry-line-parallel.png new file mode 100644 index 000000000..de6a500d4 Binary files /dev/null and b/share/icons/hicolor/16x16/status/draw-geometry-line-parallel.png differ diff --git a/share/icons/hicolor/16x16/status/draw-geometry-line-perpendicular.png b/share/icons/hicolor/16x16/status/draw-geometry-line-perpendicular.png new file mode 100644 index 000000000..ed96db694 Binary files /dev/null and b/share/icons/hicolor/16x16/status/draw-geometry-line-perpendicular.png differ diff --git a/share/icons/hicolor/16x16/status/draw-geometry-line-segment.png b/share/icons/hicolor/16x16/status/draw-geometry-line-segment.png new file mode 100644 index 000000000..099211f78 Binary files /dev/null and b/share/icons/hicolor/16x16/status/draw-geometry-line-segment.png differ diff --git a/share/icons/hicolor/16x16/status/draw-geometry-mirror.png b/share/icons/hicolor/16x16/status/draw-geometry-mirror.png new file mode 100644 index 000000000..f81208b89 Binary files /dev/null and b/share/icons/hicolor/16x16/status/draw-geometry-mirror.png differ diff --git a/share/icons/hicolor/24x24/actions/Makefile.am b/share/icons/hicolor/24x24/actions/Makefile.am index 88b1f5047..452562436 100644 --- a/share/icons/hicolor/24x24/actions/Makefile.am +++ b/share/icons/hicolor/24x24/actions/Makefile.am @@ -60,6 +60,13 @@ icons_DATA = \ draw-ellipse-whole.png \ draw-eraser.png \ draw-freehand.png \ + draw-geometry-angle-bisector.png \ + draw-geometry-circle-from-radius.png \ + draw-geometry-circle-from-three-points.png \ + draw-geometry-line-parallel.png \ + draw-geometry-line-perpendicular.png \ + draw-geometry-line-segment.png \ + draw-geometry-symmetry.png \ draw-path.png \ draw-polygon.png \ draw-polygon-star.png \ @@ -142,6 +149,7 @@ icons_DATA = \ path-tweak-roughen.png \ path-tweak-shrink.png \ path-union.png \ + randomize.png \ rectangle-make-corners-sharp.png \ selection-bottom.png \ selection-lower.png \ @@ -150,6 +158,7 @@ icons_DATA = \ selection-move-to-layer-below.png \ selection-raise.png \ selection-top.png \ + show-bounding-box.png \ show-dialogs.png \ show-grid.png \ show-guides.png \ diff --git a/share/icons/hicolor/24x24/actions/draw-geometry.png b/share/icons/hicolor/24x24/actions/draw-geometry.png new file mode 100644 index 000000000..db46125f5 Binary files /dev/null and b/share/icons/hicolor/24x24/actions/draw-geometry.png differ diff --git a/share/icons/hicolor/24x24/actions/show-bounding-box.png b/share/icons/hicolor/24x24/actions/show-bounding-box.png new file mode 100644 index 000000000..f40d1d717 Binary files /dev/null and b/share/icons/hicolor/24x24/actions/show-bounding-box.png differ diff --git a/share/icons/hicolor/24x24/status/draw-geometry-angle-bisector.png b/share/icons/hicolor/24x24/status/draw-geometry-angle-bisector.png new file mode 100644 index 000000000..69f0b6b7d Binary files /dev/null and b/share/icons/hicolor/24x24/status/draw-geometry-angle-bisector.png differ diff --git a/share/icons/hicolor/24x24/status/draw-geometry-circle-from-radius.png b/share/icons/hicolor/24x24/status/draw-geometry-circle-from-radius.png new file mode 100644 index 000000000..e42143291 Binary files /dev/null and b/share/icons/hicolor/24x24/status/draw-geometry-circle-from-radius.png differ diff --git a/share/icons/hicolor/24x24/status/draw-geometry-circle-from-three-points.png b/share/icons/hicolor/24x24/status/draw-geometry-circle-from-three-points.png new file mode 100644 index 000000000..8e323a7a6 Binary files /dev/null and b/share/icons/hicolor/24x24/status/draw-geometry-circle-from-three-points.png differ diff --git a/share/icons/hicolor/24x24/status/draw-geometry-inactive.png b/share/icons/hicolor/24x24/status/draw-geometry-inactive.png new file mode 100644 index 000000000..16703acb0 Binary files /dev/null and b/share/icons/hicolor/24x24/status/draw-geometry-inactive.png differ diff --git a/share/icons/hicolor/24x24/status/draw-geometry-line-parallel.png b/share/icons/hicolor/24x24/status/draw-geometry-line-parallel.png new file mode 100644 index 000000000..7002671b7 Binary files /dev/null and b/share/icons/hicolor/24x24/status/draw-geometry-line-parallel.png differ diff --git a/share/icons/hicolor/24x24/status/draw-geometry-line-perpendicular.png b/share/icons/hicolor/24x24/status/draw-geometry-line-perpendicular.png new file mode 100644 index 000000000..062f7c0d6 Binary files /dev/null and b/share/icons/hicolor/24x24/status/draw-geometry-line-perpendicular.png differ diff --git a/share/icons/hicolor/24x24/status/draw-geometry-line-segment.png b/share/icons/hicolor/24x24/status/draw-geometry-line-segment.png new file mode 100644 index 000000000..dbc918781 Binary files /dev/null and b/share/icons/hicolor/24x24/status/draw-geometry-line-segment.png differ diff --git a/share/icons/hicolor/24x24/status/draw-geometry-mirror.png b/share/icons/hicolor/24x24/status/draw-geometry-mirror.png new file mode 100644 index 000000000..7ebd7f7a0 Binary files /dev/null and b/share/icons/hicolor/24x24/status/draw-geometry-mirror.png differ diff --git a/share/icons/hicolor/scalable/actions/Makefile.am b/share/icons/hicolor/scalable/actions/Makefile.am index 19dc59a74..27ace5faa 100644 --- a/share/icons/hicolor/scalable/actions/Makefile.am +++ b/share/icons/hicolor/scalable/actions/Makefile.am @@ -60,6 +60,7 @@ icons_DATA = \ draw-ellipse-whole.svg \ draw-eraser.svg \ draw-freehand.svg \ + draw-geometry.svg \ draw-path.svg \ draw-polygon-star.svg \ draw-polygon.svg \ @@ -151,6 +152,7 @@ icons_DATA = \ selection-move-to-layer-below.svg \ selection-raise.svg \ selection-top.svg \ + show-bounding-box.svg \ show-dialogs.svg \ show-grid.svg \ show-guides.svg \ diff --git a/share/icons/hicolor/scalable/actions/draw-geometry.svg b/share/icons/hicolor/scalable/actions/draw-geometry.svg new file mode 100644 index 000000000..aa1ca90a0 --- /dev/null +++ b/share/icons/hicolor/scalable/actions/draw-geometry.svg @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/scalable/actions/show-bounding-box.svg b/share/icons/hicolor/scalable/actions/show-bounding-box.svg new file mode 100644 index 000000000..c46931a5a --- /dev/null +++ b/share/icons/hicolor/scalable/actions/show-bounding-box.svg @@ -0,0 +1,64 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/share/icons/hicolor/scalable/status/Makefile.am b/share/icons/hicolor/scalable/status/Makefile.am index e77495090..b8aa8285e 100644 --- a/share/icons/hicolor/scalable/status/Makefile.am +++ b/share/icons/hicolor/scalable/status/Makefile.am @@ -11,6 +11,14 @@ icons_DATA = \ connector-avoid.svg \ connector-ignore.svg \ draw-eraser-delete-objects.svg \ + draw-geometry-angle-bisector.svg \ + draw-geometry-circle-from-radius.svg \ + draw-geometry-circle-from-three-points.svg \ + draw-geometry-inactive.svg \ + draw-geometry-line-parallel.svg \ + draw-geometry-line-perpendicular.svg \ + draw-geometry-line-segment.svg \ + draw-geometry-mirror.svg \ draw-trace-background.svg \ draw-use-pressure.svg \ draw-use-tilt.svg \ diff --git a/share/icons/hicolor/scalable/status/draw-geometry-angle-bisector.svg b/share/icons/hicolor/scalable/status/draw-geometry-angle-bisector.svg new file mode 100644 index 000000000..319970564 --- /dev/null +++ b/share/icons/hicolor/scalable/status/draw-geometry-angle-bisector.svg @@ -0,0 +1,71 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/share/icons/hicolor/scalable/status/draw-geometry-circle-from-radius.svg b/share/icons/hicolor/scalable/status/draw-geometry-circle-from-radius.svg new file mode 100644 index 000000000..4bfea854b --- /dev/null +++ b/share/icons/hicolor/scalable/status/draw-geometry-circle-from-radius.svg @@ -0,0 +1,80 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/share/icons/hicolor/scalable/status/draw-geometry-circle-from-three-points.svg b/share/icons/hicolor/scalable/status/draw-geometry-circle-from-three-points.svg new file mode 100644 index 000000000..60e67f577 --- /dev/null +++ b/share/icons/hicolor/scalable/status/draw-geometry-circle-from-three-points.svg @@ -0,0 +1,86 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/scalable/status/draw-geometry-inactive.svg b/share/icons/hicolor/scalable/status/draw-geometry-inactive.svg new file mode 100644 index 000000000..98d20949f --- /dev/null +++ b/share/icons/hicolor/scalable/status/draw-geometry-inactive.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/share/icons/hicolor/scalable/status/draw-geometry-line-parallel.svg b/share/icons/hicolor/scalable/status/draw-geometry-line-parallel.svg new file mode 100644 index 000000000..173145ca8 --- /dev/null +++ b/share/icons/hicolor/scalable/status/draw-geometry-line-parallel.svg @@ -0,0 +1,71 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/share/icons/hicolor/scalable/status/draw-geometry-line-perpendicular.svg b/share/icons/hicolor/scalable/status/draw-geometry-line-perpendicular.svg new file mode 100644 index 000000000..6bb4b5a65 --- /dev/null +++ b/share/icons/hicolor/scalable/status/draw-geometry-line-perpendicular.svg @@ -0,0 +1,71 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/share/icons/hicolor/scalable/status/draw-geometry-line-segment.svg b/share/icons/hicolor/scalable/status/draw-geometry-line-segment.svg new file mode 100644 index 000000000..ea50fe13d --- /dev/null +++ b/share/icons/hicolor/scalable/status/draw-geometry-line-segment.svg @@ -0,0 +1,84 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/share/icons/hicolor/scalable/status/draw-geometry-mirror.svg b/share/icons/hicolor/scalable/status/draw-geometry-mirror.svg new file mode 100644 index 000000000..12564b907 --- /dev/null +++ b/share/icons/hicolor/scalable/status/draw-geometry-mirror.svg @@ -0,0 +1,71 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/share/icons/icons.svg b/share/icons/icons.svg index fb8301ffb..c36c2d5db 100644 --- a/share/icons/icons.svg +++ b/share/icons/icons.svg @@ -8,7 +8,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - inkscape:version="0.46+devel r21147 custom" + inkscape:version="0.46+devel r21165 custom" sodipodi:docname="icons.svg" height="540" width="1250" @@ -4758,6 +4758,170 @@ gradientUnits="userSpaceOnUse" id="linearGradient5828" inkscape:collect="always" /> + + + + + + + + + + + + + + + + + y="201.7701" /> x="0" /> height="1250" /> style="fill:none;stroke:#5a5a5a;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0;stroke-opacity:1;stroke-dasharray:none" id="path4418-8-1-0-1" /> - - - - - inkscape:label="lpetool_show_bbox" /> id="path4418-8-1-0-1-4-4-6" /> style="color:#000000;fill:none;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline" /> + d="m 617.64905,102.88197 10.4519,-10.763857" + style="fill:none;stroke:#000000;stroke-width:4.23622561;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4.26999998;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:23.2" /> + d="M 628.25684,102.72593 617.49316,92.274104" + style="fill:none;stroke:#000000;stroke-width:4.23622561;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4.26999998;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:23.2" /> y="103.43147">none id="object-rows" y="0" x="0" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp index d3fb332e5..be465e324 100644 --- a/src/lpe-tool-context.cpp +++ b/src/lpe-tool-context.cpp @@ -54,15 +54,16 @@ void sp_lpetool_context_selection_changed(Inkscape::Selection *selection, gpoint const int num_subtools = 8; -Inkscape::LivePathEffect::EffectType lpesubtools[] = { - Inkscape::LivePathEffect::INVALID_LPE, // this must be here to account for the "all inactive" action - Inkscape::LivePathEffect::LINE_SEGMENT, - Inkscape::LivePathEffect::CIRCLE_3PTS, - Inkscape::LivePathEffect::CIRCLE_WITH_RADIUS, - Inkscape::LivePathEffect::PARALLEL, - Inkscape::LivePathEffect::PERP_BISECTOR, - Inkscape::LivePathEffect::ANGLE_BISECTOR, - Inkscape::LivePathEffect::MIRROR_SYMMETRY, +SubtoolEntry lpesubtools[] = { + // this must be here to account for the "all inactive" action + {Inkscape::LivePathEffect::INVALID_LPE, "draw-geometry-inactive"}, + {Inkscape::LivePathEffect::LINE_SEGMENT, "draw-geometry-line-segment"}, + {Inkscape::LivePathEffect::CIRCLE_3PTS, "draw-geometry-circle-from-three-points"}, + {Inkscape::LivePathEffect::CIRCLE_WITH_RADIUS, "draw-geometry-circle-from-radius"}, + {Inkscape::LivePathEffect::PARALLEL, "draw-geometry-line-parallel"}, + {Inkscape::LivePathEffect::PERP_BISECTOR, "draw-geometry-line-perpendicular"}, + {Inkscape::LivePathEffect::ANGLE_BISECTOR, "draw-geometry-angle-bisector"}, + {Inkscape::LivePathEffect::MIRROR_SYMMETRY, "draw-geometry-mirror"} }; static SPPenContextClass *lpetool_parent_class = 0; @@ -285,7 +286,7 @@ sp_lpetool_context_root_handler(SPEventContext *event_context, GdkEvent *event) Inkscape::Preferences *prefs = Inkscape::Preferences::get(); int mode = prefs->getInt("/tools/lpetool/mode"); - EffectType type = lpesubtools[mode]; + EffectType type = lpesubtools[mode].type; //bool over_stroke = lc->shape_editor->is_over_stroke(Geom::Point(event->button.x, event->button.y), true); @@ -365,7 +366,7 @@ sp_lpetool_context_root_handler(SPEventContext *event_context, GdkEvent *event) int lpetool_mode_to_index(Inkscape::LivePathEffect::EffectType const type) { for (int i = 0; i < num_subtools; ++i) { - if (lpesubtools[i] == type) { + if (lpesubtools[i].type == type) { return i; } } diff --git a/src/lpe-tool-context.h b/src/lpe-tool-context.h index 320fa5189..8a52ba97c 100644 --- a/src/lpe-tool-context.h +++ b/src/lpe-tool-context.h @@ -30,7 +30,12 @@ class SPLPEToolContextClass; /* This is the list of subtools from which the toolbar of the LPETool is built automatically */ extern const int num_subtools; -extern Inkscape::LivePathEffect::EffectType lpesubtools[]; +struct SubtoolEntry { + Inkscape::LivePathEffect::EffectType type; + gchar const *icon_name; +}; + +extern SubtoolEntry lpesubtools[]; enum LPEToolState { LPETOOL_STATE_PEN, diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 0f880e1be..ce2260451 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -5347,7 +5347,7 @@ static void sp_lpetool_mode_changed(EgeSelectOneAction *act, GObject *tbl) g_object_set_data(tbl, "freeze", GINT_TO_POINTER(TRUE)); gint mode = ege_select_one_action_get_active(act); - EffectType type = lpesubtools[mode]; + EffectType type = lpesubtools[mode].type; SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(desktop->event_context); bool success = lpetool_try_construction(lc, type); @@ -5566,17 +5566,17 @@ static void sp_lpetool_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActi gtk_list_store_set( model, &iter, 0, _("All inactive"), 1, _("No geometric tool is active"), - 2, _("all_inactive"), + 2, _("draw-geometry-inactive"), -1 ); Inkscape::LivePathEffect::EffectType type; for (int i = 1; i < num_subtools; ++i) { // we start with i = 1 because INVALID_LPE was already added - type = lpesubtools[i]; + type = lpesubtools[i].type; gtk_list_store_append( model, &iter ); gtk_list_store_set( model, &iter, 0, Inkscape::LivePathEffect::LPETypeConverter.get_label(type).c_str(), 1, Inkscape::LivePathEffect::LPETypeConverter.get_label(type).c_str(), - 2, Inkscape::LivePathEffect::LPETypeConverter.get_key(type).c_str(), + 2, lpesubtools[i].icon_name, -1 ); } @@ -5600,7 +5600,7 @@ static void sp_lpetool_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActi InkToggleAction* act = ink_toggle_action_new( "LPEShowBBoxAction", _("Show limiting bounding box"), _("Show bounding box (used to cut infinite lines)"), - "lpetool_show_bbox", + "show-bounding-box", Inkscape::ICON_SIZE_DECORATION ); gtk_action_group_add_action( mainActions, GTK_ACTION( act ) ); g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(lpetool_toggle_show_bbox), desktop );