From a64cf7009dcbdac3ba3abd6165f009b6b89bfd9e Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Sun, 11 Dec 2022 18:28:26 +0100 Subject: [PATCH] quickSettings: Ensure toggle buttons are aligned with the pixel grid If the width of the menu was not a multiple of the number of columns, the toggle buttons after the first column would not be aligned with the pixel grid. This was causing text rendering issues and slightly blurry icons. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6210 Part-of: (cherry picked from commit 3b216be637f625815cc873492d8cbcbbd78b3a57) --- js/ui/quickSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/quickSettings.js b/js/ui/quickSettings.js index e3bbe21c0..f35a15c3d 100644 --- a/js/ui/quickSettings.js +++ b/js/ui/quickSettings.js @@ -543,7 +543,7 @@ const QuickSettingsLayout = GObject.registerClass({ : [0, 0]; const availWidth = box.get_width() - (this.nColumns - 1) * this.column_spacing; - const childWidth = availWidth / this.nColumns; + const childWidth = Math.floor(availWidth / this.nColumns); this._overlay?.allocate_available_size(0, 0, box.get_width(), box.get_height());