summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2fa60d6)
raw | patch | inline | side by side (parent: 2fa60d6)
author | johncoswell <johncoswell@users.sourceforge.net> | |
Wed, 28 Feb 2007 01:38:55 +0000 (01:38 +0000) | ||
committer | johncoswell <johncoswell@users.sourceforge.net> | |
Wed, 28 Feb 2007 01:38:55 +0000 (01:38 +0000) |
src/flood-context.cpp | patch | blob | history | |
src/widgets/toolbox.cpp | patch | blob | history |
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index e737b90f92adf825299dc55a41a3a7aaad984590..d1c2ad65b7c99e05c0ed63e7bdfa603bbdfe6093 100644 (file)
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -431,7 +431,7 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even
unsigned char *orig_px = get_pixel(px, (int)pw[NR::X], (int)pw[NR::Y], width);
for (int i = 0; i < 4; i++) { orig_color[i] = orig_px[i]; }
- int tolerance = prefs_get_int_attribute_limited("tools.paintbucket", "tolerance", 1, 0, 255);
+ int tolerance = (255 * prefs_get_int_attribute_limited("tools.paintbucket", "tolerance", 1, 0, 100)) / 100;
while (!fill_queue.empty() && !aborted) {
NR::Point cp = fill_queue.front();
index 788176d9ca43278353a44438e0dc18e18373920f..049c7f8385e066696f33e087c53d3998edba740d 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
static void paintbucket_tolerance_changed(GtkAdjustment *adj, GtkWidget *tbl)
{
- prefs_set_int_attribute("tools.paintbucket", "tolerance", (gint)adj->value);
spinbutton_defocus(GTK_OBJECT(tbl));
}
{
GtkWidget *tolerance = sp_tb_spinbutton(_("Tolerance:"),
_("The maximum allowed difference between the clicked pixel and the neighboring pixels to be counted in the fill"),
- "tools.paintbucket", "tolerance", 8, NULL, tbl, TRUE,
- "inkscape:paintbucket-tolerance", 0, 255, 1.0, 10.0,
+ "tools.paintbucket", "tolerance", 5, NULL, tbl, TRUE,
+ "inkscape:paintbucket-tolerance", 0, 100, 1.0, 10.0,
paintbucket_tolerance_changed, 1, 0);
gtk_box_pack_start(GTK_BOX(tbl), tolerance, FALSE, FALSE,