9front - general discussion about 9front
 help / color / mirror / Atom feed
From: igor@9lab.org
To: 9front@9front.org
Subject: Re: [9front] [PATCH] acme: don't let tag button draw over tag border.
Date: Wed, 06 Oct 2021 23:22:33 +0200	[thread overview]
Message-ID: <1A153FE20805021CC0F9A5093A688AFD@9lab.org> (raw)
In-Reply-To: <1dc852446d8cbfbbed587804c5b3f401f2146813.camel@biobuf.link>

Tested the patch and can confirm it works as advertised. Thanks for
sending it to the list.

Cheers,
Igor


Quoth james palmer <james@biobuf.link>:
> this fixes the apperance of a 2px wide gap between the edge of the tag
> button and the start of the bottom border by making the tag button 2px
> less wide rather than shrinking it's rectange after creating the image.
> 
> from this plan9port pull request:
> https://github.com/9fans/plan9port/pull/490
> 
> - james
> 
> From: james palmer <james@biobuf.link>
> Date: Wed, 06 Oct 2021 09:19:58 +0000
> Subject: [PATCH] acme: don't let tag button draw over tag border.
> 
> ---
> diff 6ebb8b9e357944cc29ae3fafc0900ee3e325ed39
> 2134a2c638e2668f45a92ec814326689cc8089c3
> --- a/sys/src/cmd/acme/acme.c	Sun Oct  3 16:58:58 2021
> +++ b/sys/src/cmd/acme/acme.c	Wed Oct  6 10:19:58 2021
> @@ -895,16 +895,14 @@
>  		freeimage(colbutton);
>  	}
>  
> -	r = Rect(0, 0, Scrollwid+2, font->height+1);
> +	r = Rect(0, 0, Scrollwid, font->height+1);
>  	button = allocimage(display, r, screen->chan, 0, DNofill);
>  	draw(button, r, tagcols[BACK], nil, r.min);
> -	r.max.x -= 2;
>  	border(button, r, 2, tagcols[BORD], ZP);
>  
>  	r = button->r;
>  	modbutton = allocimage(display, r, screen->chan, 0, DNofill);
>  	draw(modbutton, r, tagcols[BACK], nil, r.min);
> -	r.max.x -= 2;
>  	border(modbutton, r, 2, tagcols[BORD], ZP);
>  	r = insetrect(r, 2);
>  	tmp = allocimage(display, Rect(0,0,1,1), screen->chan, 1,
> DMedblue);
> 
> 


  reply	other threads:[~2021-10-06 21:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06  9:27 james palmer
2021-10-06 21:22 ` igor [this message]
2021-10-06 22:17   ` ori
2021-10-06 22:17 ` ori

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=1A153FE20805021CC0F9A5093A688AFD@9lab.org \
    --to=igor@9lab.org \
    --cc=9front@9front.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).