emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "modern" colors Re: Changes for emacs 28


From: Robert Pluim
Subject: Re: "modern" colors Re: Changes for emacs 28
Date: Mon, 14 Sep 2020 16:47:13 +0200

>>>>> On Mon, 14 Sep 2020 17:39:37 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Stefan Monnier <monnier@iro.umontreal.ca>
    >> Cc: Eli Zaretskii <eliz@gnu.org>,  spacibba@aol.com,  casouri@gmail.com,
    >> emacs-devel@gnu.org,  ams@gnu.org,  ghe@sdf.org,  tecosaur@gmail.com
    >> Date: Sun, 13 Sep 2020 16:16:17 -0400
    >> 
    >> > I suppose that’s exactly what gtk_selection_bg_color and
    >> > gtk_selection_fg_color are supposed to do: take the colours from the 
GTK
    >> > theme.
    >> >
    >> > On Guix we build Emacs with the GTK toolkit.
    >> 
    >> So the bug is that we obey the "external" settings for the region but
    >> apparently not for the `default` face.

    Eli> Are we sure this is the case?  Where's the code which uses the colors
    Eli> for the region?


faces.el:

(defface region
  '((((class color) (min-colors 88) (background dark))
     :background "blue3" :extend t)
    (((class color) (min-colors 88) (background light) (type gtk))
     :distant-foreground "gtk_selection_fg_color"
     :background "gtk_selection_bg_color" :extend t)

'region' is the only face this is done for.

Itʼs then used here:

gtkutil.c:

bool
xg_check_special_colors (struct frame *f,
                         const char *color_name,
                         Emacs_Color *color)
{
  bool success_p = 0;
  bool get_bg = strcmp ("gtk_selection_bg_color", color_name) == 0;
  bool get_fg = !get_bg && strcmp ("gtk_selection_fg_color", color_name) == 0;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]