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 743222 - GtkProgressBar not consider the properties min-horizontal-bar-height and min-vertical-bar-width to draw.
GtkProgressBar not consider the properties min-horizontal-bar-height and min-...
Status: RESOLVED DUPLICATE of bug 746688
Product: gtk+
Classification: Platform
Component: Widget: Other
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-01-20 02:44 UTC by Matias De lellis
Modified: 2015-03-29 04:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Propoced patch. (2.44 KB, patch)
2015-01-20 05:15 UTC, Matias De lellis
none Details | Review
Screenshot showing the error (19.34 KB, image/png)
2015-01-21 15:50 UTC, Matias De lellis
  Details

Description Matias De lellis 2015-01-20 02:44:33 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.
Comment 1 Matias De lellis 2015-01-20 05:15:10 UTC
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.
Comment 2 Matias De lellis 2015-01-21 15:50:31 UTC
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.
Comment 3 Matias De lellis 2015-03-29 04:09:59 UTC

*** This bug has been marked as a duplicate of bug 746688 ***