Possible fix for color chooser bug, #257685
I don't know if anyone has worked on #257685 yet. I gave it a quick look and maybe the fix is very simple.
Apparently with Gtk2.13 and greater, Gtk is enforcing the page size and steps, which seems to be the root of the problem where the sliders can only max out to 245 rather than 255. If [0..255] were a document, 245 would be the bottom of the last page, so the adjustment widget is operating correctly.
According to the Gtk notes, setting page sizes and steps to 0 for simple adjusters might be the best way to fix this.
In src/widgets/sp-color-slider.cpp, line 332, this little modification seems to fix the problem:
if (!adjustment) { adjustment = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, 1.0, 0.01, 0.0, 0.0); } //in case of existing adjustment gtk_adjustment_set_page_increment(adjustment, 0.0); gtk_adjustment_set_page_size(adjustment, 0.0);
Maybe someone with knowledge of the older SP-vintage widgets can decide if this is a valid fix or is merely fixing the symptom? I'd rather not commit with insufficient knowledge of how this thing works.
bob (ishmal)
Bob Jamison wrote:
Maybe someone with knowledge of the older SP-vintage widgets can decide if this is a valid fix or is merely fixing the symptom? I'd rather not commit with insufficient knowledge of how this thing works.
bob (ishmal)
Tell ya what. Let's give it a go.
bob
Yes, go! :)
--- On Mon, 9/8/08, Bob Jamison <rwjj@...127...> wrote: From: Bob Jamison <rwjj@...127...> Subject: Re: [Inkscape-devel] Possible fix for color chooser bug, #257685 To: "inkscape" inkscape-devel@lists.sourceforge.net Date: Monday, September 8, 2008, 3:58 AM
Bob Jamison wrote:
Maybe someone with knowledge of the older SP-vintage widgets can decide if this is a valid fix or is merely fixing the symptom? I'd rather
not
commit with insufficient knowledge of how this thing works.
bob (ishmal)
Tell ya what. Let's give it a go.
bob
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Bob Jamison wrote:
Tell ya what. Let's give it a go.
Your solution leads to a compile error on my system:
widgets/sp-color-slider.cpp: In function ‘void sp_color_slider_set_adjustment(SPColorSlider*, GtkAdjustment*)’: widgets/sp-color-slider.cpp:335: error: ‘gtk_adjustment_set_page_increment’ was not declared in this scope widgets/sp-color-slider.cpp:336: error: ‘gtk_adjustment_set_page_size’ was not declared in this scope
This is no surprise since the GTK+ documentation says that the two functions were only introduced in 2.14 (see http://library.gnome.org/devel/gtk/2.14/GtkAdjustment.html#gtk-adjustment-se...) Can we put these lines into #ifdefs or something? (I'd do it but I don't know how)
Thanks, Max
Hello,
Well, I am sorry for the compile error experienced by some, but the colours are back to a nice 255 number of colours for me in http://inkscape.modevia.com/win32/Inkscape19816-0809080916.7z
:) Thank you!
--- On Mon, 9/8/08, Maximilian Albert <Anhalter42@...173...> wrote: From: Maximilian Albert <Anhalter42@...173...> Subject: Re: [Inkscape-devel] Possible fix for color chooser bug, #257685 To: "Bob Jamison" <rwjj@...127...>, inkscape-devel@lists.sourceforge.net Date: Monday, September 8, 2008, 7:18 AM
Bob Jamison wrote:
Tell ya what. Let's give it a go.
Your solution leads to a compile error on my system:
widgets/sp-color-slider.cpp: In function ‘void sp_color_slider_set_adjustment(SPColorSlider*, GtkAdjustment*)’: widgets/sp-color-slider.cpp:335: error: ‘gtk_adjustment_set_page_increment’ was not declared in this scope widgets/sp-color-slider.cpp:336: error: ‘gtk_adjustment_set_page_size’ was not declared in this scope
This is no surprise since the GTK+ documentation says that the two functions were only introduced in 2.14 (see http://library.gnome.org/devel/gtk/2.14/GtkAdjustment.html#gtk-adjustment-se...) Can we put these lines into #ifdefs or something? (I'd do it but I don't know how)
Thanks, Max
I'd like to test out Inkscape with it's eraser functions, but wondered if someone could clue me in on which developer's build is reliable/stable enough to download and try. I see many builds out there and I assume the mot recent build is the best? Not sure.
td -------------- Original message from Bob Jamison <rwjj@...127...>: --------------
Bob Jamison wrote:
Maybe someone with knowledge of the older SP-vintage widgets can decide if this is a valid fix or is merely fixing the symptom? I'd rather not commit with insufficient knowledge of how this thing works.
bob (ishmal)
Tell ya what. Let's give it a go.
bob
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (4)
-
unknown@example.com
-
Bob Jamison
-
Maximilian Albert
-
worms invasion