GNOME Bugzilla – Bug 746688
GtkProgressBar doesn't respect its style properties
Last modified: 2015-12-31 00:23:22 UTC
Progress bars are currently hard-coded to be 7px high (6px wide when vertical). We'd like to have slightly wider progress bars in Ubuntu's theme. Please see the commit message in the patch for more details.
Created attachment 300197 [details] [review] gtkprogressbar: fix size allocation As of 74405cc, progress bars use a new design with values drawn on top (or to the left) of the through instead of inside of it. This change brought a number of regressions: the min-horizontal-bar-height and min-vertical-bar-width style properties are not respected anymore. For vertical progress bars, the value was drawn too close to the bar and not centered vertically. Fix this by respecting the style properties and drawing the value label at the correct position. Also, the xspacing and yspacing properties didn't server any apparent purpose. Change their semantics to mean "the spacing between the label and the bar". Hence, they only need to be added to the size request when showing the label. Themes probably want to override those now, as the default value of 7 is quite large.
Review of attachment 300197 [details] [review]: I think this patch will be obsoleted soon by css nodes and min-width/min-height. ::: gtk/gtkprogressbar.c @@ +900,3 @@ pango_layout_get_pixel_extents (layout, NULL, &logical_rect); + if (orientation== GTK_ORIENTATION_HORIZONTAL) Missing space
Pushed with adjustments. Reduced the default spacing values from 7 to 2. Attachment 300197 [details] pushed as ada97b0 - gtkprogressbar: fix size allocation
*** Bug 743222 has been marked as a duplicate of this bug. ***
Hi Matthias, Please backport this commit at least to gtk 3.14 Thanks you for merge it!. :)
Are there css properties for this available now? How would one set them to restore the behaviour before 74405cc (to expand)?
Things are quite different in master. If you are asking about going back to rendering the text overlayed on the trough, I'm afraid thats not available anymore, and it would be some work to bring it back.
I don't need the text, but having some control over the layout of the bar would be nice. I think it is okay for themes to enforce certain style, but doing this on the library level is not so nice.
Would be nice to see that in gtk+-3.14, that rhel-7.2 and debian-8 use this toolkit version should be reason enough.