gtk_progress_bar_set_fraction with certain values causes text to disappear

Bug #888901 reported by Reece H. Dunn
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unico (Ubuntu)
New
Undecided
Unassigned

Bug Description

I have the following layout:

 GtkWidget *progress = gtk_progress_bar_new();
 gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(progress), TRUE);

 GtkWidget *elapsedTime = gtk_label_new("00:00:00.0");
 GtkWidget *totalTime = gtk_label_new("00:00:00.0");

 GtkWidget *hlayout = gtk_hbox_new(FALSE, 4);
 gtk_box_pack_start(GTK_BOX(hlayout), elapsedTime, FALSE, FALSE, 4);
 gtk_box_pack_start(GTK_BOX(hlayout), progress, TRUE, TRUE, 0);
 gtk_box_pack_start(GTK_BOX(hlayout), totalTime, FALSE, FALSE, 4);

 GtkWidget *layout = gtk_vbox_new(TRUE, 0);
 gtk_box_pack_start(GTK_BOX(layout), hlayout, FALSE, FALSE, 0);

That I update periodically:

 gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress), "Text");
 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), fraction);

 gtk_label_set_text(GTK_LABEL(elapsedTime), "00:00");
 gtk_label_set_text(GTK_LABEL(totalTime), "00:00");

If fraction is set to certain values:

 double fraction = 0.003033; // bad
 double fraction = 0.004; // bad

the text in progress and totalTime fails to display in the Ambiance and Radiance themes, while it does display in the Adwaita and High Contrast themes.

Other values:

 double fraction = 0.003; // good
 double fraction = 0.005; // good

the text renders without a problem in all themes.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: light-themes 0.1.8.25
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
CheckboxSubmission: 5434425585a31b50d9fa7c3153a37fe1
CheckboxSystem: b845c366ea09c60efa3a45c1b5b21525
Date: Fri Nov 11 07:52:40 2011
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: light-themes
UpgradeStatus: Upgraded to oneiric on 2011-09-24 (47 days ago)

Revision history for this message
Reece H. Dunn (msclrhd-gmail) wrote :
Revision history for this message
Reece H. Dunn (msclrhd-gmail) wrote :

Using the following CSS prevents the issue from appearing:

.progressbar,
.progressbar row,
.trough,
.trough row {
 -unico-inner-stroke-gradient: none;
 -unico-inner-stroke-width: 0;

 -unico-outer-stroke-gradient: none;
 -unico-outer-stroke-width: 0;
}

Revision history for this message
Reece H. Dunn (msclrhd-gmail) wrote :

Updating the package to reflect that this is in the unico gtk3 engine.

affects: light-themes (Ubuntu) → gtk3-engines-unico (Ubuntu)
no longer affects: gtk3-engines-unico (Ubuntu)
affects: unico → unico (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.