diff options
author | zhuyaliang <[email protected]> | 2023-10-08 10:27:51 +0800 |
---|---|---|
committer | mouse <[email protected]> | 2023-10-11 17:29:28 +0800 |
commit | 9cdaead58f88a29f80dd4991cdf0792f645c317b (patch) | |
tree | bc8a9f7db99e8a35efadd02a9022a68a09da1fdb /libmate-desktop/mate-desktop-utils.c | |
parent | 0808f973c42fba85719322c9a2ffdb9289201f3f (diff) | |
download | mate-desktop-9cdaead58f88a29f80dd4991cdf0792f645c317b.tar.bz2 mate-desktop-9cdaead58f88a29f80dd4991cdf0792f645c317b.tar.xz |
Fix compilation warning replace gtk_style_context_get_background_color
Diffstat (limited to 'libmate-desktop/mate-desktop-utils.c')
-rw-r--r-- | libmate-desktop/mate-desktop-utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libmate-desktop/mate-desktop-utils.c b/libmate-desktop/mate-desktop-utils.c index a5228b7..6b13e7c 100644 --- a/libmate-desktop/mate-desktop-utils.c +++ b/libmate-desktop/mate-desktop-utils.c @@ -447,7 +447,10 @@ mate_desktop_gtk_style_get_light_color (GtkStyleContext *style, GtkStateFlags state, GdkRGBA *color) { - gtk_style_context_get_background_color (style, state, color); + g_return_if_fail (color != NULL); + g_return_if_fail (GTK_IS_STYLE_CONTEXT (style)); + + gtk_style_context_get (style, state, "background-color", &color, NULL); gtk_style_shade (color, color, LIGHTNESS_MULT); } @@ -456,6 +459,9 @@ mate_desktop_gtk_style_get_dark_color (GtkStyleContext *style, GtkStateFlags state, GdkRGBA *color) { - gtk_style_context_get_background_color (style, state, color); + g_return_if_fail (color != NULL); + g_return_if_fail (GTK_IS_STYLE_CONTEXT (style)); + + gtk_style_context_get (style, state, "background-color", &color, NULL); gtk_style_shade (color, color, DARKNESS_MULT); } |