summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4424b83)
raw | patch | inline | side by side (parent: 4424b83)
author | mental <mental@users.sourceforge.net> | |
Tue, 1 Jan 2008 04:40:48 +0000 (04:40 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Tue, 1 Jan 2008 04:40:48 +0000 (04:40 +0000) |
index cec32426d98a75a3940e2b649538f8906af2f2fd..480b60b633a2d1005e4fcd5d01639a721d8e10be 100644 (file)
_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);
index dd94049334248dad1a480097e19f830361bee87b..e03b80d0e21fd28978db545c2d2fbd285088b1cd 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", true)
+ _composite_settings(SP_VERB_DIALOG_FILL_STROKE, "fillstroke", SimpleFilterModifier::BLEND | SimpleFilterModifier::BLUR)
{
Gtk::Box *contents = _getContents();
contents->set_spacing(0);
index fb901526f6898395e958da21249db626cfe12ea7..70db2284359786970ffe8594eff26d235a880ee1 100644 (file)
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);
}
index 740a7fe5e3517aa81b7bade035238232669d56b2..141ec6bc062bf516c00465f60ba0972719c2afd2 100644 (file)
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();
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 5c38a137097bf01f32415aee71fea16978635124..b38775fc3672d0007678c18f2a63567bd6c6faa9 100644 (file)
}
}
-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"),
_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)
index 6cef739d7726fb5829551905a5ffaed7ad15745e..725a8a42b18d2c121647f1da460a1a064b35c8f8 100644 (file)
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);