Commit 83eb184c authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

When not wrapping, do the offset of the line for justification ourselves.

Sat Mar 13 18:13:13 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): When not
        wrapping, do the offset of the line for justification ourselves.
        (#120256, Felipe Heidrich)
parent a6361456
Sat Mar 13 18:13:13 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display): When not
wrapping, do the offset of the line for justification ourselves.
(#120256, Felipe Heidrich)
Sun Mar 14 00:03:18 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellview.c (gtk_cell_view_expose): Support the
......
Sat Mar 13 18:13:13 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display): When not
wrapping, do the offset of the line for justification ourselves.
(#120256, Felipe Heidrich)
Sun Mar 14 00:03:18 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellview.c (gtk_cell_view_expose): Support the
......
Sat Mar 13 18:13:13 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display): When not
wrapping, do the offset of the line for justification ourselves.
(#120256, Felipe Heidrich)
Sun Mar 14 00:03:18 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellview.c (gtk_cell_view_expose): Support the
......
Sat Mar 13 18:13:13 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display): When not
wrapping, do the offset of the line for justification ourselves.
(#120256, Felipe Heidrich)
Sun Mar 14 00:03:18 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellview.c (gtk_cell_view_expose): Support the
......
Sat Mar 13 18:13:13 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_get_line_display): When not
wrapping, do the offset of the line for justification ourselves.
(#120256, Felipe Heidrich)
Sun Mar 14 00:03:18 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellview.c (gtk_cell_view_expose): Support the
......
......@@ -2091,6 +2091,26 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout,
display->width = PIXEL_BOUND (extents.width) + display->left_margin + display->right_margin;
display->height += PANGO_PIXELS (extents.height);
/* If we aren't wrapping, we need to do the alignment of each
* paragraph ourselves.
*/
if (pango_layout_get_width (display->layout) < 0)
{
gint excess = display->total_width - display->width;
switch (pango_layout_get_alignment (display->layout))
{
case PANGO_ALIGN_LEFT:
break;
case PANGO_ALIGN_CENTER:
display->x_offset += excess / 2;
break;
case PANGO_ALIGN_RIGHT:
display->x_offset += excess;
break;
}
}
/* Free this if we aren't in a loop */
if (layout->wrap_loop_count == 0)
invalidate_cached_style (layout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment