librsvg r1157 - trunk
- From: doml svn gnome org
- To: svn-commits-list gnome org
- Subject: librsvg r1157 - trunk
- Date: Sun, 24 Feb 2008 16:28:34 +0000 (GMT)
Author: doml
Date: Sun Feb 24 16:28:34 2008
New Revision: 1157
URL: http://svn.gnome.org/viewvc/librsvg?rev=1157&view=rev
Log:
bump version; adjust for frame borders
Modified:
trunk/configure.in
trunk/test-display.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Sun Feb 24 16:28:34 2008
@@ -22,7 +22,7 @@
LIBRSVG_MAJOR_VERSION=2
LIBRSVG_MINOR_VERSION=22
-LIBRSVG_MICRO_VERSION=0
+LIBRSVG_MICRO_VERSION=1
AC_SUBST(LIBRSVG_MAJOR_VERSION)
AC_SUBST(LIBRSVG_MINOR_VERSION)
AC_SUBST(LIBRSVG_MICRO_VERSION)
Modified: trunk/test-display.c
==============================================================================
--- trunk/test-display.c (original)
+++ trunk/test-display.c Sun Feb 24 16:28:34 2008
@@ -505,15 +505,24 @@
populate_window (GtkWidget * win, ViewerCbInfo * info, int xid, gint win_width, gint win_height)
{
GtkWidget *vbox;
- GtkWidget *toolbar;
GtkWidget *scroll;
- GtkToolItem *toolitem;
gint img_width, img_height;
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (win), vbox);
+ /* create a new image */
+ info->image = gtk_image_new_from_pixbuf (info->pixbuf);
+
+ /* pack the window with the image */
+ img_width = gdk_pixbuf_get_width (info->pixbuf);
+ img_height = gdk_pixbuf_get_height (info->pixbuf);
+
if (xid <= 0) {
+ GtkWidget *toolbar;
+ GtkToolItem *toolitem;
+ GtkRequisition requisition;
+
toolbar = gtk_toolbar_new ();
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0);
@@ -524,14 +533,18 @@
toolitem = gtk_tool_button_new_from_stock (GTK_STOCK_ZOOM_OUT);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, 1);
g_signal_connect (G_OBJECT (toolitem), "clicked", G_CALLBACK (zoom_out), info);
- }
- /* create a new image */
- info->image = gtk_image_new_from_pixbuf (info->pixbuf);
+ gtk_widget_size_request(toolbar, &requisition);
+
+ g_print("w: %d | h: %d\n", requisition.width, requisition.height);
+
+ /* HACK: adjust for frame width & height + packing borders */
+ img_height += requisition.height + 30;
+ win_height += requisition.height + 30;
+ img_width += 20;
+ win_width += 20;
+ }
- /* pack the window with the image */
- img_width = gdk_pixbuf_get_width (info->pixbuf);
- img_height = gdk_pixbuf_get_height (info->pixbuf);
if ((xid > 0 && (img_width > win_width || img_height > win_height))
|| (xid <= 0)) {
gtk_window_set_default_size (GTK_WINDOW (win), MIN (img_width, win_width),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]