Repository navigation
Conversation
… in DefaultSettingsWidgetFactory
Eccys
force-pushed
the
fix/wide-setting-double-scale
branch
from
October 24, 2026 06:09
f4194ee to
5403ffd
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.
Type of change
Description
MeteorGuiTheme.scale(double value), the 26.1 Mojmap migration (26.1 Update #6266) replacedmc.getWindow().getWidth() / mc.getWindow().getFramebufferWidth()withmc.getWindow().getWidth() / mc.getWindow().getWidth()(which always evaluates to1.0). In Mojmap,Window.getScreenWidth()is the window width in screen coordinates andWindow.getWidth()is the framebuffer pixel width, so(double) mc.getWindow().getScreenWidth() / mc.getWindow().getWidth()restores the intended macOS Retina scale adjustment.DefaultSettingsWidgetFactory,WWidget.calculateSize()scalesthis.minWidthviatheme.scale(this.minWidth). However, bothlist.minWidth = list.width(afterlist.calculateSize()) andcell.minWidth(Utils.getWindowWidth() - Utils.getWindowWidth() / 4.0)forsetting.wideassign values that are already in scaled framebuffer pixels, causingWWidget.calculateSize()to multiply them bytheme.scale(...)a second time (and a third time forsetting.widevialist.minWidth). Dividing these pixel widths bytheme.scale(1)before assigningminWidthprevents the double-scaling.Related issues
Fixes #5632
How Has This Been Tested?
Compiled and verified with
./gradlew compileJava.Checklist: