Sublime Forum

ColorHelper 2.0.0

#94

Thanks for the reply.

However, setting "mdpopups.font_scale": 1 didn’t seem to have any effect, I tried 1, 1.0, 2.0 and 0.5, no difference at all.

BTW @wbond

0 Likes

#95

Works for me in Windows with 3121/3122 with no dpi scaling.

Maybe it’s worth checking whether the built in Tools -> Developer -> Show Scope Name -> Copy works for you to see if it is some bug on your platform or something specific to ColorHelper?

0 Likes

#96

@kingkeith good thinking.

Just tried, copy doesn’t work either. To make sure it’s not some weird hidden offset, I clicked through the whole popup, nothing. wait I take that back, it IS some scaling issue. I managed to click the link at (x/2, y/2) of where it appears. (if you know what I mean)

so, there is exactly one issue that’s causing the two symptoms here.

1 Like

#97

Tomorrow I’ll be able to try this out on a Windows 4K system. I’ll let you know what I find, but sadly there is nothing I can really offer in the way of support today. That is the risk of running bleeding edge builds.

0 Likes

#98

Thanks, appreciate your fast replies!

0 Likes

#99

looks like it is a bug in ST’s minihtml when dpi_scale is > 1:

0 Likes

#100

Cool. That is kind of what I was figuring as the code I wrote shouldn’t have suddenly stopped working just because Sublime updated, but I wasn’t sure as I hadn’t yet formally tested it on Windows.

0 Likes

#101

Yes, there are are two scaling issues in 3121/3122 affecting HiDPI on Windows/Linux:

  • hit targets for links are offset
  • scrolling can causes lines of content to be occluded from view before they should be

Fixes for these will be in the next build.

4 Likes

#102

Thanks for the confirmation. I’ll wait for the next release.

0 Likes

#103

Hi, with ST3123 the links are now clickable at where they appear, and no longer appear as “stroke through”.

However, the color squares are still remarkably large (as before) no matter what value I set in “mdpopups.font_scale”

0 Likes

#104

I will give it a try. I haven’t upgraded yet due to other stability issues in previous versions of Sublime dev. But again, it may still be a Sublime issue, but I’ll check.

0 Likes

#105

Just an FYI, build 3123 is the last dev build before we release 3124 as a beta – baring any reports of major issues.

0 Likes

#106

@wbond, Thanks, I will try and get any bug reports in soon if discovered. I have meetings all day these next two days, so I may not get to test any of this stuff out until Friday :(.

0 Likes

#107

I see the same, and it seems to be related to what value I set in the Windows 10 display settings scaling slider (I don’t know what that changes under the hood). But you can see in the attached image what the color boxes look like at 100% vs what happens when scaling goes up to 150%. The larger the scaling percentage, the bigger the color boxes get.

0 Likes

#108

@wbond, one thing I 've noticed on my 4K setup is that image distortion is back; notice the how some borders are thicker than others:

With that said, I don’t see the large image issue, at least not on my 4K setup; I’m using 125% scaling on Windows 7.

I will try out my Windows 10 machine tonight, but I am also using a scaling hack/app that let’s me scale things like they did in Windows 7, so I’m not sure how that will turn out.

0 Likes

#109

If you are running at 125% perhaps the pixel dimensions of your images are not equaling the pixels on your screen? If you can paste the HTML, CSS and one of the images here, I can try and dig into see why it may be displayed that way.

The most recent distortion I recall was caused by the image being taller than the line-height, and the code calculating the padding to account for the line height was resulting in negative padding. This looks like a different issue.

There of course was a change when we fixed rendering all non-font CSS dimensions as device-independent pixels on Windows and Linux instead of as device pixels. This is how OS X has always done it, since the OS takes care of the scaling. This is why I am guessing it is some sort of interplay between the scale (125%) and device pixels. I would imagine that the ST codebase should handle painting your image with interpolated pixels, but that is why the CSS, HTML and image would help. Otherwise I may find working examples that are just different than the non-working code you have.

0 Likes

#110

I’ll try to post a simple example later today.

0 Likes

#111

@jcberquist, As I recall, Windows 10 scales GUI stuff very different to how they used to. So much so that I found it very annoying. Some apps had blurry graphics that weren’t blurry in Windows 7 (I think they double the size of graphics similar to Apple retina, but I found many apps incompatible with these changes). The more I think about this, the more I’m fairly certain this issue is most likely Windows 10 specific. When I verify on my Windows 10 machine, I will probably also disable my scaling hack/app that reverts things to the Windows 7 way to be sure.

0 Likes

#112

Unfortunately, I missed reporting before ST’s next beta, but I am very much convinced that ST has introduced new image sizing issues (not like the one that was just fixed, but like previous issues before that). Looks to be stretching images in the X and/or Y directions. Hopefully I will get around to posting a stripped down example tonight.

Still haven’t had a chance to test out scaling on Windows 10, but hopefully tonight as well, been a busy week for me.

0 Likes

#113

I do have an answer now for why we are getting larger than normal images in ColorHelper.

  1. The reason the scale factor in mdpopups isn’t working is because 1) images where never affected by the font scale. Images are sized based on line height. The reason why fonts are aren’t affected by recently by scale height is because mdpopups had implemented its own relative fonts, but in recent builds, Sublime provided its own relative font units. So in the latest builds, mdpoups uses Sublime’s relative font implementation by default instead of our cobbled together hack. You would have to change the default CSS to take advantage of the old font scale hack, but this is not recommended as the Sublime implementation is better and is the recommended way. So in short, I incorrectly recommended changing the font scale for recent builds. I simply forgot about these changes.

  2. Images are large because Sublime is now reporting line heights as 2X bigger in Windows 10 (have not tried Linux) than other OS’s (this is only in the very latest Sublime builds that added hi def support for Windows and Linux).

So I need to now detect Windows 10 systems with hi def screens. Python isn’t quite reporting a helpful windows version, but I am sure I should be able to figure out detection of Windows 10 systems from Windows 8 systems soon.

What is more difficult is telling when Sublime is being used on a 4k system. @wbond, @jps can we please get an API check that mentions when Sublime is in hidpi mode?

In the short term, I will work on detecting Windows 10 systems and provide a setting that can be toggled in either mdpoups or the plugin of interest (I’ll have to see where it makes sense – mabye I’ll provide a function in mdpopups that gives a useful line height) so we can calculate image height properly.

0 Likes