Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENA-148: Highlighted blocks are blurry on non-retina display in some situations #2720

Open
ericrosenbaum opened this issue Nov 12, 2021 · 8 comments

Comments

@ericrosenbaum
Copy link
Contributor

Expected Behavior

Blocks should always render crisply.

Actual Behavior

In some situations, the blocks become blurry. I had seen some reports of this on the forums, and stumbled on an example while viewing a kid's project in Chrome on my non-retina display. I noticed that the blurriness happened on a "when left arrow key pressed" stack that was highlighted because it was running.

Steps to Reproduce

  1. Use a non-retina display
  2. Start from the default project, and add this stack to the cat sprite:
    image
  3. Press the left arrow key to run the stack
  4. Note that the highlighted stack is blurry:
    image

Notes

  • The blurriness does NOT occur if you use "when space key pressed"!
  • It DOES occur for left, right, up or down arrow
  • It DOES NOT require pressing the key itself - you can click the stack to run it (if it starts with an arrow key pressed hat), and get the blurriness
  • It does NOT occur for any other key
  • It does NOT occur when using the green flag or sprite clicked hats
  • It DOES occur for certain other hats, including "when backdrop switches to backdrop1"

System Details

Chrome 95, Mac OS 10.15.7

@BryceLTaylor
Copy link
Contributor

I just did some follow up research and it looks like, on mac, if you use Firefox or Safari it will be blurry no matter which key you include in the hat block. Chrome is doing something different that makes it not be blurry in some situations.

On Chrome, changing the what is in the dropdown while the block is running causes the blur to change. So starting with "When Left Key Pressed" it will be blurry when run. But if you change it to the a "When Space Key Pressed" while it's running it will stop being blurry.

@apple502j
Copy link
Contributor

This may be a regression on Chrome side.

@griffpatch
Copy link

griffpatch commented Nov 15, 2021 via email

@BryceLTaylor BryceLTaylor transferred this issue from scratchfoundation/scratch-gui Nov 18, 2021
@sakhiy2010
Copy link

Mine too! When I clicked the green flag, it's become so blurry.

@nexensys
Copy link

It looks like the transform: translateZ(0) hack can repvent this blurriness in chrome. Scratch Addons (specifically me) is looking into adding a patch for this that will fix the issue for both running blocks as well as the blocks made transparent by one of the addons, but we (I) have yet to find a way to work in this translation without breaking the transition placed on the elements by Blockly.

@cwillisf cwillisf changed the title Highlighted blocks are blurry on non-retina display in some situations ENA-148: Highlighted blocks are blurry on non-retina display in some situations Oct 11, 2022
@benjiwheeler
Copy link
Contributor

I was able to experience the problem using Chrome 105.0.5195.125 (Official Build) (arm64) on an M1 MacBook Pro with a retina screen -- it's hard to see the blurriness, but by zooming the screen (using control-scroll) it's very clear.

Interestingly, I encountered the problem with "when left arrow key pressed" and "when space key pressed" both, but not with "when c key pressed" or with a green flag hat block.

"when left arrow key pressed", not running:
image

"when left arrow key pressed", running (note much more anti-alias blurring):
image

"when c key pressed", not running:
image

"when c key pressed", running (note no difference):
image

@benjiwheeler
Copy link
Contributor

It looks like the transform: translateZ(0) hack can repvent this blurriness in chrome. Scratch Addons (specifically me) is looking into adding a patch for this that will fix the issue for both running blocks as well as the blocks made transparent by one of the addons, but we (I) have yet to find a way to work in this translation without breaking the transition placed on the elements by Blockly.

@ErrorGamer2000 Did you ever make that patch? If so, I'd be curious to know what/where your fix was

@nexensys
Copy link

nexensys commented Oct 13, 2022

@benjiwheeler I wasn't able to make it work due to the way that the workspace svgs work, sorry. I may make another attempt soon though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants