After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 334576 - GtkCellRendererProgress ignores xalign attribute
GtkCellRendererProgress ignores xalign attribute
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.8.x
Other All
: Normal enhancement
: Small feature
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2006-03-14 21:44 UTC by Steven Sheehy
Modified: 2007-06-06 20:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Steven Sheehy 2006-03-14 21:44:30 UTC
Please describe the problem:
GtkCellRendererProgress does not respond to changes in the xalign attribute.
Instead, it is always centered in the cell. I don't mind that the
GtkCellRendererProgress is by default centered, but it should be able to be set
to left-aligned or right-aligned if the user requests it.

Trouble code in GtkCellRendererProgress seems to be:

pos = (w - logical_rect.width)/2;

I'm using GTK+ binaries so I'm not able to modify this to work with xalign myself.

Steps to reproduce:
1. Create a GtkCellRendererProgress
2. Set its xalign attribute to 0.0 or 1.0
3. Add the GtkCellRendererProgress to the col and insert the col


Actual results:
Cell is always centered.

Expected results:
It should respond to the xalign attribute and move accordingly.

Does this happen every time?
yes

Other information:
Comment 1 Matthias Clasen 2006-03-15 03:22:20 UTC
Well, the progress bar is always filling the width of the cell, so there
is not much use for alignment. Do you want to move the text ?
Comment 2 Naga 2006-03-15 05:24:24 UTC
As a cocoder I can say yes. We would like to be able to left align the text that is drawn in the progress bar.
Comment 3 Steven Sheehy 2006-03-17 01:11:01 UTC
What he said. :)
Comment 4 Kristian Rietveld 2007-06-06 20:27:23 UTC
Added text-[xy]align properties for aligning the text label to trunk. (r18068).