GNOME Bugzilla – Bug 743222
GtkProgressBar not consider the properties min-horizontal-bar-height and min-vertical-bar-width to draw.
Last modified: 2015-03-29 04:09:59 UTC
Hi, GtkProgressBar has 2 (In fact 4) properties: * https://developer.gnome.org/gtk3/stable/GtkProgressBar.html#GtkProgressBar--s-min-horizontal-bar-height * https://developer.gnome.org/gtk3/stable/GtkProgressBar.html#GtkProgressBar--s-min-vertical-bar-width These are properly considered when calculating the size of the widget. * https://git.gnome.org/browse/gtk+/tree/gtk/gtkprogressbar.c?h=gtk-3-14#n519 * https://git.gnome.org/browse/gtk+/tree/gtk/gtkprogressbar.c?h=gtk-3-14#n576 But they are ignored when drawing the widget: * https://git.gnome.org/browse/gtk+/tree/gtk/gtkprogressbar.c?h=gtk-3-14#n1026 As a result, the GtkProgressBar, always has a size of 6px. But when use it without text, remains a top margin that is bad or ugly.
Created attachment 294943 [details] [review] Propoced patch. Hi, Take into account the properties min-horizontal-bar-height/min-vertical-bar-width at the moment to draw the widget in the same way that takes into account to calculate the size of the widget. NOTE: But now when calculate the size only add "yspacing" when show a text, used as a separator. And also sum both text height, progress height and yspacing only when needed to calculate the size of widget. Previously only sum the yspacing and text size, what was strange, because it ignored the progress bar. Regards.
Created attachment 295113 [details] Screenshot showing the error Hi, This is the error i'm trying to fix. In Pragha we use a GtkProgressbar to show the progress of songs reproduction. In particular, a version that inherits from GtkProgressbar, because there is no other way to minimize the height of the widget. See: https://github.com/pragha-music-player/pragha/blob/master/src/pragha-simple-widgets.c#L100 This until Gtk 3.12 work properly, and now it looks like the screenshot I am attaching. Regards, Matias.
*** This bug has been marked as a duplicate of bug 746688 ***