summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2008-01-01 04:40:48 +0000
committermental <mental@users.sourceforge.net>2008-01-01 04:40:48 +0000
commit5a722a35ececc4dbd370d2648531b87461d1d3b5 (patch)
treed625cb086d5000bc63ead2adbd69d0c13ceb749a /src
parentfix update on layer switch and work around some blur-related glitches (diff)
downloadinkscape-5a722a35ececc4dbd370d2648531b87461d1d3b5.tar.gz
inkscape-5a722a35ececc4dbd370d2648531b87461d1d3b5.zip
make blend versus blur more configurable on a case-by-case basis
(bzr r4357)
Diffstat (limited to 'src')
-rw-r--r--src/dialogs/layers-panel.cpp2
-rw-r--r--src/ui/dialog/fill-and-stroke.cpp2
-rw-r--r--src/ui/widget/filter-effect-chooser.cpp14
-rw-r--r--src/ui/widget/filter-effect-chooser.h9
-rw-r--r--src/ui/widget/object-composite-settings.cpp4
-rw-r--r--src/ui/widget/object-composite-settings.h2
6 files changed, 21 insertions, 12 deletions
diff --git a/src/dialogs/layers-panel.cpp b/src/dialogs/layers-panel.cpp
index cec32426d..480b60b63 100644
--- a/src/dialogs/layers-panel.cpp
+++ b/src/dialogs/layers-panel.cpp
@@ -673,7 +673,7 @@ LayersPanel::LayersPanel() :
_model(0),
_pending(0),
_toggleEvent(0),
- _compositeSettings(SP_VERB_DIALOG_LAYERS, "layers")
+ _compositeSettings(SP_VERB_DIALOG_LAYERS, "layers", UI::Widget::SimpleFilterModifier::BLEND)
{
_maxNestDepth = prefs_get_int_attribute_limited("dialogs.layers", "maxDepth", 20, 1, 1000);
diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp
index dd9404933..e03b80d0e 100644
--- a/src/ui/dialog/fill-and-stroke.cpp
+++ b/src/ui/dialog/fill-and-stroke.cpp
@@ -43,7 +43,7 @@ FillAndStroke::FillAndStroke()
_page_fill(1, 1, true, true),
_page_stroke_paint(1, 1, true, true),
_page_stroke_style(1, 1, true, true),
- _composite_settings(SP_VERB_DIALOG_FILL_STROKE, "fillstroke", true)
+ _composite_settings(SP_VERB_DIALOG_FILL_STROKE, "fillstroke", SimpleFilterModifier::BLEND | SimpleFilterModifier::BLUR)
{
Gtk::Box *contents = _getContents();
contents->set_spacing(0);
diff --git a/src/ui/widget/filter-effect-chooser.cpp b/src/ui/widget/filter-effect-chooser.cpp
index fb901526f..70db22843 100644
--- a/src/ui/widget/filter-effect-chooser.cpp
+++ b/src/ui/widget/filter-effect-chooser.cpp
@@ -21,17 +21,19 @@ namespace Inkscape {
namespace UI {
namespace Widget {
-SimpleFilterModifier::SimpleFilterModifier(bool blur_enabled)
+SimpleFilterModifier::SimpleFilterModifier(int flags)
: _lb_blend(_("_Blend mode:")),
_lb_blur(_("B_lur:"), Gtk::ALIGN_LEFT),
_blend(BlendModeConverter),
_blur(0, 0, 100, 1, 0.01, 1)
{
- add(_hb_blend);
- add(_vb_blur);
- _hb_blend.pack_start(_lb_blend, false, false);
- _hb_blend.pack_start(_blend);
- if (blur_enabled) {
+ if (flags & BLEND) {
+ add(_hb_blend);
+ _hb_blend.pack_start(_lb_blend, false, false);
+ _hb_blend.pack_start(_blend);
+ }
+ if (flags & BLUR) {
+ add(_vb_blur);
_vb_blur.add(_lb_blur);
_vb_blur.add(_blur);
}
diff --git a/src/ui/widget/filter-effect-chooser.h b/src/ui/widget/filter-effect-chooser.h
index 740a7fe5e..141ec6bc0 100644
--- a/src/ui/widget/filter-effect-chooser.h
+++ b/src/ui/widget/filter-effect-chooser.h
@@ -32,7 +32,13 @@ namespace Widget {
class SimpleFilterModifier : public Gtk::VBox
{
public:
- SimpleFilterModifier(bool blur_enabled);
+ enum Flags {
+ NONE=0,
+ BLUR=1,
+ BLEND=2
+ };
+
+ SimpleFilterModifier(int flags);
sigc::signal<void>& signal_blend_blur_changed();
@@ -43,6 +49,7 @@ public:
double get_blur_value() const;
void set_blur_value(const double);
void set_blur_sensitive(const bool);
+
private:
Gtk::HBox _hb_blend;
Gtk::VBox _vb_blur;
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index 5c38a1370..b38775fc3 100644
--- a/src/ui/widget/object-composite-settings.cpp
+++ b/src/ui/widget/object-composite-settings.cpp
@@ -41,7 +41,7 @@ void ObjectCompositeSettings::_on_desktop_switch(
}
}
-ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix, bool blur_enabled)
+ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix, int flags)
: _verb_code(verb_code),
_blur_tag(Glib::ustring(history_prefix) + ":blur"),
_opacity_tag(Glib::ustring(history_prefix) + ":opacity"),
@@ -51,7 +51,7 @@ ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char co
_opacity_adjustment(100.0, 0.0, 100.0, 1.0, 1.0, 0.0),
_opacity_hscale(_opacity_adjustment),
_opacity_spin_button(_opacity_adjustment, 0.01, 1),
- _fe_cb(blur_enabled),
+ _fe_cb(flags),
_fe_vbox(false, 0),
_fe_alignment(1, 1, 1, 1),
_blocked(false)
diff --git a/src/ui/widget/object-composite-settings.h b/src/ui/widget/object-composite-settings.h
index 6cef739d7..725a8a42b 100644
--- a/src/ui/widget/object-composite-settings.h
+++ b/src/ui/widget/object-composite-settings.h
@@ -31,7 +31,7 @@ namespace Widget {
class ObjectCompositeSettings : public Gtk::VBox {
public:
- ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix, bool blur_enabled=false);
+ ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix, int flags);
~ObjectCompositeSettings();
void setSubject(StyleSubject *subject);