GNU bug report logs -
#46493
[feature/pgtk] Low contrast region face
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Sat, 13 Feb 2021 16:57:01 UTC
Severity: wishlist
Tags: moreinfo
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Yuuki Harano <masm+emacs <at> masm11.me> writes:
> This issue is not pgtk-specific.
>
> If we want another color for bg on pgtk, we can change this face definition as follows:
The proposed patch was:
diff --git a/lisp/faces.el b/lisp/faces.el
index d92569e7cd..de1ca095aa 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2502,7 +2502,9 @@ highlight
(defface region
'((((class color) (min-colors 88) (background dark))
:background "blue3" :extend t)
- (((class color) (min-colors 88) (background light) (type gtk))
+ (((class color) (min-colors 88) (background light) (type pgtk))
+ :background "lightgoldenrod2" :extend t)
+ (((class color) (min-colors 88) (background light) (type gtk))
:distant-foreground "gtk_selection_fg_color"
:background "gtk_selection_bg_color" :extend t)
(((class color) (min-colors 88) (background light) (type ns))
But... The gtk_selection_fg_color colour is different under gtk, but not
pgtk -- that's the problem.
Poking at this, it seems the colours we get out of GTK are:
gtk_selection_bg_color 0.964706 0.960784 0.956863
Which is a very, very light colour, which is apparently calculated
correctly in this branch here:
#ifndef HAVE_PGTK
sprintf (buf, "rgb:%04x/%04x/%04x", r, g, b);
success_p = x_parse_color (f, buf, color) != 0;
#else
sprintf (buf, "#%04x%04x%04x", r, g, b);
success_p = pgtk_parse_color (f, buf, color) != 0;
#endif
But with the non-pgtk branch we get a very dark colour. And when taking
this into account:
/* FIXME: Retrieving the background color is deprecated in
GTK+ 3.16. New versions of GTK+ don't use the concept of a
single background color any more, so we shouldn't query for
it. */
gtk_style_context_get (gsty, state,
GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &c,
NULL);
I think we should just remove all of this code and use the same colours
in (p)GTK Emacsen as in non.
Any other opinions?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 2 years and 307 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.