microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
108.19k stars 6.39k forks source link

FancyZones: "Space around zones" not applied correctly #28626

Open ScottCE opened 11 months ago

ScottCE commented 11 months ago

Microsoft PowerToys version

0.73.0

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

FancyZones

Steps to reproduce

  1. Set a desktop background of a different color than the Windows theme (e.g. red if using a Dark theme)
  2. Set any Template or Custom layout with "Space around zones" to either "0 px" or disabled (or both)
  3. Shift+Drag a window into each zone
  4. Notice that a 1-pixel line of desktop background around and between each zone is visible

Curiously, this appears to only happen with my Custom template (two column zones split at roughly a third of the way from the left edge) on my secondary 1440p monitor, where I have it applied all the time. On my primary 2160p (4k) monitor, the Custom template does not have this 1-pixel border issue, however all of the default templates still do.

✔️ Expected Behavior

With "Space around zones" enabled and set to "0 px" or with the option disabled, the expected behavior is for each zone to fill all available space.

❌ Actual Behavior

Using any template on any monitor (other than my Custom template, as described above) leaves a 1-pixel border around and between each zone. My rotating desktop backgrounds include some bright images that often bleed through, causing a distraction while trying to focus. After moving windows into the zones I want, I have to manually drag the borders horizontally and vertically to cover the pixel-wide border. And because I use a KVM switch to access a secondary PC, nearly all application windows are reorganized frequently and I have to readjust windows almost daily.

Other Software

I have not found any applications where this does not apply other than those that cannot be resized down to the width or height of a given zone, such as MS Paint on Windows 11.

ScottCE commented 11 months ago

Slight correction: between zones the desktop background "bleed through" is two pixels wide between zones. This is due to the one pixel boundary around each zone laying next to each other.

Fureniku commented 10 months ago

+1 on this. It's made worse by the fact you can now only set the size around zones in 5px increments while in older versions you could set any value, so you can't even compensate for it manually

ScottCE commented 1 month ago

I had not checked back on this issue in a while, but after upgrading to 0.82.0 this morning I decided to take a look. Adjusting the settings for the first time in months, I now see that the "Space around zones" option can be used as a workaround for the first time.

With the option enabled and set to 0 the problem remains exactly as before after re-snapping two different programs' windows. With a setting of -1, I no longer see my desktop image around the top and outer side of any window after re-snapping, however I do still see two pixels of background image between windows that border each other. A setting of -2 hides the background image entirely for the first time.

In my initial report, I stated that the problem occurred on my 1440p monitor, but not my 4k monitor. The latter monitor has since died and I'm using my laptop's built-in 1080p screen in its place, though it's a poor substitute. With this configuration, both screens have the same issue when using either a custom layout or a default layout, and the -2 pixel "Space around zones" setting fixes the unexpected bleed-through issue.

With that said, I still interpret this as a bug. If I set the "Space around zones" to be "0 pixels," it seems reasonable to expect 0 pixels of background to be visible around the windows snapped to a zone. A setting of -2 implies that neighboring windows will overlap each other by two pixels rather than being 0 pixels apart.