Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • gtk gtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 1.6k
    • Issues 1.6k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 242
    • Merge requests 242
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gtkgtk
  • Merge requests
  • !235
The source project of this merge request has been removed.

Resolve #628: "TextView: spaces acting as non-breaking whitespace if :left- or :right-margin is set"

Closed Peter Bloomfield requested to merge (removed):628-text-view-width into gtk-3-22 Jul 08, 2018
  • Overview 2
  • Pipelines 0
  • Changes 1

Reverts part of Commit 25b67af3

The 'width' part of the commit is the cause of #628 (closed): requisition->width is first set to priv->layout->width, which already includes priv->left_border + priv->right_border. It's a bit labyrinthine, but essentially:

  • 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 + priv->right_border.

Adding it again leads to an increase in the size-request, which results in wider lines; rinse and repeat.

Closes #628 (closed)

Edited Jul 08, 2018 by Peter Bloomfield
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 628-text-view-width