fix: render web page at display pixel ratio (crisp HiDPI, GUI-Scale-independent) — 1.6.2 - #26
Merged
Merged
Conversation
Size the browser view to the window's physical framebuffer pixels (so the OSR texture draws 1:1 → sharp) and apply CEF page zoom equal to the OS content scale, so the page's CSS viewport stays logical and does not track Minecraft's GUI Scale. Uses only the public setZoomLevel API — no device_scale_factor and no reflection. Bump to 1.6.2.
KoSHeroff
force-pushed
the
fix/device-scale
branch
from
July 26, 2026 16:29
090e909 to
f87040b
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.
Что
Страница теперь масштабируется корректно и остаётся чёткой на HiDPI/Retina, и больше не меняет размер при смене GUI Scale.
Как
CefBrowserOsr.scaleFactor_), поэтому вью рендерится в физическом разрешении → чётко, а CSS-вьюпорт логический и не зависит от GUI Scale.Объём
Только device scale (
WebViewLayout+ правки ресайза/мыши вWebViewScreen/WebHudOverlay). Reuse браузера и фикс буфера обмена (Ctrl+C) — не входят в этот релиз. Bump до 1.6.2.Примечание
Проверено на 26.2 (рендер в физическом разрешении). Отдельный флейки macOS-хэнг MCEF 2.2.0 на 1.21.11-neoforge к этому не относится.