summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 476e275)
raw | patch | inline | side by side (parent: 476e275)
author | joncruz <joncruz@users.sourceforge.net> | |
Wed, 18 Mar 2009 09:08:09 +0000 (09:08 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Wed, 18 Mar 2009 09:08:09 +0000 (09:08 +0000) |
src/ui/dialog/swatches.cpp | patch | blob | history |
index 89bdd4c3c2eed368924057698743140cb675cb5b..8fb811e3d205448dc2693c8a5287e07e8d1843ce 100644 (file)
if ((first.offset <0.0001) && (static_cast<int>(second.offset * 100.0f) == 100)) {
SPColor color = first.color;
guint32 together = color.toRGBA32(0);
- Glib::ustring name((*it)->id);
- unsigned int r = SP_RGBA32_R_U(together);
- unsigned int g = SP_RGBA32_G_U(together);
- unsigned int b = SP_RGBA32_B_U(together);
- ColorItem* item = new ColorItem( r, g, b, name );
- docPalette->_colors.push_back(item);
+
+ // Pick only single-color gradients for now
+ SPColor color2 = second.color;
+ guint32 together2 = color2.toRGBA32(0);
+ if ( together == together2 ) {
+ Glib::ustring name((*it)->id);
+ unsigned int r = SP_RGBA32_R_U(together);
+ unsigned int g = SP_RGBA32_G_U(together);
+ unsigned int b = SP_RGBA32_B_U(together);
+ ColorItem* item = new ColorItem( r, g, b, name );
+ docPalette->_colors.push_back(item);
+ }
}
}
}