Skip to content

Commit

Permalink
idk whatever
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroxoneafour committed Apr 1, 2024
1 parent a36f51e commit 12f8cb8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/driver/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,21 +254,21 @@ export class TilingDriver {
if (!horizontal) {
if (index == 0) {
// first tile in sequence, shift border down
kwinTile.resizeByPixels(-diff, Kwin.Edge.TopEdge);
kwinTile.resizeByPixels(diff, Kwin.Edge.BottomEdge);
} else {
// shift border up
kwinTile.resizeByPixels(
diff,
Kwin.Edge.BottomEdge,
-diff,
Kwin.Edge.TopEdge,
);
}
} else if (parentIndex != null) {
if (parentIndex == 0) {
// first tile in sequence, shift border down
kwinTile.resizeByPixels(-diff, Kwin.Edge.TopEdge);
kwinTile.resizeByPixels(diff, Kwin.Edge.BottomEdge);
} else {
// shift border up
kwinTile.resizeByPixels(diff, Kwin.Edge.BottomEdge);
kwinTile.resizeByPixels(-diff, Kwin.Edge.TopEdge);
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/util/geometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ export class GPoint implements QPoint {
y: r.y + r.height / 2,
});
}

toString(): string {
return "GPoint(" + this.x + ", " + this.y + ")";
}
}

export class GRect implements QRect {
Expand Down Expand Up @@ -186,6 +190,10 @@ export class GRect implements QRect {
}
return true;
}

toString(): string {
return "GRect(" + this.x + ", " + this.y + + ", " + this.width + ", " + this.height + ")";
}
}

export class GSize implements QSize {
Expand Down Expand Up @@ -233,4 +241,8 @@ export class GSize implements QSize {
get area(): number {
return this.width * this.height;
}

toString(): string {
return "GSize(" + this.width + ", " + this.height + ")";
}
}

0 comments on commit 12f8cb8

Please sign in to comment.