Skip to content

Commit

Permalink
Fixed fit-to-screen not applying when layer-shell-cover-screen is dis…
Browse files Browse the repository at this point in the history
…abled
  • Loading branch information
ErikReider committed Mar 10, 2025
1 parent 079eee1 commit 6af582b
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions src/controlCenter/controlCenter.vala
Original file line number Diff line number Diff line change
Expand Up @@ -449,18 +449,23 @@ namespace SwayNotificationCenter {
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.RIGHT, true);
break;
}
switch (pos_y) {
default:
case PositionY.TOP:
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.TOP, true);
break;
case PositionY.CENTER:
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.TOP, true);
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.BOTTOM, true);
break;
case PositionY.BOTTOM:
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.BOTTOM, true);
break;
if (ConfigModel.instance.fit_to_screen) {
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.TOP, true);
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.BOTTOM, true);
} else {
switch (pos_y) {
default:
case PositionY.TOP:
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.TOP, true);
break;
case PositionY.CENTER:
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.TOP, true);
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.BOTTOM, true);
break;
case PositionY.BOTTOM:
GtkLayerShell.set_anchor (this, GtkLayerShell.Edge.BOTTOM, true);
break;
}
}
}
}
Expand Down

0 comments on commit 6af582b

Please sign in to comment.