GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add a Resize columns to contents action and a row padding setting by deepsidhu1313 · Pull Request #4250 · sqlitebrowser/sqlitebrowser

Conversation

@deepsidhu1313

@deepsidhu1313 deepsidhu1313 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Two independent commits.

  1. "Resize columns to contents" entry in the column header context menu of Browse Data (refs Add ability to "auto-size" columns in Data Browser #2351). The columns are fitted once when a table is opened and a single column can be fitted by double-clicking a header separator, but there was no way to fit all columns again on demand. The resize-and-cap logic (same 300 px cap) moved from TableBrowser::fetchedData into ExtendedTableWidget::fitColumnsToContents(), which the automatic and the manual resize now share. Hidden columns stay hidden. New test-extended-table-widget (the test did not compile before and failed by assertion against a stub).
  2. New setting "Row padding (px)" (databrowser/row_padding, Preferences > Data Browser > Content) for the row height of the data grids (refs Row height option #419). The default stays 10, so row heights do not change by default. While testing it turned out that Qt does not let a header's default section size go below its minimum section size, which depends on the row header's font, so a small padding or a small data font never made rows smaller; the minimum section size is now set to the data font's line height first. Visible difference: rows can now be dragged shorter than before, down to one line of text.

Refs #2351, #419

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
claude added 2 commits October 31, 2026 17:54
@claude
Add 'Resize columns to contents' to the Browse Data column menu
03d4d0e
The columns of the Browse Data tab are sized to their contents once when a
table is opened, and a single column can be resized by double-clicking its
header separator, but there was no way to fit all columns again after the
data or the window had changed. Add a 'Resize columns to contents' entry to
the column header context menu for that.

The resize-and-cap logic that used to live in TableBrowser::fetchedData is
moved to ExtendedTableWidget::fitColumnsToContents, which is shared by the
automatic and the manual resize and is covered by a new offscreen test.
Hidden columns are left alone and the existing 300 pixel cap is kept.

See sqlitebrowser#2351
@claude
Add a preference for the row padding of the data browser
3d08876
The height of the rows in the data browser and in the SQL results is the
height of the data browser font plus a hard-coded 10 pixels, so there was no
way to see more rows on the screen except for making the font smaller. Add
a 'Row padding (px)' option to the Data Browser tab of the preferences. Its
default of 10 keeps the current row height.

Qt does not let the default section size of a header become lower than its
minimum section size, which by default depends on the font of the row
header and not on the font of the data. Set the minimum to the height of a
line of text so that low padding values take effect.

See sqlitebrowser#419

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@deepsidhu1313 @claude
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.