Fix text misalignment on Media Player indicator extension control/Gnome Shell 3.28

I like to have music application controls in the top bar of Gnome Shell, so I can easily control any music application I’m using without having to constantly switch between windows, so I installed the popular Media player indicator Gnome Shell extension on Ubuntu 18.04 system.
However, the extension widgets (text, player controls, etc.) displayed in the top bar of Gnome Shell look ugly and misaligned/incorrect. It seems to have happened due to a change in Gnome Shell 3.28, and the extension developer has not resolved this issue.
But there is already a fix that can be easily applied.
This is what the media player indicator looks like without the fix I mentioned in Ubuntu 18.04 with Gnome Shell 3.28:

This is how the Media Player Indicator extension looks after applying this fix:Media player indicator extended control CSS fix

To use Gnome Shell 3.28 to repair the appearance of Media Player Indicator, open Nautilus and navigate to ~/.local/share/gnome-shell/extensions/[email protected]/ (You can press Ctrl + L Paste this address into the address bar in Nautilus), then open stylesheet.css Open the file with a text editor.
At the bottom of the stylesheet.css file (do not change/remove anything else), paste the following CSS fixes:

/* fix for player controls / text not being centered in Gnome Shell 3.28+ */
.aggregate-menu .popup-sub-menu > * > * > :first-child,
.aggregate-menu .popup-sub-menu > * > * > :last-child > :first-child,
.aggregate-menu .popup-sub-menu > * > * > :last-child > :first-child > :first-child
{
    margin: 0; padding: 0;
}
/* end fix for player controls / text not being centered in Gnome Shell 3.28+ */

Save the file and restart Gnome Shell (press Alt + F2 And type r,then press Enter, Or log out and log in again), and the Media Player indicator extension of Gnome Shell should no longer be misaligned/misaligned.
Fixed points: IB Board of Directors.

Source

Sidebar