Scale widget leaves artifacts
- From: Juergen Salk <juergen salk gmx de>
- To: gtk-app-devel-list gnome org
- Subject: Scale widget leaves artifacts
- Date: Wed, 28 Jan 2004 00:19:07 +0100
I have some scale widgets that leave artifacts in front
of the value display, when the slider is moved to adjust
the value. An example screenshot can be found at
http://www.uni-ulm.de/~jsalk/temp/shot.png
(Notice the "fly droppings" in front of the 0.)
Is there a way to get rid of them? I am using gtk-1.2.10
on Debian Woody, if that matters.
Thank you in advance.
Regards - Juergen
PS: I have appended a bare bone sample code, that I've used
for producing the screenshot above.
#include <gtk/gtk.h>
void level_changed_cb (GtkAdjustment *adjustment, gpointer data);
int main(int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *hbox;
GtkWidget *vbox1;
GtkAdjustment *adj1;
GtkWidget *vscale1;
int image_level;
gtk_init (&argc, &argv);
gdk_rgb_init ();
/* build gtk gui */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, FALSE);
gtk_window_set_title (GTK_WINDOW (window), "Foobar");
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (gtk_exit), NULL);
/* main container */
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), hbox);
/* vertical container for L scale */
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), vbox1, TRUE, TRUE, 15);
adj1 = GTK_ADJUSTMENT (gtk_adjustment_new (image_level,
0, 50000, 1, 10, 0));
gtk_signal_connect (GTK_OBJECT (adj1), "value_changed",
GTK_SIGNAL_FUNC (level_changed_cb), NULL);
vscale1 = gtk_vscale_new (adj1);
gtk_scale_set_digits (GTK_SCALE (vscale1), 0);
gtk_box_pack_start (GTK_BOX (vbox1), vscale1, TRUE, TRUE, 0);
gtk_widget_show_all (window);
gtk_main ();
return(0);
}
void level_changed_cb (GtkAdjustment *adjustment, gpointer data)
{
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]