CXTDT-552074 - Text Area - Tooltip

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-04-30 12:15:43 -05:00
parent 5a0018319f
commit 000e4cdefa
2 changed files with 6 additions and 3 deletions

View File

@ -37,17 +37,19 @@ public class TooltipLabelAttribute: ActionLabelAttributeModel, TooltipLaunchable
}
var frame = CGRect.zero
let ratio: Double = 1.0 //0.80
let yPosition: Double = -3
if let font = attributedString.attribute(.font, at: 0, effectiveRange: &originalRange) as? UIFont {
switch font.pointSize {
case 15..<25:
size = .medium
frame = CGRect(x: 0, y: -1, width: size.value.dimensions.width * 0.80, height: size.value.dimensions.height * 0.80)
frame = CGRect(x: 0, y: yPosition, width: size.value.dimensions.width * ratio, height: size.value.dimensions.height * ratio)
case 0..<14:
size = .small
frame = CGRect(x: 0, y: -1, width: size.value.dimensions.width * 0.80 , height: size.value.dimensions.height * 0.80)
frame = CGRect(x: 0, y: yPosition, width: size.value.dimensions.width * ratio , height: size.value.dimensions.height * ratio)
default:
size = .medium
frame = CGRect(x: 0, y: -1, width: size.value.dimensions.width, height: size.value.dimensions.height)
frame = CGRect(x: 0, y: yPosition, width: size.value.dimensions.width, height: size.value.dimensions.height)
}
}

View File

@ -1,6 +1,7 @@
1.0.61
----------------
- CXTDT-552068 - Text Area - Text padding
- CXTDT-552074 - Text Area - Tooltip
1.0.60
----------------