summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9d2da14)
raw | patch | inline | side by side (parent: 9d2da14)
author | mental <mental@users.sourceforge.net> | |
Tue, 1 Jan 2008 04:40:39 +0000 (04:40 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Tue, 1 Jan 2008 04:40:39 +0000 (04:40 +0000) |
index 43a9bb9894c1fca84322b7aab8d319b1c82019b0..dd94049334248dad1a480097e19f830361bee87b 100644 (file)
_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")
+ _composite_settings(SP_VERB_DIALOG_FILL_STROKE, "fillstroke", true)
{
Gtk::Box *contents = _getContents();
contents->set_spacing(0);
index f8aee43f0f0640fd05809c43e49c9d270d30924a..fb901526f6898395e958da21249db626cfe12ea7 100644 (file)
namespace UI {
namespace Widget {
-SimpleFilterModifier::SimpleFilterModifier()
+SimpleFilterModifier::SimpleFilterModifier(bool blur_enabled)
: _lb_blend(_("_Blend mode:")),
_lb_blur(_("B_lur:"), Gtk::ALIGN_LEFT),
_blend(BlendModeConverter),
add(_vb_blur);
_hb_blend.pack_start(_lb_blend, false, false);
_hb_blend.pack_start(_blend);
- _vb_blur.add(_lb_blur);
- _vb_blur.add(_blur);
+ if (blur_enabled) {
+ _vb_blur.add(_lb_blur);
+ _vb_blur.add(_blur);
+ }
show_all_children();
index f0d6f324db7fccc7cd0a2b5d51773aaa9992c429..740a7fe5e3517aa81b7bade035238232669d56b2 100644 (file)
class SimpleFilterModifier : public Gtk::VBox
{
public:
- SimpleFilterModifier();
+ SimpleFilterModifier(bool blur_enabled);
sigc::signal<void>& signal_blend_blur_changed();
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index 20fdbed039b5b3a711faa1d094bf16ef262f1700..5c38a137097bf01f32415aee71fea16978635124 100644 (file)
}
}
-ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix)
+ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix, bool blur_enabled)
: _verb_code(verb_code),
- _opacity_tag(Glib::ustring(history_prefix) + ":opacity"),
_blur_tag(Glib::ustring(history_prefix) + ":blur"),
+ _opacity_tag(Glib::ustring(history_prefix) + ":opacity"),
_opacity_vbox(false, 0),
_opacity_label_box(false, 0),
_opacity_label(_("Opacity, %"), 0.0, 1.0, true),
_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_vbox(false, 0),
_fe_alignment(1, 1, 1, 1),
_blocked(false)
sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0);
NR::Maybe<NR::Rect> bbox = _subject->getBounds();
- if (!bbox) {
- return;
+ double radius;
+ if (bbox) {
+ double perimeter = bbox->extent(NR::X) + bbox->extent(NR::Y);
+ radius = _fe_cb.get_blur_value() * perimeter / 400;
+ } else {
+ radius = 0;
}
- double perimeter = bbox->extent(NR::X) + bbox->extent(NR::Y);
-
const Glib::ustring blendmode = _fe_cb.get_blend_mode();
- double radius = _fe_cb.get_blur_value() * perimeter / 400;
SPFilter *filter = 0;
const bool remfilter = (blendmode == "normal" && radius == 0) || (blendmode == "filter" && !filter);
index 8768157bf4eb7176a8456d6156c865620d8ccc76..6cef739d7726fb5829551905a5ffaed7ad15745e 100644 (file)
class ObjectCompositeSettings : public Gtk::VBox {
public:
- ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix);
+ ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix, bool blur_enabled=false);
~ObjectCompositeSettings();
void setSubject(StyleSubject *subject);
index f7864acc362194f8f7689a16b977538fcde82dae..46d33abb7f1ac2b81207ab7d14ab4e5d8d36a7ac 100644 (file)
_layer_release = layer->connectRelease(sigc::hide(sigc::bind(sigc::mem_fun(*this, &CurrentLayer::_setLayer), (SPObject *)NULL)));
_layer_modified = layer->connectModified(sigc::hide(sigc::hide(sigc::mem_fun(*this, &CurrentLayer::_emitChanged))));
}
+ _emitChanged();
}
SPObject *StyleSubject::CurrentLayer::_getLayer() const {