From 47c3e89671c6de12fc08977db56ed3de227807a4 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sun, 27 Jan 2019 22:37:03 +0100 Subject: adding symbols --- .../symbolic/actions/bend-path-symbolic.svg | 87 +++++++ .../symbolic/actions/bounding-box-symbolic.svg | 87 +++++++ .../symbolic/actions/construct-grid-symbolic.svg | 91 +++++++ .../symbolic/actions/ellipse-5pts-symbolic.svg | 87 +++++++ .../hicolor/symbolic/actions/envelope-symbolic.svg | 91 +++++++ .../symbolic/actions/experimental-symbolic.svg | 87 +++++++ .../hicolor/symbolic/actions/hatches-symbolic.svg | 87 +++++++ .../hicolor/symbolic/actions/knot-symbolic.svg | 87 +++++++ .../symbolic/actions/mirror-symmetry-symbolic.svg | 87 +++++++ .../actions/perspective-envelope-symbolic.svg | 91 +++++++ .../symbolic/actions/powerstroke-symbolic.svg | 91 +++++++ .../symbolic/actions/show-handles-symbolic.svg | 87 +++++++ .../hicolor/symbolic/actions/sketch-symbolic.svg | 87 +++++++ .../hicolor/symbolic/actions/spiro-symbolic.svg | 87 +++++++ .../symbolic/actions/transform-2pts-symbolic.svg | 87 +++++++ .../hicolor/symbolic/actions/vonkoch-symbolic.svg | 87 +++++++ share/ui/style.css | 261 +++++++++++++-------- src/desktop.cpp | 6 - src/live_effects/effect-enum.h | 5 - src/live_effects/effect.cpp | 65 ----- src/ui/dialog/livepatheffect-add.cpp | 51 +--- src/ui/dialog/livepatheffect-add.h | 5 +- 22 files changed, 1580 insertions(+), 221 deletions(-) create mode 100644 share/icons/hicolor/symbolic/actions/bend-path-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/bounding-box-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/construct-grid-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/ellipse-5pts-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/envelope-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/experimental-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/hatches-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/knot-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/mirror-symmetry-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/perspective-envelope-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/powerstroke-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/show-handles-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/sketch-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/spiro-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/transform-2pts-symbolic.svg create mode 100644 share/icons/hicolor/symbolic/actions/vonkoch-symbolic.svg diff --git a/share/icons/hicolor/symbolic/actions/bend-path-symbolic.svg b/share/icons/hicolor/symbolic/actions/bend-path-symbolic.svg new file mode 100644 index 000000000..7e741db26 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/bend-path-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/bounding-box-symbolic.svg b/share/icons/hicolor/symbolic/actions/bounding-box-symbolic.svg new file mode 100644 index 000000000..079c04c1f --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/bounding-box-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/construct-grid-symbolic.svg b/share/icons/hicolor/symbolic/actions/construct-grid-symbolic.svg new file mode 100644 index 000000000..2cb195f1e --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/construct-grid-symbolic.svg @@ -0,0 +1,91 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/ellipse-5pts-symbolic.svg b/share/icons/hicolor/symbolic/actions/ellipse-5pts-symbolic.svg new file mode 100644 index 000000000..78d7a25b0 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/ellipse-5pts-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/envelope-symbolic.svg b/share/icons/hicolor/symbolic/actions/envelope-symbolic.svg new file mode 100644 index 000000000..a5b3e7302 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/envelope-symbolic.svg @@ -0,0 +1,91 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/experimental-symbolic.svg b/share/icons/hicolor/symbolic/actions/experimental-symbolic.svg new file mode 100644 index 000000000..acb8bdd30 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/experimental-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/hatches-symbolic.svg b/share/icons/hicolor/symbolic/actions/hatches-symbolic.svg new file mode 100644 index 000000000..7edd30fda --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/hatches-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/knot-symbolic.svg b/share/icons/hicolor/symbolic/actions/knot-symbolic.svg new file mode 100644 index 000000000..ef06d130c --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/knot-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/mirror-symmetry-symbolic.svg b/share/icons/hicolor/symbolic/actions/mirror-symmetry-symbolic.svg new file mode 100644 index 000000000..8a2996af5 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/mirror-symmetry-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/perspective-envelope-symbolic.svg b/share/icons/hicolor/symbolic/actions/perspective-envelope-symbolic.svg new file mode 100644 index 000000000..332cd31d9 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/perspective-envelope-symbolic.svg @@ -0,0 +1,91 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/powerstroke-symbolic.svg b/share/icons/hicolor/symbolic/actions/powerstroke-symbolic.svg new file mode 100644 index 000000000..1f06afb55 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/powerstroke-symbolic.svg @@ -0,0 +1,91 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/show-handles-symbolic.svg b/share/icons/hicolor/symbolic/actions/show-handles-symbolic.svg new file mode 100644 index 000000000..82f23db1d --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/show-handles-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/sketch-symbolic.svg b/share/icons/hicolor/symbolic/actions/sketch-symbolic.svg new file mode 100644 index 000000000..7359e017c --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/sketch-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/spiro-symbolic.svg b/share/icons/hicolor/symbolic/actions/spiro-symbolic.svg new file mode 100644 index 000000000..647c0a857 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/spiro-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/transform-2pts-symbolic.svg b/share/icons/hicolor/symbolic/actions/transform-2pts-symbolic.svg new file mode 100644 index 000000000..13f2c55b3 --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/transform-2pts-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/icons/hicolor/symbolic/actions/vonkoch-symbolic.svg b/share/icons/hicolor/symbolic/actions/vonkoch-symbolic.svg new file mode 100644 index 000000000..4d5c193cd --- /dev/null +++ b/share/icons/hicolor/symbolic/actions/vonkoch-symbolic.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + LiveEffect Icons proposal + 13 Jan 2019 + + + Ramón Miranda + + + + + see the license tab + + + + + icon ui + + + This is a contribution with Inkscape Project from +Ramon Miranda www.ramonmiranda.com (design and SVG file) +Jabiertxo (SVG stuff to integrate them in UI) + + + + + + + + + - + + + + Ramon Miranda +Jabier Arraiza + + + + + + + + + + + + + + + diff --git a/share/ui/style.css b/share/ui/style.css index 93439b95e..c637d8a12 100644 --- a/share/ui/style.css +++ b/share/ui/style.css @@ -190,108 +190,161 @@ outline-style : none; } - - SPRuler { - background-color: @theme_bg_color; - color: @theme_fg_color; - } - - ruler-widget { - background-color: @theme_bg_color; - color: @theme_fg_color; - } - - /* The actual canvas (Inkscape's drawing area). */ - SPCanvas { - background-color: white; - } - - combobox window.popup scrolledwindow treeview separator { - } - - #font_selector_family { - } - - #TextFontFamilyAction_combobox { - -GtkComboBox-appears-as-list: true; - } - - #LockGuides, - #StickyZoom, - #CMS_Adjust { - padding: 0; - } - - /* Keep palette scrollbar from generating warnings. */ - #PreviewHolderScroller .vertical slider { - min-height: 15px; - } - - /* Override minimum size of container children for palette. */ - #ColorItemPreview { - min-height: 5px; - min-width: 5px; - } - - /* Reduce width of Fill and Stroke dialog */ - #ColorModeButton { - padding-left: 0; - padding-right: 0; - } - - /* Reduce width of +/- buttons. */ - .up, .down { - padding-left: 0; - padding-right: 0; - } - - /* InkSpinScale */ - #InkSpinScale { - background : @theme_bg_color; - border : 1px black; - border-radius: 3px; - padding: 0px; - } - - #InkSpinScale spinbutton { - border-color: #eee; - border-width: 0 0 0 0; - border-radius: 0 3px 3px 0; - box-shadow: none; - padding: 0 0 0 1px; - min-height : 10px; - } - - /* Hide slider */ - #InkSpinScale slider { - background: none; - border: none; - outline: none; - min-width: 0px; - min-height: 0px; - padding: 0px; - margin: 0px; - } - - #InkSpinScale slider, #InkSpinScale highlight { - border-top-right-radius : 0; - border-bottom-right-radius : 0; - } - - #InkSpinScale scale { - padding: 0px; - } - - #InkSpinScale trough { - min-height: 30px; - } - - #InkSpinScale box.active { - box-shadow: 0 0 0 1px rgb(74,144,217); - } - - #InkSpinScale spinbutton entry { - padding : 0 ; - outline-style : none; - } +GtkSpinButton entry { + padding-left: 2px; + padding-right:0; +} + +spinbutton entry { + padding-left: 2px; + padding-right:0; +} + +GtkSpinButton undershoot { + outline-style : none; +} + +spinbutton undershoot { + outline-style : none; +} + +.lpeinfo{ + font-size:16px; + padding:20px; +} +#lpedialogselector, +#lpedialogselector .frame, +#lpedialogselector .searchbar { + border-bottom-width:0; + border-top-width:0; + outline-width:0; + border-left-width:0; + border-right-width:0; +} + +#lpeflow GtkFlowBoxChild, +#lpeflow flowboxchild{ + border-width:0px; + border-radius:6px; + margin:10px; + margin-bottom:30px; + padding-bottom:10px; +} + +#lpeflow GtkFlowBoxChild.lpeactive, +#lpeflow flowboxchild.lpeactive{ + margin-bottom:0px; + padding-bottom:10px; + outline:none; +} + + +#LPEDialogSelector .frame{ + border-width:0; +} + +SPRuler { + background-color: @theme_bg_color; + color: @theme_fg_color; +} + +ruler-widget { + background-color: @theme_bg_color; + color: @theme_fg_color; +} + +/* The actual canvas (Inkscape's drawing area). */ +SPCanvas { + background-color: white; +} + +combobox window.popup scrolledwindow treeview separator { +} + +#font_selector_family { +} + +#TextFontFamilyAction_combobox { + -GtkComboBox-appears-as-list: true; +} + +#LockGuides, +#StickyZoom, +#CMS_Adjust { + padding: 0; +} + +/* Keep palette scrollbar from generating warnings. */ +#PreviewHolderScroller .vertical slider { + min-height: 15px; +} + +/* Override minimum size of container children for palette. */ +#ColorItemPreview { + min-height: 5px; + min-width: 5px; +} + +/* Reduce width of Fill and Stroke dialog */ +#ColorModeButton { + padding-left: 0; + padding-right: 0; +} + +/* Reduce width of +/- buttons. */ +.up, .down { + padding-left: 0; + padding-right: 0; +} + +/* InkSpinScale */ +#InkSpinScale { + background : @theme_bg_color; + border : 1px black; + border-radius: 3px; + padding: 0px; +} + +#InkSpinScale spinbutton { + border-color: #eee; + border-width: 0 0 0 0; + border-radius: 0 3px 3px 0; + box-shadow: none; + padding: 0 0 0 1px; + min-height : 10px; +} + +/* Hide slider */ +#InkSpinScale slider { + background: none; + border: none; + outline: none; + min-width: 0px; + min-height: 0px; + padding: 0px; + margin: 0px; +} + +#InkSpinScale slider, #InkSpinScale highlight { + border-top-right-radius : 0; + border-bottom-right-radius : 0; +} + +#InkSpinScale scale { + padding: 0px; +} + +#InkSpinScale trough { + min-height: 30px; +} + +#InkSpinScale box.active { + box-shadow: 0 0 0 1px rgb(74,144,217); +} + +#InkSpinScale spinbutton entry { + padding : 0 ; + outline-style : none; +} + diff --git a/src/desktop.cpp b/src/desktop.cpp index 2b1a1a24f..52abef1f3 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1294,12 +1294,6 @@ SPDesktop::is_iconified() return 0!=(window_state & GDK_WINDOW_STATE_ICONIFIED); } -bool -SPDesktop::is_darktheme() -{ - return getToplevel()->get_style_context()->has_class("dark"); -} - void SPDesktop::iconify() { diff --git a/src/live_effects/effect-enum.h b/src/live_effects/effect-enum.h index 97c3cda9a..2b9b2e25e 100644 --- a/src/live_effects/effect-enum.h +++ b/src/live_effects/effect-enum.h @@ -78,10 +78,6 @@ enum EffectType { INVALID_LPE // This must be last (I made it such that it is not needed anymore I think..., Don't trust on it being last. - johan) }; -<<<<<<< HEAD -extern const Util::EnumData LPETypeData[]; /// defined in effect.cpp -extern const Util::EnumDataConverter LPETypeConverter; /// defined in effect.cpp -======= template struct EnumEffectData { E id; @@ -983,7 +979,6 @@ const EnumEffectData LPETypeData[] = { extern const EnumEffectData LPETypeData[]; /// defined in effect.cpp extern const EnumEffectDataConverter LPETypeConverter; /// defined in effect.cpp ->>>>>>> fixing coding style and translation and merge from master } //namespace LivePathEffect } //namespace Inkscape diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index dfad38e3a..1414932ec 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -94,71 +94,6 @@ namespace Inkscape { namespace LivePathEffect { -const Util::EnumData LPETypeData[] = { - // {constant defined in effect-enum.h, N_("name of your effect"), "name of your effect in SVG"} -/* 0.46 */ - {BEND_PATH, N_("Bend"), "bend_path"}, - {GEARS, N_("Gears"), "gears"}, - {PATTERN_ALONG_PATH, N_("Pattern Along Path"), "skeletal"}, // for historic reasons, this effect is called skeletal(strokes) in Inkscape:SVG - {CURVE_STITCH, N_("Stitch Sub-Paths"), "curvestitching"}, -/* 0.47 */ - {VONKOCH, N_("VonKoch"), "vonkoch"}, - {KNOT, N_("Knot"), "knot"}, - {CONSTRUCT_GRID, N_("Construct grid"), "construct_grid"}, - {SPIRO, N_("Spiro spline"), "spiro"}, - {ENVELOPE, N_("Envelope Deformation"), "envelope"}, - {INTERPOLATE, N_("Interpolate Sub-Paths"), "interpolate"}, - {ROUGH_HATCHES, N_("Hatches (rough)"), "rough_hatches"}, - {SKETCH, N_("Sketch"), "sketch"}, - {RULER, N_("Ruler"), "ruler"}, -/* 0.91 */ - {POWERSTROKE, N_("Power stroke"), "powerstroke"}, - {CLONE_ORIGINAL, N_("Clone original"), "clone_original"}, -/* 0.92 */ - {SIMPLIFY, N_("Simplify"), "simplify"}, - {LATTICE2, N_("Lattice Deformation 2"), "lattice2"}, - {PERSPECTIVE_ENVELOPE, N_("Perspective/Envelope"), "perspective-envelope"}, //TODO:Wrong name with "-" - {INTERPOLATE_POINTS, N_("Interpolate points"), "interpolate_points"}, - {TRANSFORM_2PTS, N_("Transform by 2 points"), "transform_2pts"}, - {SHOW_HANDLES, N_("Show handles"), "show_handles"}, - {ROUGHEN, N_("Roughen"), "roughen"}, - {BSPLINE, N_("BSpline"), "bspline"}, - {JOIN_TYPE, N_("Join type"), "join_type"}, - {TAPER_STROKE, N_("Taper stroke"), "taper_stroke"}, - {MIRROR_SYMMETRY, N_("Mirror symmetry"), "mirror_symmetry"}, - {COPY_ROTATE, N_("Rotate copies"), "copy_rotate"}, -/* Ponyscape -> Inkscape 0.92*/ - {ATTACH_PATH, N_("Attach path"), "attach_path"}, - {FILL_BETWEEN_STROKES, N_("Fill between strokes"), "fill_between_strokes"}, - {FILL_BETWEEN_MANY, N_("Fill between many"), "fill_between_many"}, - {ELLIPSE_5PTS, N_("Ellipse by 5 points"), "ellipse_5pts"}, - {BOUNDING_BOX, N_("Bounding Box"), "bounding_box"}, -/* 0.93 */ - {MEASURE_SEGMENTS, N_("Measure Segments"), "measure_segments"}, - {FILLET_CHAMFER, N_("Fillet/Chamfer"), "fillet_chamfer"}, - {BOOL_OP, N_("Boolean operation"), "bool_op"}, - {EMBRODERY_STITCH, N_("Embroidery stitch"), "embrodery_stitch"}, - {POWERCLIP, N_("Power clip"), "powerclip"}, - {POWERMASK, N_("Power mask"), "powermask"}, - {PTS2ELLIPSE, N_("Ellipse from points"), "pts2ellipse"}, - {OFFSET, N_("Offset"), "offset"}, - {DASH_STROKE, N_("Dash Stroke"), "dash_stroke"}, -#ifdef LPE_ENABLE_TEST_EFFECTS - {DOEFFECTSTACK_TEST, N_("doEffect stack test"), "doeffectstacktest"}, - {ANGLE_BISECTOR, N_("Angle bisector"), "angle_bisector"}, - {CIRCLE_WITH_RADIUS, N_("Circle (by center and radius)"), "circle_with_radius"}, - {CIRCLE_3PTS, N_("Circle by 3 points"), "circle_3pts"}, - {DYNASTROKE, N_("Dynamic stroke"), "dynastroke"}, - {EXTRUDE, N_("Extrude"), "extrude"}, - {LATTICE, N_("Lattice Deformation"), "lattice"}, - {LINE_SEGMENT, N_("Line Segment"), "line_segment"}, - {PARALLEL, N_("Parallel"), "parallel"}, - {PATH_LENGTH, N_("Path length"), "path_length"}, - {PERP_BISECTOR, N_("Perpendicular bisector"), "perp_bisector"}, - {RECURSIVE_SKELETON, N_("Recursive skeleton"), "recursive_skeleton"}, - {TANGENT_TO_CURVE, N_("Tangent to curve"), "tangent_to_curve"}, - {TEXT_LABEL, N_("Text label"), "text_label"}, -#endif const EnumEffectDataConverter LPETypeConverter(LPETypeData, sizeof(LPETypeData) / sizeof(*LPETypeData)); diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp index b11ee66b7..886dbb38f 100644 --- a/src/ui/dialog/livepatheffect-add.cpp +++ b/src/ui/dialog/livepatheffect-add.cpp @@ -150,28 +150,22 @@ bool LivePathEffectAdd::on_filter(Gtk::FlowBoxChild *child) return false; } - mainVBox->pack_start(scrolled_window, true, true); - add_action_widget(close_button, Gtk::RESPONSE_CLOSE); - add_action_widget(add_button, Gtk::RESPONSE_APPLY); - - - /** - * Signal handlers - */ - effectlist_treeview.signal_button_press_event().connect_notify( sigc::mem_fun(*this, &LivePathEffectAdd::onButtonEvent) ); - effectlist_treeview.signal_key_press_event().connect_notify(sigc::mem_fun(*this, &LivePathEffectAdd::onKeyEvent)); - close_button.signal_clicked().connect(sigc::mem_fun(*this, &LivePathEffectAdd::onClose)); - add_button.signal_clicked().connect(sigc::mem_fun(*this, &LivePathEffectAdd::onAdd)); - signal_delete_event().connect( sigc::bind_return(sigc::hide(sigc::mem_fun(*this, &LivePathEffectAdd::onClose)), true ) ); - - add_button.grab_default(); - - show_all_children(); +void LivePathEffectAdd::on_search() +{ + _visiblelpe = 0; + _LPESelectorFlowBox->set_filter_func(sigc::mem_fun(*this, &LivePathEffectAdd::on_filter)); + if (_visiblelpe == 0) { + _LPEInfo->set_text(_("Your search do a empty result, please try again")); + _LPEInfo->set_visible(true); + _LPEInfo->get_style_context()->add_class("lpeinfowarn"); + } else { + _LPEInfo->set_visible(false); + _LPEInfo->get_style_context()->remove_class("lpeinfowarn"); + } } void LivePathEffectAdd::onAdd() { - applied = true; onClose(); } @@ -187,27 +181,6 @@ void LivePathEffectAdd::onKeyEvent(GdkEventKey* evt) } } -void LivePathEffectAdd::onButtonEvent(GdkEventButton* evt) -{ - // Double click on tree is same as clicking the add button - if (evt->type == GDK_2BUTTON_PRESS) { - onAdd(); - } -} - -const Util::EnumData* -LivePathEffectAdd::getActiveData() -{ - Gtk::TreeModel::iterator iter = instance().effectlist_treeview.get_selection()->get_selected(); - if ( iter ) { - Gtk::TreeModel::Row row = *iter; - return row[instance()._columns.data]; - } - - return nullptr; -} - - void LivePathEffectAdd::show(SPDesktop *desktop) { LivePathEffectAdd &dial = instance(); diff --git a/src/ui/dialog/livepatheffect-add.h b/src/ui/dialog/livepatheffect-add.h index 003c9c127..4127553ac 100644 --- a/src/ui/dialog/livepatheffect-add.h +++ b/src/ui/dialog/livepatheffect-add.h @@ -50,12 +50,13 @@ public: * Close button was clicked */ void onClose(); - + bool on_filter(Gtk::FlowBoxChild *child); + void on_search(); + void on_activate(Gtk::FlowBoxChild *child); /** * Add button was clicked */ void onAdd(); - /** * Tree was clicked */ -- cgit v1.2.3