Remove org.mate.panel.toplevel.background to allow background colors for all themes
Ubuntu MATE 22.04
The system-wide default background color for the mate-panel is system theme.
Trisquel 11 issue
The system-wide default background color for the mate-panel is set to black, instead of system theme.
Screenshot from Trisquel 11 in live mode from a USB stick: 50% transparent
/usr/share/glib-2.0/schemas/x_trisquel.gschema.override
[org.mate.panel.toplevel.background]
opacity=30000
color='#000000'
type='color'
Note that the panel in the above screenshot is pitch black despite that it is 50% transparent. When you change the Style value it will take effect (but this is another issue):
gsettings set org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color 'rgba(0,0,0,0.502)'
can be used but will not update the knob in knob.
dconf-editor /org/mate/panel/toplevels/top/background/opacity describes: "Specifies the opacity of the background color format. If the color is not completely opaque (a value of less than 65535), the color will be composited onto the desktop background image."
Screenshot from Trisquel 11 in live mode from a virtual machine: 100% opaque
/usr/share/glib-2.0/schemas/x_trisquel.gschema.override
[org.mate.panel.toplevel.background]
opacity=30000
color='#000000'
type='color'
This affects all light themes negatively
All themes (mate-appearance-properties -p theme
) with light text on 50% transparent window buttons are virtually useless on dark panel background colors because the text is too difficult to read:
- BlueMenta
- GreenLaguna
- High Contrast
- Menta
- These themes are also affected but to less degree since they add gray window button color (but the rest of the panel, for example the text on the ayatana clock is affected): TraditionalGreen, foo: YaruGreen, YaruOK, TraditionalOK
Screenshot of BlueMenta theme with the default Trisquel panel background color:
Other related issues:
- Solid panel color makes the handles invisible - https://github.com/mate-desktop/mate-panel/issues/1403
Solution
Set system-wide default background color (strongly recommended for the next release of Trisquel)
Remove these lines from /usr/share/glib-2.0/schemas/x_trisquel.gschema.override:
[org.mate.panel.toplevel.background]
opacity=30000
color='#000000'
type='color'
- sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
- Sign out, and sign in.
- When you right-click on the mate-panel and select "Reset All Panels", the system-wide default will reset it to system theme.
- Screenshot that verifies that this solution worked. Here the BlueMenta theme used again:
The original Trisquel will not be negatively impacted:
Ineffective long-term user solution: Changing the panel color via GUI, dconf, or gsettings
Setting the background color from the GUI (or dconf, or gsettings) is not effective: Right-click on the mate-panel, select Properties, the Panel Properties window will open. Click on the "Background" tab:
The reason why it is not effective is that the panel will crash at some point. "Reset All Panels" is used to restore the mate-panel, but it will restore the values to system-wide defaults (in this case #000000 defined in /usr/share/glib-2.0/schemas/x_trisquel.gschema.override), not with the settings that you added applied from the GUI, dconf, or gsettings. In Trisquel 11, I have to click on "Reset all Panels" a few times per month due to bugs that randomly crashes it.
To best understand this:
- Change the panel color to red from the GUI.
- Click on "Reset All Panels":
- The color will be not red anymore.
Add 50% transparent panel color to the theme CSS (bonus for the next release of Trisquel or later)
I evaluated the themes in the mate-themes, and the ubuntu-mate-themes package, and found no theme that are using semi-transparent style for the panel color.
However, if you really want to set back 50% transparent panel color, you should edit the CSS files for the Trisquel themes. Search for ".mate-panel-menu-bar" in /usr/share/themes/Trisquel/gtk-3.0/gtk.css.
The background color should absolutely be removed to all cost, to allow themes to function as expected. The lack of a semi-transparent panel color is a secondary issue, and can be worked on later.