mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
revert: "fix(core): Proper line-height calculation" (#10647)
This commit is contained in:
committed by
GitHub
parent
4f367483ef
commit
4e54c676a3
@@ -26,8 +26,7 @@
|
||||
BOOL isTextView = [self isKindOfClass:[UITextView class]];
|
||||
if (lineHeight > 0) {
|
||||
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
// Note: Avoid using lineSpacing as it will append the height as extra space
|
||||
paragraphStyle.minimumLineHeight = lineHeight;
|
||||
paragraphStyle.lineSpacing = lineHeight;
|
||||
// make sure a possible previously set text alignment setting is not lost when line height is specified
|
||||
if ([self isKindOfClass:[UIButton class]]) {
|
||||
paragraphStyle.alignment = ((UIButton*)self).titleLabel.textAlignment;
|
||||
@@ -89,8 +88,7 @@
|
||||
BOOL isLabel = [self isKindOfClass:[UILabel class]];
|
||||
if (lineHeight > 0) {
|
||||
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
// Note: Avoid using lineSpacing as it will append the height as extra space
|
||||
paragraphStyle.minimumLineHeight = lineHeight;
|
||||
paragraphStyle.lineSpacing = lineHeight;
|
||||
// make sure a possible previously set text alignment setting is not lost when line height is specified
|
||||
if ([self isKindOfClass:[UIButton class]]) {
|
||||
paragraphStyle.alignment = ((UIButton*)self).titleLabel.textAlignment;
|
||||
|
||||
Reference in New Issue
Block a user