1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-31 20:02:42 +00:00

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.
This commit is contained in:
Yuuki Harano 2021-02-23 17:53:07 +09:00
parent be2e47362b
commit 9f7fde8dc9

View File

@ -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