Skip to content

Commit

Permalink
calendar applet: Improve event dot positioning.
Browse files Browse the repository at this point in the history
Floating point is used for positioning, and allowing half-pixel
positions can make the dots appear right-shifted.
  • Loading branch information
mtwebster committed Dec 22, 2021
1 parent e52cdf2 commit 990ceea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ class Calendar {
let dots_this_row = Math.min(dots_left, max_children_per_row);
let total_child_width = nw * dots_this_row;

let start_x = (box_width - total_child_width) / 2;
let start_x = Math.floor((box_width - total_child_width) / 2);

let cbox = new Clutter.ActorBox();
cbox.x1 = start_x;
Expand Down

0 comments on commit 990ceea

Please sign in to comment.