Re: GtkProgressBar ignoring gtk_widget_queue_draw()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Owen Taylor wrote:
Well, you are looking to do something awful anyways (call
gtk_widget_queue_draw() out of a theme engine), so given that, you
could investigate the further awfulness of doing:

 GTK_PROGRESS_GET_CLASS(progressbar)->paint (GTK_PROGRESS(progressbar));
 gtk_widget_queue_draw (progressbar);

After checking the source code, I noticed that the gtk_progress_changed() function queues a resize using gtk_widget_queue_resize(). Even though the size never changes, it does seem to force a redraw. I did the same in my timer, and it works fine :)


I think you are going to run into the problem that apps frequently
put up a progress bar and only run the main loop occasioanlly to
update the progress bar when the application changes the value ...
that is, you aren't going to get a nice smooth animation.

I've tried a bunch of applications so far, and the animation itself is quite smooth. The code is in Clearlooks CVS right now, in case people want to try it out. I am currently working on fixing RTL support (almost done with that).
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux