Skip to content

Font scaling for tab bar and column headers#132

Open
klement wants to merge 3 commits into
akissinger:masterfrom
klement:font-scaling
Open

Font scaling for tab bar and column headers#132
klement wants to merge 3 commits into
akissinger:masterfrom
klement:font-scaling

Conversation

@klement

@klement klement commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds tab_font/tab_font_size and header_font/header_font_size settings so users can control the font used in the tab bar and the search-result column headers.

Without these settings, the tab bar height and column header height are fixed by Qt's default metrics, which can clip text when users configure a large system font or a large search_font_size. This change:

  • Adds dodo.settings.tab_font / dodo.settings.tab_font_size and dodo.settings.header_font / dodo.settings.header_font_size (default empty/0 → use system font)
  • Subclasses QTabBar with a custom sizeHint so the tab height adjusts to the configured font
  • Subclasses QHeaderView with a custom sizeHint so the header height adjusts similarly

Usage in config.py:

dodo.settings.tab_font = 'DejaVu Sans Mono'
dodo.settings.tab_font_size = 14
dodo.settings.header_font = 'DejaVu Sans Mono'
dodo.settings.header_font_size = 13

Test plan

  • Without settings, tab bar and headers look unchanged
  • Set a large dodo.settings.tab_font_size and verify the tab bar grows to fit without clipping
  • Set a large dodo.settings.header_font_size and verify column headers grow to fit

klement and others added 3 commits April 10, 2026 08:07
…aders

Tab titles and search column headers (date, from, subject, tags) were
using the system default font, which looks inconsistent when users
configure large custom fonts for the rest of the UI. Add separate
tab_font/tab_font_size and header_font/header_font_size settings so
these elements can be styled independently.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Subclass QTabBar with tabSizeHint() override so Qt's layout system
properly accommodates custom tab font sizes.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Same approach as TabBar: subclass QHeaderView and override sizeHint()
to add padding based on font metrics.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

@laarmen laarmen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

There's a white strip that appears on unselected tabs after doing a local merge (without touching any configuration), this should be fixed before we can merge.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants