diff options
author | Stefan Kost <ensonic@users.sf.net> | 2010-10-12 11:37:36 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2010-10-12 11:37:36 +0300 |
commit | e764419f34551ef7c89a5bd993059ff71c1e76b8 (patch) | |
tree | ad726c3d95c6be3108504c34444e7e1cb1f2d162 | |
parent | dc6ec22b87095fbea8447ba535769f4efc22c904 (diff) |
ui: also set DPI on canvas
-rw-r--r-- | src/ui/main-window.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/main-window.c b/src/ui/main-window.c index b85bbcc..38ac07b 100644 --- a/src/ui/main-window.c +++ b/src/ui/main-window.c @@ -128,6 +128,7 @@ G_DEFINE_TYPE (GstTLMainWindow, gsttl_main_window, GTK_TYPE_WINDOW); #define LABEL_FONT_NAME "Sans" #define LABEL_FONT LABEL_FONT_NAME " " LABEL_FONT_SIZE #define PAD_TYPE_FONT_SIZE "28" +#define DPI 72.0 /* tell graphviz to have y=0 at top * causes negative coordinates :/, known bug in some graphviz 2.26 @@ -197,7 +198,7 @@ refresh_layout (GstTLMainWindow *self, GstTLRefreshMode mode) GPtrArray *arr; GPtrArray *parr; gchar *attr; - gdouble dpi = 72.0; /* this is hardcoded in dot */ + gdouble dpi = DPI; /* this is hardcoded in dot */ gchar iname[30]; Agraph_t *parent, *root; gboolean re_run; @@ -1279,6 +1280,8 @@ gsttl_main_window_init (GstTLMainWindow *self) "bounds-padding", 10.0, "background-color-rgb", 0xffffffff, /*"redraw-when-scrolled", TRUE,*/ + "resolution-x", DPI, + "resolution-y", DPI, NULL); gtk_container_add (GTK_CONTAINER (scrolled_win), GTK_WIDGET (self->priv->canvas)); self->priv->canvas_root = goo_canvas_get_root_item (self->priv->canvas); |