Improve the rendering of progress bars with Gtk+ 3
This commit is contained in:
parent
21ddfb3461
commit
b92cbe8b69
|
@ -558,6 +558,10 @@ static void _download_refresh(Download * download)
|
|||
snprintf(buf, sizeof(buf), "%.1f%%", total_fraction * 100);
|
||||
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(
|
||||
download->progress), total_fraction);
|
||||
#if GTK_CHECK_VERSION(3, 0, 0)
|
||||
gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(
|
||||
download->progress), TRUE);
|
||||
#endif
|
||||
_refresh_remaining(download, rate);
|
||||
}
|
||||
gtk_progress_bar_set_text(GTK_PROGRESS_BAR(download->progress), buf);
|
||||
|
|
|
@ -443,6 +443,7 @@ Surfer * _new_do(char const * url)
|
|||
gtk_box_pack_start(GTK_BOX(surfer->statusbox), widget, FALSE, TRUE, 0);
|
||||
#if !GTK_CHECK_VERSION(2, 16, 0)
|
||||
surfer->progress = gtk_progress_bar_new();
|
||||
gtk_progress_bar_set_text(GTK_PROGRESS(surfer->progress), "");
|
||||
gtk_box_pack_start(GTK_BOX(surfer->statusbox), surfer->progress, FALSE,
|
||||
FALSE, 0);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user