microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.24k stars 6.49k forks source link

[FancyZones] 1-pixel gap between adjacent windows #2151

Open DawidNezo opened 4 years ago

DawidNezo commented 4 years ago

Environment

Windows build number: Microsoft Windows [Version 10.0.17763.1158]
PowerToys version: v0.16.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

Just use templates

Expected behavior

No gaps between programs

Actual behavior

1-pixel gap between programs

Screenshots

image image image

ArttuLai commented 4 years ago

I've noticed that this happens with self-made snapzones too. More specifically, I find that there's a 1px empty space on the right side of my screen. This seems to happen with mostly UWP apps and apparently only when using scaling other than the recommended one. E.g on my Surface Laptop 3 15": no gap on recommended 150% scaling, but 1px gap on 125% scaling.

Barcelonczyk commented 4 years ago

I have default scaling (100%) and the problem still persists even with default template (2 columns). My screen has 2560 x 1440px resolution.

neuronz commented 3 years ago

The current workaround for me on a 5120 x 1440 monitor with version v0.33.1 is to set "show spaces around zones" to ON and the associated value to -2.

rodneypantonial commented 3 years ago

On a 4k Monitor, it can work well with the following settings:

davidrapan commented 3 years ago

Also noticed 1px line between window and Taskbar (2560x1440). Workaround -1 for "show spaces around zones" works, thx.

pascalpfeil commented 3 years ago

I have the same problem on my 2560x1440 screens. The -1 or -2 workaround works, but also puts some pixel of the windows in the zones on adjacent screen which look even worse. Would really love to see this fixed

davidrapan commented 3 years ago

Its certainly not ideal but as Im using it only to bridge the gap from TaskBar aka in that "Priority", it does not have any issues i know of.

Ithiloneth commented 3 years ago

I also have this problem and would normally resolve is davidrapan does; adding a negative gap. That solution is not available for Canvas layouts however, and thought I would mention that lest canvas layouts be forgotten in this discussion.

Thanks for a wonderful tool!

gregsdennis commented 3 years ago

Also experiencing this.

Between windows: gap between windows

On edge of screen: gap on screen edge

a14219 commented 2 years ago

And isn't this a problem specific to the default Windows theme? I've made some tests: image

And the only case where there's a gap between windows is when having the default Windows theme enabled and the colored window borders option disabled.

crutkas commented 2 years ago

I think some of this is hard core different frameworks. Like 2 WinWords cause no gap but calculator next to anything will. at the heart of this, we use a Windows API to basically tell the window to go to an X and Y coordinate and be a certain size. Could be UWP or maybe packaged apps. Like, Terminal and our settings apps are Islands and we get the pixel gap. But so does Github Desktop and Microsoft Teams.

Anything we do will be a total hack to solve this chances are and may cause worse side effects and edge cases.

If someone feels strongly, happy to see what someone uncovers.

fallenworld1 commented 2 years ago

It looks like windows is resized to zonesize-1px. I created custom layout with 1px overlapping zones which resolves problem with gaps between windows. But gaps between screen borders and windows remains

h3lo commented 2 years ago

Also, when using the mode that allows overlapping zones, there is no setting for the padding. Can that be exposed? Also, the zones snap to each other, not sure how to make them overlap by just 1px (they snap at 2px it seems).

cristianogalvao commented 2 years ago

I see the same gap here above the windows on this specific scenario:

  1. Create a 3 columns layout.
  2. Set up to have no borders.
  3. Place some window on any of the 3 columns. For instance, area 1.
  4. Place some window occupying 2 columns at the same time, including the previous. For instance, areas 1 + 2.

Result: I can see a tiny border above this new window, coming form the smaller one behind.

Kurti00 commented 2 years ago

I have a similar issue but related to specific programms. While it seems like most ones do use the same spacing on the edge, programms like discord are one pixel wider. Atleast the part where the indicator for "active discord" and "notification about new post" sits.

With Discord open in the background: Bild_2022-06-29_123509767 Without Discord open in the background: Bild_2022-06-29_123709365

MichaelFenwick commented 2 years ago

I'm also having this problem. The extra pixel is visible on all 4 sides of the screen (in the case of the bottom edge, it's between the windows and the taskbar) as well as between the windows themselves. I'm using a custom canvas layout with overlapping zones, on a Surface Laptop Studio running Windows 11 and with 100% display scaling. Powertoys version being used is v0.59.1. Different applications seem to do it slightly more than others (Edge windows next to one another seem to have a gap ever so slightly wider than two Windows Explorer windows next to each other, for example).

Personally I would find simply adding a "gap width" option for custom canvas layouts that allow you to specify negative numbers as an acceptable solution (positive gaps would also be a nice bonus feature). I envision that this would more or less be something that could be implemented by adding the gap width the top and left borders of the zone when sizing the window, and subtract that width from the bottom and right borders of the zone.

