Add a Safari-style minimum text size for app chrome - #750
Draft
simonheimlicher wants to merge 1 commit into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.
InterfaceTextMetricsresolves a text style against the floor.interfaceFontapplies it from the environment, andfixedInterfaceFontmarks 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 checkpasses, andmake testreports 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.