[Xfce4-commits] <xfce4-panel:nick/gtk3> ItemBar: ignore "shrink" option and use minimum preferred size instead.
Andrzej
noreply at xfce.org
Mon Apr 22 22:22:01 CEST 2013
Updating branch refs/heads/nick/gtk3
to 23f7b72800387de9ccecbc8b2cde0792c0fa9f19 (commit)
from b4ee350e66cab3e24929ec1088f559326783f516 (commit)
commit 23f7b72800387de9ccecbc8b2cde0792c0fa9f19
Author: Andrzej <ndrwrdck at gmail.com>
Date: Mon Apr 22 21:20:29 2013 +0100
ItemBar: ignore "shrink" option and use minimum preferred size instead.
panel/panel-itembar.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/panel/panel-itembar.c b/panel/panel-itembar.c
index 893831e..2a25429 100644
--- a/panel/panel-itembar.c
+++ b/panel/panel-itembar.c
@@ -541,8 +541,8 @@ panel_itembar_size_allocate (GtkWidget *widget,
{
expand_len_avail -= child_len;
- if (child->option == CHILD_OPTION_SHRINK)
- shrink_len_avail += child_len;
+ if (child_len_min < child_len)
+ shrink_len_avail += (child_len - child_len_min);
}
}
}
@@ -639,15 +639,15 @@ panel_itembar_size_allocate (GtkWidget *widget,
child_len = new_len;
}
- else if (child->option == CHILD_OPTION_SHRINK
+ else if (child_len_min < child_len
&& shrink_len_req > 0)
{
/* equally shrink all shrinking plugins */
panel_assert (shrink_len_avail > 0);
- new_len = shrink_len_req * child_len / shrink_len_avail;
-
+ new_len = MIN (shrink_len_req * (child_len - child_len_min) / shrink_len_avail,
+ child_len - child_len_min);
shrink_len_req -= new_len;
- shrink_len_avail -= child_len;
+ shrink_len_avail -= (child_len - child_len_min);
child_len -= new_len;
}
More information about the Xfce4-commits
mailing list