Skip to content

Add a Safari-style minimum text size for app chrome - #750

Draft
simonheimlicher wants to merge 1 commit into
onevcat:mainfrom
silvarbor:add-safari-style-minimum-text-size
Draft

Add a Safari-style minimum text size for app chrome#750
simonheimlicher wants to merge 1 commit into
onevcat:mainfrom
silvarbor:add-safari-style-minimum-text-size

Conversation

@simonheimlicher

Copy link
Copy Markdown

Prowl's chrome is built from SwiftUI text styles, so it follows the system text size and nothing else. On a large display at a comfortable terminal font, the sidebar, Active Agents panel, toolbar and tab bar sit several points smaller. The terminal beside them carries the larger text. macOS offers no control that lifts them without scaling the whole interface.

This adds a floor rather than a scale, in the shape Safari uses for "Never use font sizes smaller than". Chrome text below the chosen size is lifted to it, and text already above it is left alone. The picker sits in Appearance and offers System plus 11 to 16 pt.

InterfaceTextMetrics resolves a text style against the floor. interfaceFont applies it from the environment, and fixedInterfaceFont marks the sizes that are layout constants rather than reading matter. A custom SwiftLint rule keeps new chrome views on the modifier. That rule caught the two settings views added since this work began, and both are converted here.

Terminal content is untouched. It has its own font setting and is not chrome.

Draft, because it is unsolicited and large. The floor values, the picker's home in Appearance, and the lint rule are each easy to reshape if you want a different answer.

Verification on 1095ff06: make check passes, and make test reports zero failures across 2907 tests. What I cannot verify is appearance: the diff touches 82 views, and I have read each conversion rather than looked at every one on screen.

An earlier version of this was opened here as #680 and closed immediately, because it was meant for a fork. This is that work rebased onto current main.

Prowl's chrome is built from SwiftUI text styles, which follow the system
text size and nothing else. On a large display at a comfortable terminal
font, the sidebar, Active Agents panel, toolbar and tab bar render text
several points smaller than the terminal beside them, and macOS offers no
control that lifts them without scaling the whole interface.

Add a floor rather than a scale, in the shape Safari uses for "Never use
font sizes smaller than": chrome text below the chosen size is lifted to
it, and text already above it is left alone. The picker sits in the
Appearance section and offers System plus 11-16 pt.

`InterfaceTextMetrics` resolves a style against the floor, `interfaceFont`
applies it from the environment, and `fixedInterfaceFont` marks the sizes
that are layout constants rather than reading matter. A custom SwiftLint
rule keeps new chrome views on the modifier. Terminal content is
untouched: it has its own font setting and is not chrome.
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.

1 participant