mate-desktop / mate-panel

MATE panel
https://mate-desktop.org
GNU General Public License v2.0
183 stars 115 forks source link

Please allow font color customization. #1014

Open CHJ85 opened 4 years ago

CHJ85 commented 4 years ago

Hi there. Under panel properties, can you please add the ability to change font color. And also, the applet background color doesn't change when you change the panel background color, which makes it look weird. So it'd be great if you could fix that as well. Not sure if that is fixable though.

lukefromdc commented 4 years ago

That is set by the GTK theme and can be overridden with a css snippet in a (new or existing ) ~/config/gtk-3.0/gtk.css file, example below forces red text on all text in a mate-panel and all menus spawned from it while affecting nothing else:

.mate-panel-menu-bar label {
    color: red;
}

Note that this will be applied in ALL themes as user settings here overrride whatever is set in the GTK 3 theme

CHJ85 commented 4 years ago

Wow. Thanks a bunch. I didn't know it uses CSS. Is there also a way I can fix the applets background? Because when I change the panel background, they still remain gray.

lukefromdc commented 4 years ago

Most though not all normal css works with gtk3, and if you enable GtkInspector (dconf-editor org>gtk>settings>debug>enable-inspector-keybinding TRUE) you can raise a right-click menu from the panel, then ctrl-shift-d or ctrl-shift-i while the mouse is on it and GtkInspector will open. You can then poke around to find any element you want to change the .mate-panel.menu-bar style class is on or inherited by almost everything on the panel so you can confine your changes to the panel.

Also, if setting a color or image background from the panel right-click menu's "properties" item's dialog does not work, that's a bug you just found, You should be able to set an image or a color as a panel background from that, overriding any and all CSS code set by the theme (probalby also ~/config.gtk-3.0/gtk.css but haven't tested that).

CHJ85 commented 4 years ago

Thank you so much. I did not know about the inspector tool. Wish that wouldn't be hidden like that though. Is there a way to add the Inspector to the panel's right click menu? And also, I am able to change the color from "properties", but it only changes the panel color, not the applet background color. Not sure if this is a bug or if it's supposed to be that way. Btw, there is no "debug" under org>gtk>settings. Only "file-chooser", "emoji-chooser" and "color-chooser".

lukefromdc commented 4 years ago

That is a theme issue, as the applet background can have a color or image applied to it by a theme simply because it is its own gtk widget. PanelPlug and PanelApplet are two likely offenders, also any widget inside it could inherit a color. If you are writing what amounts to a custom panel theme that lives in ~/config/gtk-3.0/gtk.css you will need to override them all.

My own GTK theme has a custom theme for the panel and everything in it, menus included. I actually got started working on MATE writing the support for this and thus for exactly what you are doing: using the .mate-panel-menu-bar selector to limit a theme to the panel and it's child widgets. Found that by chance, because in the menubar ("a custom menu bar") we had inherited that from gnome-panel )as gnome-panel-menu-bar to permit theming the menubar itself, so if I used.mate-panel-menu-bar menu as the selector I could theme the other menus too. What I have in panel.css https://github.com/lukefromdc/gtk-theme-ubuntustudio-legacy/blob/master/UbuntuStudio_Legacy/gtk-3.20/panel.css in https://github.com/lukefromdc/gtk-theme-ubuntustudio-legacy might give you lots of ideas for how to set the panel up to your liking, and no theme update can ever override it, though it could set new colors or images not previously set that you have to override.

muktupavels commented 4 years ago

So MATE users are expected to know CSS and where to add it to customize panel? Are you planing or perhaps have already removed ability to customize panel background from properties? Otherwise it looks like very valid/good feature request...

CHJ85 commented 4 years ago

Thank you so much @lukefromdc. I haven't done much theming to the panel. I changed the panel color and added the font color to the gtk.css file. That's about it. Everything else is the default Ubuntu Mate theme. So I guess the default GTK theme in Ubuntu Mate has a bug. That's interesting. Can't believe Canonical haven't noticed this yet. Anyway. Now that I know I can do everything in CSS, it doesn't really matter. It looks nice now. Thanks again! Although that being said, it'd be nice if you guys could develop a GUI software for GTK theming in MATE.

lukefromdc commented 4 years ago

There is support in the panel properties dialog to change the panel background between the system background, a.user-set color, or a user-set image. Should also be explained in the panel help. If that does NOT work, that's a bug in mate-panel itself or possibly a badly-written theme.

Years ago I looked into trying to extend that GUI to cover fg color, the menus, etx as im cairo-dock but the complexity exceeded my abilities. Best way to apply it would be to build a.style provider from.strings returned by the GUI's color-pickers, border option, file selection dialogs etc, and save those to dconf as well. More than I was.able to do. I got as far as setting up the dialog and no further.

Cairo-dock themes from a GUI this way though cairo-dock as a whole can be quite heavy. Both gnome-shell and cinnamon theme from css files, difference is those communities have established collections of publicly available and supported shell themes. Mate-panel can support exactly the same thing and could easily be made to look in .themes for a panel.css file so as not to have to use up gtk.css for the job. I thought other would pursue this once I added basic support for split-out panel theming but this is the first interest I have seen other than the submarine themes using some of my calendar work

On 9/11/2019 at 8:23 AM, "Alberts Muktupāvels" notifications@github.com wrote:

So MATE users are expected to know CSS and where to add it to customize panel? Are you planing or perhaps have already removed ability to customize panel background from properties? Otherwise it looks like very valid/good feature request...

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- panel/issues/1014#issuecomment-530356064