popupMenu: Center-align switches

The default align of FILL was fine with the asset-based switches,
as the image would still keep its fixed height. But after the switch
to a pure CSS implementation, the alignment now results in stretched
switches. Fix this by explicitly center-aligning the widget.

Close: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7745
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3403>
This commit is contained in:
Florian Müllner 2024-06-29 21:21:29 +02:00
parent 99a36210b6
commit beb34eb105

View File

@ -344,6 +344,7 @@ export const Switch = GObject.registerClass({
super._init({
style_class: 'toggle-switch',
accessible_role: Atk.Role.CHECK_BOX,
y_align: Clutter.ActorAlign.CENTER,
track_hover: true,
reactive: true,
});