diff options
author | Jonathan Blandford <jrb@gnome.org> | 2004-09-16 06:16:38 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2004-09-16 06:16:38 +0000 |
commit | fa3293eb5e2fd48bb83099b11665bb0fb3257e98 (patch) | |
tree | bcc284263c8362979032abfde67b4c24bae39a8c /gtk/gtkcellrenderertext.c | |
parent | f135a7cfe599ab5fe3420fa8268b564ce5c93ca3 (diff) | |
download | gtk+-fa3293eb5e2fd48bb83099b11665bb0fb3257e98.tar.gz |
load images at normal size.
Thu Sep 16 02:07:56 2004 Jonathan Blandford <jrb@gnome.org>
* docs/tools/widgets.c (create_icon_view): load images at normal
size.
* docs/reference/gtk/images/*png: Update shots.
Diffstat (limited to 'gtk/gtkcellrenderertext.c')
-rw-r--r-- | gtk/gtkcellrenderertext.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index 4c7bd27788..6516ff11fc 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -1414,6 +1414,10 @@ gtk_cell_renderer_text_get_size (GtkCellRenderer *cell, { *x_offset = ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ? (1.0 - cell->xalign) : cell->xalign) * (cell_area->width - rect.width - (2 * cell->xpad)); + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + *x_offset -= rect.width; + if (celltext->text && !strcmp ("Makefile", celltext->text)) + g_print ("x_offset: %d %d %d\n", cell_area->width, *x_offset, rect.width); *x_offset = MAX (*x_offset, 0); } if (y_offset) @@ -1505,6 +1509,8 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell, else pango_layout_set_width (layout, -1); + if (celltext->text && !strcmp ("Makefile", celltext->text)) + g_print ("render: %d %d %d\n", cell_area->x, cell_area->width, cell_area->x + x_offset + cell->xpad); gtk_paint_layout (widget->style, window, state, @@ -1515,6 +1521,12 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell, cell_area->x + x_offset + cell->xpad, cell_area->y + y_offset + cell->ypad, layout); + gdk_draw_line (window, widget->style->black_gc, + cell_area->x + x_offset + cell->xpad, + cell_area->y + y_offset + cell->ypad, + cell_area->x + x_offset + cell->xpad, + cell_area->y + y_offset + cell->ypad + 20); + g_object_unref (layout); } |