diff --git a/basis/ui/gadgets/line-support/line-support.factor b/basis/ui/gadgets/line-support/line-support.factor index df68e88c2c..cea36a57e7 100644 --- a/basis/ui/gadgets/line-support/line-support.factor +++ b/basis/ui/gadgets/line-support/line-support.factor @@ -16,13 +16,9 @@ GENERIC: line-height ( gadget -- n ) M: gadget line-height font>> font-metrics height>> ; -: y>line ( y gadget -- n ) - [ line-leading ] [ line-height ] bi - [ [ - ] keep ] dip + /i ; +: y>line ( y gadget -- n ) line-height /i ; -: line>y ( n gadget -- y ) - [ line-height ] [ line-leading ] bi - [ + * ] keep - ; +: line>y ( n gadget -- y ) line-height * ; : validate-line ( m gadget -- n ) control-value [ drop f ] [ length 1- min 0 max ] if-empty ; @@ -49,7 +45,7 @@ GENERIC: draw-line ( line index gadget -- ) [ first-visible-line ] [ last-visible-line ] [ control-value ] - [ [ line-leading ] [ line-height ] bi + ] + [ line-height ] [ ] } cleave '[ 0 over _ * 2array