9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] acme: don't let tag button draw over tag border.
@ 2021-10-06  9:27 james palmer
  2021-10-06 21:22 ` igor
  2021-10-06 22:17 ` ori
  0 siblings, 2 replies; 4+ messages in thread
From: james palmer @ 2021-10-06  9:27 UTC (permalink / raw)
  To: 9front

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);



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] [PATCH] acme: don't let tag button draw over tag border.
  2021-10-06  9:27 [9front] [PATCH] acme: don't let tag button draw over tag border james palmer
@ 2021-10-06 21:22 ` igor
  2021-10-06 22:17   ` ori
  2021-10-06 22:17 ` ori
  1 sibling, 1 reply; 4+ messages in thread
From: igor @ 2021-10-06 21:22 UTC (permalink / raw)
  To: 9front

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);
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] [PATCH] acme: don't let tag button draw over tag border.
  2021-10-06  9:27 [9front] [PATCH] acme: don't let tag button draw over tag border james palmer
  2021-10-06 21:22 ` igor
@ 2021-10-06 22:17 ` ori
  1 sibling, 0 replies; 4+ messages in thread
From: ori @ 2021-10-06 22:17 UTC (permalink / raw)
  To: 9front

Looks good to me. Committing.

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.

Just as a heads up, you can just mail this
out directly. rather than doing the email
in an email thing.

	git/export | mail 9front@9front.org

you can also use a diff and write up an
email:

	write email in your favorite client
	git/diff >/dev/snarf
	paste into client

git/import knows how to handle both cases;
the subject+body of the email will become
the commit message, and the patch will be
applied.

	git/import /mail/fs/55153/

maybe we should add a way to add a preamble
or explanatory comment to the email.

> ---
> 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);
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9front] [PATCH] acme: don't let tag button draw over tag border.
  2021-10-06 21:22 ` igor
@ 2021-10-06 22:17   ` ori
  0 siblings, 0 replies; 4+ messages in thread
From: ori @ 2021-10-06 22:17 UTC (permalink / raw)
  To: 9front

Quoth igor@9lab.org:
> Tested the patch and can confirm it works as advertised. Thanks for
> sending it to the list.

thanks for testing.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-06 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06  9:27 [9front] [PATCH] acme: don't let tag button draw over tag border james palmer
2021-10-06 21:22 ` igor
2021-10-06 22:17   ` ori
2021-10-06 22:17 ` ori

9front - general discussion about 9front

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/9front

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9front 9front/ https://inbox.vuxu.org/9front \
		9front@9front.org
	public-inbox-index 9front

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9front


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git