You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Moving portals around the desktop is easy enough, but aligning them in a grid can be difficult. It usually involves opening a calculator and figuring out the correct size & position for each portal, then typing them in manually.
Grid snapping on the desktop would be handy for aligning your portals without having to fiddle with each portal as much.
Describe the solution you'd like
In the Portals window (maybe under 'Home' or the top of 'Settings'), there would be a few settings next to each other:
Enable Grid Snapping
Grid Width (Pixels)
Grid Height (Pixels)
Grid Horizontal Offset (Pixels)
Grid Vertical Offset (Pixels)
Grid Anchor Location:
Top Left (default), Top Right, Bottom Left, Bottom Right
The grid offsets are useful in case you want your portals on a 32x32 grid, but distanced from the edge of the screen by 8px to account for the taskbar, the current wallpaper, or something else.
With a grid size of 64x64 and an offset of 32x32, the grid would act like this:
(the grid doesn't need to be visualized)
With an offset of 96x96 or even 672x672, the grid would still act like that. This may not be ideal for everyone but I think it's OK enough for most use cases; it will just be a little inconvenient starting the grid in the middle of your screen.
The grid anchor location can also be changed, though this isn't necessary and only saves a little math for users who want the grid to start from a different corner of the screen. The coordinate system in Portals starts from the top left. This doesn't change; the grid anchor location only affects how grid snapping works.
Example behavior:
(the code isn't exact, just illustrates that the other anchor modes require grid snapping to factor in window size as well)
Regular snapping: (window_pos.x + grid_offset.x + grid_size.x / 2) % grid_size.x
Inverted snapping: (window_pos.x - grid_offset.x - grid_size.x / 2 + window_size.x) % grid_size.x
Top left anchor (default):
Window X position: regular snapping
Window Y position: regular snapping
Top right anchor:
Window X position: inverted snapping
Window Y position: regular snapping
Bottom left anchor:
Window X position: regular snapping
Window Y position: inverted snapping
Bottom right anchor:
Window X position: inverted snapping
Window Y position: inverted snapping
Describe alternatives you've considered
It's not hard to pull out/open a calculator and do these calculations by hand, but grid snapping would save time and be handy for organizing your desktop portals.
I saw this issue (#32) explaining relative window positioning. While it is useful (and I might redesign my portals with it in the future), it's a little different from grid snapping.
Additional context
n/a
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Moving portals around the desktop is easy enough, but aligning them in a grid can be difficult. It usually involves opening a calculator and figuring out the correct size & position for each portal, then typing them in manually.
Grid snapping on the desktop would be handy for aligning your portals without having to fiddle with each portal as much.
Describe the solution you'd like
In the Portals window (maybe under 'Home' or the top of 'Settings'), there would be a few settings next to each other:
The grid offsets are useful in case you want your portals on a 32x32 grid, but distanced from the edge of the screen by 8px to account for the taskbar, the current wallpaper, or something else.
With a grid size of 64x64 and an offset of 32x32, the grid would act like this:
(the grid doesn't need to be visualized)
With an offset of 96x96 or even 672x672, the grid would still act like that. This may not be ideal for everyone but I think it's OK enough for most use cases; it will just be a little inconvenient starting the grid in the middle of your screen.
The grid anchor location can also be changed, though this isn't necessary and only saves a little math for users who want the grid to start from a different corner of the screen. The coordinate system in Portals starts from the top left. This doesn't change; the grid anchor location only affects how grid snapping works.
Example behavior:
(the code isn't exact, just illustrates that the other anchor modes require grid snapping to factor in window size as well)
Regular snapping:
(window_pos.x + grid_offset.x + grid_size.x / 2) % grid_size.x
Inverted snapping:
(window_pos.x - grid_offset.x - grid_size.x / 2 + window_size.x) % grid_size.x
Describe alternatives you've considered
It's not hard to pull out/open a calculator and do these calculations by hand, but grid snapping would save time and be handy for organizing your desktop portals.
I saw this issue (#32) explaining relative window positioning. While it is useful (and I might redesign my portals with it in the future), it's a little different from grid snapping.
Additional context
n/a
The text was updated successfully, but these errors were encountered: