]> gitweb.factorcode.org Git - factor.git/commitdiff
editors: added pref-dim* for action-editor
authornicolas-p <z.nicolas@gmail.com>
Wed, 24 May 2017 11:44:19 +0000 (13:44 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 29 May 2017 15:08:21 +0000 (08:08 -0700)
basis/ui/gadgets/editors/editors.factor

index f14e2b6ed2934226944449c18d09d156c9ade078..39710d3c46c27de4c0de5a2b60a475fc88229975 100644 (file)
@@ -670,6 +670,13 @@ M: action-editor draw-gadget*
         call-next-method
     ] if ;
 
+M: action-editor pref-dim*
+    dup draw-default-text? [
+        [ font>> ] [ default-text>> ] bi text-dim { 1 0 } v+
+    ] [
+        call-next-method
+    ] if ;
+
 TUPLE: action-field < field quot ;
 
 : <action-field> ( quot: ( string -- ) -- gadget )