Allowing smaller images to show in the workbench window #3169
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.
Proposed solution for #3069
Currently, the code decides whether to show the onboarding image using a fixed threshold (
ONBOARDING_SHOW_IMAGE_HEIGHT_THRESHOLD
, 450px content height), regardless of the actual image size.My idea is to make this more adaptive by retrieve the actual image height from the label.
If the image is small (<= 250px), allow it to be shown with a lower overall height requirement (e.g., 314px total window height).
If the image is large (> 250px), keep using the existing higher threshold.
Also, from the extension point descrption:
I dont really see it take into account the @2x size for an image, so when I manually use a 500x500 image, it gets cut off anyway because of the 450 threshold. But maybe I dont know how to trigger the @2x resolution in Eclipse properly.