Improve default/auto window size - #234
Open
ki7dk wants to merge 1 commit into
Open
Conversation
The extension passes Settings.qlWindowSize to QLPreviewReply, which is 0 x 0 unless a custom size is set, so macOS falls back to a window nearly as wide as the screen. default.css lays the document out in a 902px column, so the text sits in a narrow strip with large empty margins. default.css now declares that column as --content-max-width, used by the existing pre and article rules, and Settings reads the property back from the style sheets actually applied: the custom style first, since it is emitted last and wins the cascade. The column plus room for the gutters and the scroller is the suggested width, clamped to 90% of the visible screen. Render-as-code mode is not laid out in a column and gets a wider default; a style declaring no column falls back to 960 x 1000 points. Custom styles opt in by declaring --content-max-width themselves. Choosing the style sheets was duplicated between the renderer and the new lookup, so it moves to getAppliedCSS(). In the settings window the width and height fields and their labels were bound to hidden, so selecting Auto removed the row from the layout and gave no indication of the size in use. They bind enabled instead, as the two text fields already did, and the greyed-out fields show the size Auto derives. Claude-Session: https://claude.ai/code/session_011kpYUM9yoVnk3Zcg4gkK9B
ki7dk
force-pushed
the
quicklook-window-size
branch
from
September 6, 2026 22:54
d4232b9 to
cbaed6f
Compare
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.
Improve out-of-the-box behavior: when installing and running QLMarkdown the 'auto' setting now gets a better suited window size. On larger screens (4k/5k res) the default quicklook window is very wide, with huge left - and right margins.