John Paul Wallington <jpw(a)shootybangbang.com> writes:
William M. Perry wrote:
[...]
> This has the side-effect that GTK and MacOS faces will get the same
> defaults as everything else.
I liked setting GTK specific defaults in gtk-init-device-faces in
gtk-faces.el, using the style information from gtk-style-info, though.
We could still add this if we want... won't (gtk color) override (win
color)?
We could just do this in gtk-faces.el:
(defmacro gtk-style-munge-face (face attribute value)
(let ((func (intern (format "face-%s" (eval attribute)))))
`(add-spec-to-specifier (,func ,face) ,value nil '(gtk default) 'prepend)))
(let* ((style (gtk-style-info device))
;;(normal 0) ; GTK_STATE_NORMAL
;;(active 1) ; GTK_STATE_ACTIVE
(prelight 2) ; GTK_STATE_PRELIGHT
(selected 3) ; GTK_STATE_SELECTED
;;(insensitive 4) ; GTK_STATE_INSENSITIVE
)
(gtk-style-munge-face 'highlight 'foreground
(nth prelight (plist-get style 'text)))
(gtk-style-munge-face 'highlight 'background
(nth prelight (plist-get style 'background)))
(gtk-style-munge-face 'zmacs-region 'foreground
(nth selected (plist-get style 'text)))
(gtk-style-munge-face 'zmacs-region 'background
(nth selected (plist-get style 'background))))
Look reasonable?
-bp
--
Ceterum censeo vi esse delendam