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:
Florian Müllner
2020-04-10 16:02:30 +02:00
committed by Florian Müllner
parent 0426d1d8d5
commit bce63d3168
2 changed files with 20 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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; }