RadioMark: down shift (#8771)

reviewable/pr8772/r1
hius07 2 years ago committed by GitHub
parent cb7e670c4a
commit 12344261f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,6 +11,9 @@ local RadioMark = InputContainer:new{
face = Font:getFace("smallinfofont"),
baseline = 0,
_mirroredUI = BD.mirroredUILayout(),
-- round radio mark looks a little bit higher than the button/menu text
-- default vertical down shift ratio (to the text height) looks good in touchmenu
v_shift_ratio = 0.03,
}
function RadioMark:init()
@ -21,6 +24,7 @@ function RadioMark:init()
para_direction_rtl = self._mirroredUI,
}
self.baseline = widget:getBaseline()
widget.forced_baseline = self.baseline + math.floor(widget:getSize().h * self.v_shift_ratio)
self[1] = widget
self.dimen = widget:getSize()
end

Loading…
Cancel
Save