• Peter Bloomfield's avatar
    text-view: Do not double-allocate borders · 4b4ae446
    Peter Bloomfield authored
    Reverts part of Commit 25b67af3
    The 'width' part of the commit is the cause of #628: requisition->width
    is first set to priv->layout->width, which already includes
    priv->left_border + priv->right_border. It's a bit labyrinthine, but
    *  layout->width is set in update_layout_size() (gtktextlayout.c line 992)
       as the maximum line width, and
    *  the line width is set to display->width in gtk_text_layout_real_wrap()
       (gtktextlayout.c line 1183), and
    *  display->width is set to text_pixel_width + h_margin + h_padding in
       gtk_text_layout_get_line_display() (gtktextlayout.c line 2584), and
    *  h_margin + h_padding is the same as priv->left_border +
    Adding it again leads to an increase in the size-request, which
    results in wider lines; rinse and repeat.
gtktextview.c 355 KB