all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar@batsov.com>
To: Feng Li <fengli@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Fringe icon color is wrong on OSX
Date: Wed, 15 Jul 2015 08:53:58 +0300	[thread overview]
Message-ID: <CAM9Zgm1K5x8iC12fCT1Lr2Z6YnEnqdMeCAgi9sOJq0KYQKhNdQ@mail.gmail.com> (raw)
In-Reply-To: <loom.20150715T050848-567@post.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]

I wondered why the fringe icons were looking so terrible for me on master.
Thanks for the patch! I hope it will be merged soon.

On 15 July 2015 at 06:16, Feng Li <fengli@gmail.com> wrote:

> Fringe icons have incorrect background and foreground colors in the git
> master version of Emacs.
>
> There are 2 issues:
>
> 1. The icon is drawn with background color instead of foreground color.
>
> 2. The icon background is opaque (and is in foreground color) instead of
> being transparent.
>
> I tracked it down to this commit:
>
> 67a878f * Honor :fore/background for XBM on NS (Bug#14969).
>
> The attached patch fixes the fringe icon issue for me.  I haven't tested it
> extensively with other XBM image use case though.
>
>
> diff --git a/src/nsimage.m b/src/nsimage.m
> index 9302cd2..33c355a 100644
> --- a/src/nsimage.m
> +++ b/src/nsimage.m
> @@ -250,18 +250,19 @@ ns_set_alpha (void *img, int x, int y, unsigned char
> a)
>            c = *s++;
>            for (k = 0; i < w && k < 8; ++k, ++i)
>              {
> -              *alpha++ = 0xff;
> -              if (c & 1)
> +              if ((c & 1) == 0)
>                  {
>                    *rr++ = fgr;
>                    *gg++ = fgg;
>                    *bb++ = fgb;
> +                  *alpha++ = 0xff;
>                  }
>                else
>                  {
>                    *rr++ = bgr;
>                    *gg++ = bgg;
>                    *bb++ = bgb;
> +                  *alpha++ = 0;
>                  }
>                idx++;
>                c >>= 1;
>
> --
> Feng Li
>
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 2242 bytes --]

  reply	other threads:[~2015-07-15  5:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15  3:16 Fringe icon color is wrong on OSX Feng Li
2015-07-15  5:53 ` Bozhidar Batsov [this message]
2015-08-07  1:55   ` Feng Li
2015-08-07  7:08     ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM9Zgm1K5x8iC12fCT1Lr2Z6YnEnqdMeCAgi9sOJq0KYQKhNdQ@mail.gmail.com \
    --to=bozhidar@batsov.com \
    --cc=emacs-devel@gnu.org \
    --cc=fengli@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.