Skip to content

Commit

Permalink
Account for display scale when repositioning the stack
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-janssen committed Mar 29, 2023
1 parent 7707b9a commit 2a66887
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NotificationStack.vala
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public class Gala.NotificationStack : Object {

int notification_x_pos = area.x + area.width - window_rect.width;

move_window (notification, notification_x_pos, stack_y + TOP_OFFSET + stack_y_offset + ADDITIONAL_MARGIN * scale);
move_window (notification, notification_x_pos, stack_y + TOP_OFFSET + (stack_y_offset + ADDITIONAL_MARGIN) * scale);
notifications.insert (0, notification);
}

Expand All @@ -106,7 +106,7 @@ public class Gala.NotificationStack : Object {

private void update_positions (bool animate, float add_y = 0.0f) {
var scale = Utils.get_ui_scaling_factor ();
var y = stack_y + TOP_OFFSET + stack_y_offset + add_y + ADDITIONAL_MARGIN * scale;
var y = stack_y + TOP_OFFSET + add_y + (stack_y_offset + ADDITIONAL_MARGIN) * scale;
var i = notifications.size;
var delay_step = i > 0 ? 150 / i : 0;
var iterator = 0;
Expand Down

0 comments on commit 2a66887

Please sign in to comment.