diff options
Diffstat (limited to 'src/live_effects/lpe-perspective-envelope.cpp')
| -rw-r--r-- | src/live_effects/lpe-perspective-envelope.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/live_effects/lpe-perspective-envelope.cpp b/src/live_effects/lpe-perspective-envelope.cpp index b5ef26e2f..d60a13c23 100644 --- a/src/live_effects/lpe-perspective-envelope.cpp +++ b/src/live_effects/lpe-perspective-envelope.cpp @@ -19,9 +19,7 @@ #include "helper/geom.h" #include "display/curve.h" #include "svg/svg.h" -#include "ui/tools-switch.h" #include <gsl/gsl_linalg.h> -#include "desktop.h" using namespace Geom; @@ -44,10 +42,10 @@ LPEPerspectiveEnvelope::LPEPerspectiveEnvelope(LivePathEffectObject *lpeobject) Effect(lpeobject), // initialise your parameters here: deform_type(_("Type"), _("Select the type of deformation"), "deform_type", DeformationTypeConverter, &wr, this, DEFORMATION_PERSPECTIVE), - Up_Left_Point(_("Top Left"), _("Top Left - Ctrl+Alt+Click to reset"), "Up_Left_Point", &wr, this), - Up_Right_Point(_("Top Right"), _("Top Right - Ctrl+Alt+Click to reset"), "Up_Right_Point", &wr, this), - Down_Left_Point(_("Down Left"), _("Down Left - Ctrl+Alt+Click to reset"), "Down_Left_Point", &wr, this), - Down_Right_Point(_("Down Right"), _("Down Right - Ctrl+Alt+Click to reset"), "Down_Right_Point", &wr, this) + Up_Left_Point(_("Top Left"), _("Top Left - <b>Ctrl+Alt+Click</b>: reset, <b>Ctrl</b>: move along axes"), "Up_Left_Point", &wr, this), + Up_Right_Point(_("Top Right"), _("Top Right - <b>Ctrl+Alt+Click</b>: reset, <b>Ctrl</b>: move along axes"), "Up_Right_Point", &wr, this), + Down_Left_Point(_("Down Left"), _("Down Left - <b>Ctrl+Alt+Click</b>: reset, <b>Ctrl</b>: move along axes"), "Down_Left_Point", &wr, this), + Down_Right_Point(_("Down Right"), _("Down Right - <b>Ctrl+Alt+Click</b>: reset, <b>Ctrl</b>: move along axes"), "Down_Right_Point", &wr, this) { // register all your parameters here, so Inkscape knows which parameters this effect has: registerParameter( dynamic_cast<Parameter *>(&deform_type)); @@ -298,7 +296,7 @@ LPEPerspectiveEnvelope::newWidget() Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false,0)); Gtk::Button* resetButton = Gtk::manage(new Gtk::Button(Gtk::Stock::CLEAR)); resetButton->signal_clicked().connect(sigc::mem_fun (*this,&LPEPerspectiveEnvelope::resetGrid)); - resetButton->set_size_request(140,45); + resetButton->set_size_request(140,30); vbox->pack_start(*hbox, true,true,2); hbox->pack_start(*resetButton, false, false,2); return dynamic_cast<Gtk::Widget *>(vbox); @@ -331,15 +329,10 @@ LPEPerspectiveEnvelope::setDefaults() void LPEPerspectiveEnvelope::resetGrid() { - Up_Left_Point.param_set_and_write_default(); - Up_Right_Point.param_set_and_write_default(); - Down_Right_Point.param_set_and_write_default(); - Down_Left_Point.param_set_and_write_default(); - //todo:this hack is only to reposition the knots on reser grid button - //Better update path effect in LPEITEM - SPDesktop * desktop = SP_ACTIVE_DESKTOP; - tools_switch(desktop, TOOLS_SELECT); - tools_switch(desktop, TOOLS_NODES); + Up_Left_Point.param_set_default(); + Up_Right_Point.param_set_default(); + Down_Right_Point.param_set_default(); + Down_Left_Point.param_set_default(); } void @@ -347,8 +340,8 @@ LPEPerspectiveEnvelope::resetDefaults(SPItem const* item) { Effect::resetDefaults(item); original_bbox(SP_LPE_ITEM(item)); - setDefaults(); resetGrid(); + setDefaults(); } void |
