summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/selected-style.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
-rw-r--r--src/ui/widget/selected-style.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 042a6614e..85538c8c7 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -25,6 +25,7 @@
#include "desktop-style.h"
#include "sp-namedview.h"
#include "sp-linear-gradient.h"
+#include "sp-mesh-gradient.h"
#include "sp-radial-gradient.h"
#include "sp-pattern.h"
#include "ui/dialog/dialog-manager.h"
@@ -209,6 +210,18 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_gradient_box_r[i].pack_start(*(Glib::wrap(_gradient_preview_r[i])));
_gradient_box_r[i].show_all();
+#ifdef WITH_MESH
+ _mgradient[i].set_markup (_("<b>M</b>"));
+ sp_set_font_size_smaller (GTK_WIDGET(_mgradient[i].gobj()));
+ _mgradient[i].show_all();
+ __mgradient[i] = (i == SS_FILL)? (_("Mesh gradient fill")) : (_("Mesh gradient stroke"));
+
+ _gradient_preview_m[i] = GTK_WIDGET(sp_gradient_image_new (NULL));
+ _gradient_box_m[i].pack_start(_mgradient[i]);
+ _gradient_box_m[i].pack_start(*(Glib::wrap(_gradient_preview_m[i])));
+ _gradient_box_m[i].show_all();
+#endif
+
_many[i].set_markup (_("Different"));
sp_set_font_size_smaller (GTK_WIDGET(_many[i].gobj()));
_many[i].show_all();
@@ -1028,6 +1041,14 @@ SelectedStyle::update()
place->add(_gradient_box_r[i]);
place->set_tooltip_text(__rgradient[i]);
_mode[i] = SS_RGRADIENT;
+#ifdef WITH_MESH
+ } else if (SP_IS_MESHGRADIENT(server)) {
+ SPGradient *vector = SP_GRADIENT(server)->getVector();
+ sp_gradient_image_set_gradient(SP_GRADIENT_IMAGE(_gradient_preview_m[i]), vector);
+ place->add(_gradient_box_m[i]);
+ place->set_tooltip_text(__mgradient[i]);
+ _mode[i] = SS_MGRADIENT;
+#endif
} else if (SP_IS_PATTERN (server)) {
place->add(_pattern[i]);
place->set_tooltip_text(__pattern[i]);