Skip to content

Commit

Permalink
Merge branch 'master' into TIMOB-19300
Browse files Browse the repository at this point in the history
  • Loading branch information
lokeshchdhry committed Dec 20, 2019
2 parents 2345b42 + 99d08f6 commit ee08945
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ public void focus()
{
super.focus();
if (tv != null && proxy != null && proxy.getProperties() != null) {
final boolean editable = proxy.getProperties().optBoolean(TiC.PROPERTY_EDITABLE, false);
final boolean editable = proxy.getProperties().optBoolean(TiC.PROPERTY_EDITABLE, true);
TiUIHelper.showSoftKeyboard(tv, editable);
}
}
Expand Down
4 changes: 4 additions & 0 deletions apidoc/Titanium/UI/Font.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ properties:
description: |
Use one of the TEXT_STYLE constants from <Titanium.UI> to set the font to a predefined system font.
When this property is set to a valid value, all other font properties are ignored.
Notes:
Since SDK 9.0.0 property <Font.fontFamily> will not be ignored for iOS 11+.
Custom fonts can be used with this property for dynamic font management.
type: String
constants: Titanium.UI.TEXT_STYLE_*
platforms: [iphone, ipad]
Expand Down
5 changes: 4 additions & 1 deletion iphone/Classes/TiUIListSectionProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ - (void)appendItems:(id)args
[_items addObjectsFromArray:items];
id<TiUIListViewDelegateView> theDelegate = [theDispatcher delegateView];
if (theDelegate != nil) {
[theDelegate updateSearchResults:nil];
TiThreadPerformOnMainThread(^{
[theDelegate updateSearchResults:nil];
},
NO);
if ([theDispatcher isKindOfClass:[TiViewProxy class]]) {
[(TiViewProxy *)theDispatcher contentsWillChange];
}
Expand Down
15 changes: 10 additions & 5 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/WebFont.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ - (BOOL)isSizeNotSet

- (UIFont *)font
{
// TO DO: Refactor this function
if (font == nil) {
if (textStyle != nil && [textStyle isKindOfClass:[NSString class]]) {
if (textStyle != nil && [textStyle isKindOfClass:[NSString class]] && family != nil && [TiUtils isIOSVersionOrGreater:@"11.0"]) {
UIFont *tempFont = [UIFont fontWithName:family size:self.size];
if (tempFont) {
UIFontMetrics *fontMetrics = [UIFontMetrics metricsForTextStyle:textStyle];
font = [[fontMetrics scaledFontForFont:tempFont] retain];
}
} else if (textStyle != nil && [textStyle isKindOfClass:[NSString class]]) {
font = [[UIFont preferredFontForTextStyle:textStyle] retain];
} else {
if (family != nil) {
Expand Down Expand Up @@ -126,7 +133,7 @@ - (UIFont *)font
if (font == nil) {
//NO valid family specified. Just check for characteristics. Semi bold is ignored here.
if (self.isBoldWeight) {
UIFont *theFont = ([TiUtils isIOSVersionOrGreater:@"8.2"]) ? [UIFont systemFontOfSize:self.size weight:UIFontWeightBold] : [UIFont boldSystemFontOfSize:self.size];
UIFont *theFont = [UIFont systemFontOfSize:self.size weight:UIFontWeightBold];
if (self.isItalicStyle) {
NSString *fontFamily = [theFont familyName];
NSArray *fontNames = [UIFont fontNamesForFamilyName:fontFamily];
Expand All @@ -153,7 +160,7 @@ - (UIFont *)font
}
} else if (self.isItalicStyle) {
font = [[UIFont italicSystemFontOfSize:self.size] retain];
} else if ([TiUtils isIOSVersionOrGreater:@"8.2"]) {
} else {
if (self.isSemiboldWeight) {
font = [[UIFont systemFontOfSize:self.size weight:UIFontWeightSemibold] retain];
} else if (self.isThinWeight) {
Expand All @@ -165,8 +172,6 @@ - (UIFont *)font
} else {
font = [[UIFont systemFontOfSize:self.size] retain];
}
} else {
font = [[UIFont systemFontOfSize:self.size] retain];
}
}
}
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@
"clang-format": "1.2.3",
"commander": "^4.0.1",
"commitizen": "^4.0.3",
"conventional-changelog-cli": "^2.0.30",
"core-js": "^3.4.8",
"conventional-changelog-cli": "^2.0.31",
"core-js": "^3.5.0",
"cz-conventional-changelog": "^3.0.2",
"danger": "^9.2.9",
"dateformat": "^3.0.3",
Expand Down

0 comments on commit ee08945

Please sign in to comment.