[balsa/gtk3] Use parent width for image
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Use parent width for image
- Date: Wed, 29 Dec 2010 04:31:35 +0000 (UTC)
commit f2bff265e100e29b475abb667f71dcd84fde13ca
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Tue Dec 28 23:31:12 2010 -0500
Use parent width for image
ChangeLog | 5 +++++
src/balsa-mime-widget-image.c | 10 +++-------
2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f470e8e..0ec856e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-12-28 Peter Bloomfield
+ * src/balsa-mime-widget-image.c (img_check_size): use parent
+ width.
+
+2010-12-28 Peter Bloomfield
+
* libbalsa/filter.c (libbalsa_filter_mailbox_messages): do not
use GnomeSound.
diff --git a/src/balsa-mime-widget-image.c b/src/balsa-mime-widget-image.c
index 088c3f8..3b1e826 100644
--- a/src/balsa-mime-widget-image.c
+++ b/src/balsa-mime-widget-image.c
@@ -147,15 +147,11 @@ img_check_size(GtkImage ** widget_p)
curr_w = gdk_pixbuf_get_width(gtk_image_get_pixbuf(widget));
else
curr_w = 0;
- gtk_widget_get_allocation(viewport, &allocation);
- dst_w = allocation.width;
- gtk_widget_get_allocation(gtk_bin_get_child(GTK_BIN(viewport)),
- &allocation);
- dst_w -= allocation.width;
+
gtk_widget_get_allocation(gtk_widget_get_parent(GTK_WIDGET(widget)),
&allocation);
- dst_w += allocation.width;
- dst_w -= 16; /* Magic number? */
+ dst_w = allocation.width;
+
if (dst_w < 32)
dst_w = 32;
if (dst_w > orig_width)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]