From: Yuuki Harano Date: Tue, 23 Feb 2021 08:53:07 +0000 (+0900) Subject: Make scrollbars ignore scroll-bar-fore/background. X-Git-Tag: emacs-29.0.90~3722 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9f7fde8dc9cae395605b4923324895fbe7c1c8d0;p=emacs.git Make scrollbars ignore scroll-bar-fore/background. * src/pgtkfns.c (pgtk_set_scroll_bar_foreground): Handle frame parameters but actually ignore it. (pgtk_set_scroll_bar_background): The same. --- diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 07636a25ca0..e9ee2ba13f3 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -853,6 +853,7 @@ pgtk_set_scroll_bar_foreground (struct frame *f, Lisp_Object new_value, if (NILP (new_value)) { gtk_css_provider_load_from_data (css_provider, "", -1, NULL); + update_face_from_frame_parameter (f, Qscroll_bar_foreground, new_value); } else if (STRINGP (new_value)) { @@ -861,10 +862,14 @@ pgtk_set_scroll_bar_foreground (struct frame *f, Lisp_Object new_value, if (!pgtk_parse_color (f, SSDATA (new_value), &rgb)) error ("Unknown color."); + /* On pgtk, this frame parameter should be ignored, and honor gtk theme. */ +#if 0 char css[64]; sprintf (css, "scrollbar slider { background-color: #%06x; }", (unsigned int) rgb.pixel & 0xffffff); gtk_css_provider_load_from_data (css_provider, css, -1, NULL); +#endif + update_face_from_frame_parameter (f, Qscroll_bar_foreground, new_value); } else @@ -881,6 +886,7 @@ pgtk_set_scroll_bar_background (struct frame *f, Lisp_Object new_value, if (NILP (new_value)) { gtk_css_provider_load_from_data (css_provider, "", -1, NULL); + update_face_from_frame_parameter (f, Qscroll_bar_background, new_value); } else if (STRINGP (new_value)) { @@ -889,10 +895,14 @@ pgtk_set_scroll_bar_background (struct frame *f, Lisp_Object new_value, if (!pgtk_parse_color (f, SSDATA (new_value), &rgb)) error ("Unknown color."); + /* On pgtk, this frame parameter should be ignored, and honor gtk theme. */ +#if 0 char css[64]; sprintf (css, "scrollbar trough { background-color: #%06x; }", (unsigned int) rgb.pixel & 0xffffff); gtk_css_provider_load_from_data (css_provider, css, -1, NULL); +#endif + update_face_from_frame_parameter (f, Qscroll_bar_background, new_value); } else