JohnnyPhyve commented 2 years ago

Experiencing this issue as well on 0.60.1 with only work around being to set -1 or -2 px but this causes windows to bleed over to secondary monitor or sometimes overlap

conradsrc commented 2 years ago

Also seeing this, Win10 64 bit, unchecked the "borders around windows" setting for my custom layout. Seems like where the gaps appear is pretty predictable and consistent but it's incredibly annoying.

Monitor layout: Left: 1.5 dpi scaling 4K Middle: 1 dpi scaling 1440p Right: 1 dpi scaling 1440p

I don't really use it on the 1.5 scaling 4K monitor though since it's usually set to a different computer output. I definitely see it on the other two 1.0 dpi scaling 1440p monitors.

iabdelkareem commented 2 years ago

Same issue.

image

Coding-Kiwi commented 1 year ago

For anyone having trouble setting the gap to -2 you can press "alt" to focus the range, then use the arrow keys image

myfairsyer commented 1 year ago

Same issue.

image

@iabdelkareem

This looks to me like you have a positive value in the layout's spacing setting ("space around zones", default is 16 px on my machine), not the issue of still having 1 or 2 pixels between the windows, although having set the spacing to 0 or disabled.

So, if you want, you can probably reduce the spacing a lot or even completely by just disabling the spacing and/or setting it to 0 - both via the layout's "space around zones" setting.

radutomy commented 1 year ago

Same issue here. Surprised how long this has been under the radar!

SCWells72 commented 1 year ago

I'm also seeing this with my custom layouts, and there's no option to set a negative value for "space between zones" for a custom layout. Is there no solution? It's not a huge thing given all of the benefits provided by FancyZones overall, but it is kind of annoying:

image

Theo-user commented 1 year ago

Yeah still the same issue here with the latest Firefox. It loads and shifts itself to the right which bleeds into my secondary display.

oaledo commented 1 year ago

Every window has a 1px border, however some windows' borders are (partially) transparent. Differences between window borders.

Doesn't seem like something to be fixed by PowerToys, it would have to change every window to have the same or at least non-transparent window border pixels. Sounds like it would end up being kinda hacky to me. A possible workaround for those that can't stand this could be to use some other program to draw a black/opaque 1px outline on the outer pixels of every window, covering up any transparent borders.

h3lo commented 1 year ago

I would very much prefer the workaround to be some way to set different offsets for different applications or window titles.

Or, sensing that transparent pixel and automagically adjusting for it.

My solution was to over offset because I would rather have windows overlap by 1px than show 1px of what's behind them. But this is a sub-par situation and still bothers me, albeit less than having gaps.

IvanMM-TheBreachStudios commented 1 year ago

The negative trick would work, the problem with custom layouts is that you go from 0 to -5 pixels, you can't select -2 pixels. Be able to introduce a custom value would fix it.

conradsrc commented 1 year ago

The negative trick would work, the problem with custom layouts is that you go from 0 to -5 pixels, you can't select -2 pixels. Be able to introduce a custom value would fix it.

@IvanMM-TheBreachStudios Not quite. As Coding-Kiwi noted above, use alt or click on the slider so it has "focus" and then use your left and right arrow keys to adjust it by 1 pixel at a time. I agree that the UX of this should be improved though.

IvanMM-TheBreachStudios commented 1 year ago

Thank you @IDUnavailable you saved me from my OCD

SCWells72 commented 1 year ago

@IDUnavailable, apologies for the confusion, but where is that slider? I'm not seeing it in the main FancyZones settings or in the layout editor. Or is it not available for custom layouts? This is what I see for my custom layout:

image

whereas I see the setting for the standard layouts:

image

No problem if it's unavailable for custom layouts, but I figured I'd ask just in case I'm missing the setting for them. Thanks in advance!

talski commented 1 year ago

I notice this issue only with some apps, not all, I could get it fixed playing with some dpi related configs, image

Theo-user commented 1 year ago

I notice this issue only with some apps, not all, I could get it fixed playing with some dpi related configs, image

That makes things so much worse for me.

mekwall commented 1 year ago

The negative spacing hack no longer works. Please fix this issue 😿

nkamenar commented 1 year ago

I am seeing a 1-2 pixel gap around all my zones with a custom layout. Any word on a fix for this because it's driving me crazy?

BatmanHG commented 1 year ago

I have 2 identical 1440p monitors and the minus -2 trick works but it makes one windows slightly bleed to the second monitor. If I use -1 I do not get this bleed but there is then still a 1 pixel gap between zones that I can see. It would be great if I could just use -2 but make it lock the zone to the monitor instead of bleeding to the next one.

Andy2244 commented 1 year ago

