[Xfce4-commits] <ristretto:stephan/icon-bar> Add some extra padding
Stephan Arts
noreply at xfce.org
Sat Feb 4 12:32:02 CET 2012
Updating branch refs/heads/stephan/icon-bar
to aa9c7d328cb12ee4cc863182887f395420d8f795 (commit)
from 5de0b9aa7a91a26fec4d9d59490d0a7a6c6645e9 (commit)
commit aa9c7d328cb12ee4cc863182887f395420d8f795
Author: Stephan Arts <stephan at xfce.org>
Date: Sat Feb 4 08:03:46 2012 +0100
Add some extra padding
src/icon_bar.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/icon_bar.c b/src/icon_bar.c
index a9dba5c..684e228 100644
--- a/src/icon_bar.c
+++ b/src/icon_bar.c
@@ -1340,6 +1340,7 @@ rstto_icon_bar_calculate_item_size (RsttoIconBar *icon_bar,
GdkPixbuf *pixbuf;
gint focus_width;
gint focus_pad;
+ gint int_pad;
if (G_LIKELY (item->width != -1 && item->width != -1))
return;
@@ -1348,6 +1349,7 @@ rstto_icon_bar_calculate_item_size (RsttoIconBar *icon_bar,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
NULL);
+ int_pad = focus_pad;
if (icon_bar->priv->pixbuf_column != -1)
{
@@ -1377,8 +1379,8 @@ rstto_icon_bar_calculate_item_size (RsttoIconBar *icon_bar,
&item->layout_width,
&item->layout_height);
item->width = MAX (item->layout_width, item->pixbuf_width) + 2 * ICON_TEXT_PADDING
- + 2 * (focus_width + focus_pad);
- item->height = item->layout_height + 2 * (focus_width + focus_pad + ICON_TEXT_PADDING)
+ + 2 * (int_pad + focus_width + focus_pad);
+ item->height = item->layout_height + 2 * (int_pad + focus_width + focus_pad + ICON_TEXT_PADDING)
+ item->pixbuf_height;
}
else
@@ -1386,8 +1388,9 @@ rstto_icon_bar_calculate_item_size (RsttoIconBar *icon_bar,
item->layout_width = 0;
item->layout_height = 0;
- item->width = MAX (item->layout_width, item->pixbuf_width) + 2 * (focus_width + focus_pad);
- item->height = item->layout_height + 2 * (focus_width + focus_pad ) + item->pixbuf_height;
+ item->width = MAX (item->layout_width, item->pixbuf_width) + 2 *
+(int_pad + focus_width + focus_pad);
+ item->height = item->layout_height + 2 * (int_pad + focus_width + focus_pad ) + item->pixbuf_height;
}
More information about the Xfce4-commits
mailing list