places-menu: Emphasize eject buttons here as well
We already align the buttons correctly here, but otherwise they can use the same treatment as in the drive-menu. https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/223
This commit is contained in:
committed by
Florian Müllner
parent
0426d1d8d5
commit
bce63d3168
@@ -20,7 +20,9 @@ const PLACE_ICON_SIZE = 16;
|
||||
var PlaceMenuItem = GObject.registerClass(
|
||||
class PlaceMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||
_init(info) {
|
||||
super._init();
|
||||
super._init({
|
||||
style_class: 'place-menu-item',
|
||||
});
|
||||
this._info = info;
|
||||
|
||||
this._icon = new St.Icon({
|
||||
@@ -29,7 +31,11 @@ class PlaceMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||
});
|
||||
this.add_child(this._icon);
|
||||
|
||||
this._label = new St.Label({ text: info.name, x_expand: true });
|
||||
this._label = new St.Label({
|
||||
text: info.name,
|
||||
x_expand: true,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this.add_child(this._label);
|
||||
|
||||
if (info.isRemovable()) {
|
||||
@@ -37,7 +43,10 @@ class PlaceMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||
icon_name: 'media-eject-symbolic',
|
||||
style_class: 'popup-menu-icon',
|
||||
});
|
||||
this._ejectButton = new St.Button({ child: this._ejectIcon });
|
||||
this._ejectButton = new St.Button({
|
||||
child: this._ejectIcon,
|
||||
style_class: 'button',
|
||||
});
|
||||
this._ejectButton.connect('clicked', info.eject.bind(info));
|
||||
this.add_child(this._ejectButton);
|
||||
}
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
/* none used*/
|
||||
.place-menu-item .button {
|
||||
border-radius: 99px;
|
||||
padding: 3px;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.place-menu-item .button:ltr { margin-left: 6px; }
|
||||
.place-menu-item .button:rtl { margin-right: 6px; }
|
||||
|
||||
Reference in New Issue
Block a user