Skip to content

Commit

Permalink
Merge pull request #123 from Fmstrat/fix_gaps
Browse files Browse the repository at this point in the history
remove gaps from between tiles horizontally
  • Loading branch information
GrylledCheez authored May 26, 2023
2 parents b43f41b + 45c7b55 commit 913314f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,17 @@ function moveApp(app, loc) {
var colCount = config.cols === 2 || (config.ultrawideOnly && isNotUltrawide) ? 2 : config.cols;
if (loc.col >= colCount)
loc.col = 1;

var colWidth = Math.floor(space.width / colCount);
var rowHeight = Math.floor(space.height / 2);

let x = loc.col * colWidth + space.x;
let y = loc.row * rowHeight + space.y;
let w = loc.width * colWidth;
let h = loc.height * rowHeight;

if (loc.col + loc.width === colCount)
w += space.width % colCount;

if (!config.useMaximize) {
unMaximizeIfMaximized(app);
Expand Down

0 comments on commit 913314f

Please sign in to comment.