]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.gadgets.labels: only ceiling the height for now.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 18 May 2020 15:06:08 +0000 (08:06 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 18 May 2020 15:06:08 +0000 (08:06 -0700)
This might align to every other pixel on a 2x display but it fixes some
rendering artifacts with borders on subpixel boundaries.

basis/ui/gadgets/labels/labels.factor

index ed2ad1f519c6b6967a8ce4cd09730ffe9ad99f86..b3e6248ce4d8886d5487554328f5eb88b5925f74 100644 (file)
@@ -46,7 +46,7 @@ M: label string<< ( string label -- )
     [ font>> ] [ text>> ] bi ; inline
 
 M: label pref-dim*
-    >label< text-dim ;
+    >label< text-dim first2 ceiling 2array ;
 
 <PRIVATE