Having the same issue in custom canvas layouts. All zones have a 1px gap around them, even a single zone has this gap for the taskbar and top. All zones are snapped fully in the editor, so you have to either let them overlapp by 1-2 pixel, which is finicky to setup or as a visual workaround you can disable window shadows and pick a neutral grey background....

alystair commented 1 year ago

This is actually a critical issue on OLED displays because it causes weird color bleed through scenarios

rbgk commented 10 months ago

Bumping because same problem.

Canvas-templates do not even have the option for the gap around zones.

Using version 0.75.1

Arch-Storm commented 9 months ago

just gonna bump this as well since this is driving me insane. i thought i solved it by disabling normal windows snapping but fancyzones has the same problem :(

Shuro commented 8 months ago

Same result for me. Got windows 11, a 3440x1440 monitor and tried a custom profile. 0 Spacing: 1 pixel border around the windows. Editor allowed spacing only in 5px steps, so I edited the layout manually to -1 px spacing. Looks mostly good now, but between the windows is still 1 px spacing where the wallpaper bleeds through.

Example screenshot with pink/purple background bleeding through. image

SquiIIiam commented 8 months ago

Same experience here with -1 or -2 spacing resolving the gap but then introducing the separate issue of the window border bleeding across screen edges onto other monitors.

tmthomsen commented 8 months ago

Just upgraded to Win11 and am experiencing the same issue with 1px window borders even though spacing is set to 0px. Worked fine in Win10.

Setting the spacing to a negative value doesn't seem to fix the issue fully. Windows overlap across monitors and certain applications aren't affected (the Steam window for instance).

sqeezy commented 8 months ago

It is kind of interesting to me that this issue gets no actual reaction out of microsoft. It gets positioned as a extra part of the operating system like the windows terminal. It should just be all upside in the sense that it is independently released and that it is open source. I'm really bullish on the current state of windows developer tooling, but this issue is kind of a big deal to me. A timeline or any kind of reaction of a maintainer would be super appreciated.

channelcat commented 6 months ago

For anyone who the -1 pixel spacing will fix - mine won't let me choose -1px anymore, only -5, -10, etc.

To manually edit this, create a custom zone, then go to %localappdata%\Microsoft\PowerToys\FancyZones in explorer and edit custom-layouts.json. From there you can set the spacing to whatever you need 👍

LeGiTiM commented 6 months ago

Same experience here with -1 or -2 spacing resolving the gap but then introducing the separate issue of the window border bleeding across screen edges onto other monitors.

Setting the spacing to a negative value doesn't seem to fix the issue fully. Windows overlap across monitors and certain applications aren't affected (the Steam window for instance).

I have the same problem that prevents me from using this trick, multi-monitor is mandatory for me. :/ This whole issue is so infuriating! Can't disable that tiny useless border. Can't set it to complete black either. Can't get a consistent appearance on different programs either. Can't use the nice trick. Can't ignore it. It seems that Microsoft doesn't care because it's not considered a critical problem (if a problem at all), but you see it everywhere everyday dozens of times and it slowly drives you mad. I even tried to install theme-tweaking third-party apps just to fix this, but to no avail (and a few security warnings :X ). ... Just like a fly that'd keep bugging you again and again and again and again no matter what, pushing you to try crazy things like bloody sacrifices just to finally get some peace.

At this point I'm a bit desperate and don't think Microsoft main UI team will bother with this. It'd be awesome if Powertoys could allow to fix it. It would win the most satisfying and peace-of-mind tiny powertweak ratio ever.

Mujincore commented 5 months ago

It's the bleeding to secondary monitor problem for me. The most tolerable setting for me is -2.

JuhaniLQ commented 4 months ago

For anyone who the -1 pixel spacing will fix - mine won't let me choose -1px anymore, only -5, -10, etc.

To manually edit this, create a custom zone, then go to %localappdata%\Microsoft\PowerToys\FancyZones in explorer and edit custom-layouts.json. From there you can set the spacing to whatever you need 👍

Here's my solution for a custom layout (doesn't leave any padding anywhere):

before: after: 2024_05_28_01_25-949 After you have saved the file, just launch layout editor and the changes should take effect.

Majumafoo commented 1 month ago

For anyone who the -1 pixel spacing will fix - mine won't let me choose -1px anymore, only -5, -10, etc. To manually edit this, create a custom zone, then go to %localappdata%\Microsoft\PowerToys\FancyZones in explorer and edit custom-layouts.json. From there you can set the spacing to whatever you need 👍

Here's my solution for a custom layout (doesn't leave any padding anywhere):

before: after: 2024_05_28_01_25-949 After you have saved the file, just launch layout editor and the changes should take effect.

Giving this a thumbs up and hoping the main release can employ this. Canvas still adds a gap which cannot be modified without this method.