Skip to content

Improve default/auto window size - #234

Open
ki7dk wants to merge 1 commit into
sbarex:mainfrom
tissue-systems:quicklook-window-size
Open

Improve default/auto window size#234
ki7dk wants to merge 1 commit into
sbarex:mainfrom
tissue-systems:quicklook-window-size

Conversation

@ki7dk

@ki7dk ki7dk commented Aug 19, 2026

Copy link
Copy Markdown

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.

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
ki7dk force-pushed the quicklook-window-size branch from d4232b9 to cbaed6f Compare September 6, 2026 22:54
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