[gtk+/gtk-3-22] Revert "levelbar: Don't underallocate block widgets"
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] Revert "levelbar: Don't underallocate block widgets"
- Date: Tue, 8 Aug 2017 18:01:04 +0000 (UTC)
commit 8a22e3598d9c042e27f8f55e329a00ed5fb6313c
Author: Daniel Boles <dboles src gmail com>
Date: Tue Aug 8 18:55:30 2017 +0100
Revert "levelbar: Don't underallocate block widgets"
This reverts commit 78b4885fe8850e132d8bb06df8ab90ac6c2033e0.
That commit causes a block always to be shown at the min side, even when
the value is 0, in which case, no fill should be shown.
https://bugzilla.gnome.org/show_bug.cgi?id=783649
gtk/gtklevelbar.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c
index 47ec1ca..7fc1279 100644
--- a/gtk/gtklevelbar.c
+++ b/gtk/gtklevelbar.c
@@ -458,7 +458,6 @@ gtk_level_bar_allocate_trough_continuous (GtkLevelBar *self,
GtkAllocation block_area, clip;
gdouble fill_percentage;
gboolean inverted;
- int block_min;
inverted = gtk_level_bar_get_real_inverted (self);
@@ -474,15 +473,9 @@ gtk_level_bar_allocate_trough_continuous (GtkLevelBar *self,
fill_percentage = (self->priv->cur_value - self->priv->min_value) /
(self->priv->max_value - self->priv->min_value);
- gtk_css_gadget_get_preferred_size (self->priv->block_gadget[inverted ? 1 : 0],
- self->priv->orientation, -1,
- &block_min, NULL,
- NULL, NULL);
-
if (self->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
block_area.width = (gint) floor (block_area.width * fill_percentage);
- block_area.width = MAX (block_area.width, block_min);
if (inverted)
block_area.x += allocation->width - block_area.width;
@@ -490,7 +483,6 @@ gtk_level_bar_allocate_trough_continuous (GtkLevelBar *self,
else
{
block_area.height = (gint) floor (block_area.height * fill_percentage);
- block_area.height = MAX (block_area.height, block_min);
if (inverted)
block_area.y += allocation->height - block_area.height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]