diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2009-03-05 08:11:54 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2009-03-05 08:11:54 +0000 |
| commit | 31c5e23a0b6c91c2765b9e111c29c6debf86004a (patch) | |
| tree | 912bfd7c32a1556fca7f6f73cb1bff747b96a994 /src/widgets | |
| parent | Control when shift affects moving of handles. Applies patch from bug #245698. (diff) | |
| download | inkscape-31c5e23a0b6c91c2765b9e111c29c6debf86004a.tar.gz inkscape-31c5e23a0b6c91c2765b9e111c29c6debf86004a.zip | |
Adding clear-color swatch to complement no-color.
(bzr r7422)
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/eek-color-def.cpp | 21 | ||||
| -rw-r--r-- | src/widgets/eek-color-def.h | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/widgets/eek-color-def.cpp b/src/widgets/eek-color-def.cpp index d7cb41b38..6334061c2 100644 --- a/src/widgets/eek-color-def.cpp +++ b/src/widgets/eek-color-def.cpp @@ -62,6 +62,27 @@ ColorDef::ColorDef() : { } +ColorDef::ColorDef( ColorType type ) : + descr(), + type(type), + r(0), + g(0), + b(0), + editable(false) +{ + switch (type) { + case CLEAR: + descr = _("remove"); + break; + case NONE: + descr = _("none"); + break; + case RGB: + descr = ""; + break; + } +} + ColorDef::ColorDef( unsigned int r, unsigned int g, unsigned int b, const std::string& description ) : descr(description), type(RGB), diff --git a/src/widgets/eek-color-def.h b/src/widgets/eek-color-def.h index 764a28b12..7e54182d6 100644 --- a/src/widgets/eek-color-def.h +++ b/src/widgets/eek-color-def.h @@ -55,6 +55,7 @@ public: enum ColorType{CLEAR, NONE, RGB}; ColorDef(); + ColorDef(ColorType type); ColorDef( unsigned int r, unsigned int g, unsigned int b, const std::string& description ); virtual ~ColorDef(); |
