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 269
    • Merge requests 269
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • 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
  • Issues
  • #5863

Horizontal GtkBoxLayout has (unnecessarily) higher minimum height after baseline patches

This has been found by @sthursfield's QA tests for nautilus, in which the headerbar had misteriously grown 2 pixels taller.

But it can be reproduced with gtk4-widget-factory (page 3) or anywhere else where an horizontal GtkBox contains 2 children with different baselines.

image image

Note how, in the second picture (after setting :visible to FALSE on the first entry using the inspector), the box is 2 pixels shorter (36px vs 34px).

What's happening is that the two child entries have different baselines (at 18 vs at 20), as can be seen using the inspector to set :valign on both to BASELINE_CENTER. image

Git bisects to e1875876

Reading gtk_box_layout_compute_opposite_size(), I understand it sets a minimum height that's large enough to align baselines... even if no child is asking for baseline alignment.

Both in nautilus and gtk4-widget-factory the children's :valign are simply defaulting to FILL, so they get 2px taller than their minimum height.

The GtkBox minimum height being 2 pixels taller than its children's minimum height is a behavior change.

Assignee
Assign to
Time tracking