mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
43 stars 48 forks source link

gtk3: progressbar themed background #151

Closed dnk closed 8 years ago

lukefromdc commented 8 years ago

This works REALLY well with my theme, allowing me to use my normal progressbar theme that uses a background image in the OSD progressbar, which previously was impossible. I really would like to see this merged, I can get quite spectacular results theming the OSD with it. Tested with every theme, fixes the progressbar usability with every one of them and does not break what I did in BlackMATE or in what I committed an hour ago for UbuntuStudio_Legacy

lukefromdc commented 8 years ago

One issue remains: The progressbar trough still can't be themed except by setting a border around it (as in green submarine) but this is hardly critical. With or without a trough fix this is nice work

raveit65 commented 8 years ago

@ dnk This is because you removed msd_get_background_color without replacing it with gtk_render_background for GTK_STYLE_CLASS_TROUGH. https://github.com/mate-desktop/mate-settings-daemon/pull/151/commits/ae774dc6d611cedc663cdd4ce5ad0fcb162544d5#diff-a75570fda5e425e259682265842f00d1L451 Here only gtk_render_frame is there but this don't style the bg of through.

And for GTK_STYLE_CLASS_PROGRESSBAR we have only gtk_render_background which only writes the bg but not the border. https://github.com/mate-desktop/mate-settings-daemon/pull/151/commits/ae774dc6d611cedc663cdd4ce5ad0fcb162544d5#diff-a75570fda5e425e259682265842f00d1R440

We need to to use both, gtk_render_background and gtk_render_frame, for GTK_STYLE_CLASS_PROGRESSBAR and GTK_STYLE_CLASS_TROUGH. I tried this with latest PR but my result was really ugly, so i decided to revert it. From GTK-docs: https://developer.gnome.org/gtk3/unstable/GtkStyleContext.html#gtk-render-background

background rendering, showing the effect of background-image, border-width and border-radius

https://developer.gnome.org/gtk3/unstable/GtkStyleContext.html#gtk-render-frame

frame rendering, showing the effect of border-image, border-color, border-width, border-radius and junctions

So for full theme support we need both function at two places.

But i don't see in docs that 'background-color' is supported which was support by msd_get_background_color.

lukefromdc commented 8 years ago

Just built a

nd tested "render background and frame." This works REALLY nice with my theme, removed the now no longer needed trough border. I've updated my published theme around this branch, with a fallback for those using master or in case this never gets merged. Sample below of what this can do:

osd_volume_control_6 6 2016

raveit65 commented 8 years ago

Thank you, that's much better. Can we add gtk-render-frame also to https://github.com/mate-desktop/mate-settings-daemon/blob/master/plugins/common/msd-osd-window.c#L296 ? Because i really miss to set up a border-color to the whole OSD. Than the change is perfect :)

raveit65 commented 8 years ago

merged https://github.com/mate-desktop/mate-settings-daemon/commit/bdb500291eb7fb5b2477a3fc6226b8c9017a172e Thank you very much for the patience with me.