ref: 111ffc09377d921e2fb8798db038a5b896527fc6
parent: 0810c9689cdab52e8ab417050b660dd9eccf4647
author: Sigrid <ftrvxmtrx@gmail.com>
date: Sun Dec 6 08:02:33 EST 2020
rio: goodrect: clarify minimal height and actually use the smallest reasonable value
--- a/sys/src/cmd/rio/wctl.c
+++ b/sys/src/cmd/rio/wctl.c
@@ -95,7 +95,12 @@
return 0;
if(Dy(r) > BIG*Dy(screen->r))
return 0;
- if(Dx(r) < 100 || Dy(r) < 3*Borderwidth+font->height)
+ /*
+ * the height has to be big enough to fit one line of text.
+ * that includes the border on each side with an extra pixel
+ * so that the text is still drawn
+ */
+ if(Dx(r) < 100 || Dy(r) < 2*(Borderwidth+1)+font->height)
return 0;
/* window must be on screen */
if(!rectXrect(screen->r, r))
--
⑨