| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | { | |
| 2 | 2 | "name": "tns-core-modules", | |
| 3 | 3 | "description": "Telerik NativeScript Core Modules", | |
| 4 | - "version": "6.0.0", | ||
| 4 | + "version": "6.0.1", | ||
| 5 | 5 | "homepage": "https://www.nativescript.org", | |
| 6 | 6 | "repository": { | |
| 7 | 7 | "type": "git", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -169,6 +169,10 @@ function createTabItemSpec(tabStripItem: TabStripItem): org.nativescript.widgets | |||
| 169 | 169 | iconSource = tabStripItem.image ? tabStripItem.image.src : tabStripItem.iconSource; | |
| 170 | 170 | tabItemSpec.title = tabStripItem.label ? tabStripItem.label.text : tabStripItem.title; | |
| 171 | 171 | ||
| 172 | + if (tabStripItem.backgroundColor instanceof Color) { | ||
| 173 | + tabItemSpec.backgroundColor = tabStripItem.backgroundColor.android; | ||
| 174 | + } | ||
| 175 | + | ||
| 172 | 176 | if (iconSource) { | |
| 173 | 177 | if (iconSource.indexOf(RESOURCE_PREFIX) === 0) { | |
| 174 | 178 | tabItemSpec.iconId = ad.resources.getDrawableId(iconSource.substr(RESOURCE_PREFIX.length)); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -281,20 +281,18 @@ function initializeNativeClasses() { | |||
| 281 | 281 | TabLayout = TabLayoutImplementation; | |
| 282 | 282 | } | |
| 283 | 283 | ||
| 284 | - function createTabItemSpec(item: TabStripItem): org.nativescript.widgets.TabItemSpec { | ||
| 284 | + function createTabItemSpec(tabStripItem: TabStripItem): org.nativescript.widgets.TabItemSpec { | ||
| 285 | 285 | let iconSource; | |
| 286 | 286 | const tabItemSpec = new org.nativescript.widgets.TabItemSpec(); | |
| 287 | 287 | ||
| 288 | - if (item.backgroundColor) { | ||
| 289 | - if (item.backgroundColor instanceof Color) { | ||
| 290 | - tabItemSpec.backgroundColor = item.backgroundColor.android; | ||
| 291 | - } | ||
| 288 | + if (tabStripItem.backgroundColor instanceof Color) { | ||
| 289 | + tabItemSpec.backgroundColor = tabStripItem.backgroundColor.android; | ||
| 292 | 290 | } | |
| 293 | - | ||
| 291 | + | ||
| 294 | 292 | // Image and Label children of TabStripItem | |
| 295 | 293 | // take priority over its `iconSource` and `title` properties | |
| 296 | - iconSource = item.image ? item.image.src : item.iconSource; | ||
| 297 | - tabItemSpec.title = item.label ? item.label.text : item.title; | ||
| 294 | + iconSource = tabStripItem.image ? tabStripItem.image.src : tabStripItem.iconSource; | ||
| 295 | + tabItemSpec.title = tabStripItem.label ? tabStripItem.label.text : tabStripItem.title; | ||
| 298 | 296 | ||
| 299 | 297 | if (iconSource) { | |
| 300 | 298 | if (iconSource.indexOf(RESOURCE_PREFIX) === 0) { | |
@@ -305,15 +303,15 @@ function createTabItemSpec(item: TabStripItem): org.nativescript.widgets.TabItem | |||
| 305 | 303 | } | |
| 306 | 304 | } else { | |
| 307 | 305 | let is = new ImageSource(); | |
| 308 | - if (isFontIconURI(item.iconSource)) { | ||
| 309 | - const fontIconCode = item.iconSource.split("//")[1]; | ||
| 310 | - const font = item.style.fontInternal; | ||
| 311 | - const color = item.style.color; | ||
| 306 | + if (isFontIconURI(tabStripItem.iconSource)) { | ||
| 307 | + const fontIconCode = tabStripItem.iconSource.split("//")[1]; | ||
| 308 | + const font = tabStripItem.style.fontInternal; | ||
| 309 | + const color = tabStripItem.style.color; | ||
| 312 | 310 | is = fromFontIconCode(fontIconCode, font, color); | |
| 313 | 311 | } else { | |
| 314 | - is = fromFileOrResource(item.iconSource); | ||
| 312 | + is = fromFileOrResource(tabStripItem.iconSource); | ||
| 315 | 313 | } | |
| 316 | - | ||
| 314 | + | ||
| 317 | 315 | if (is) { | |
| 318 | 316 | // TODO: Make this native call that accepts string so that we don't load Bitmap in JS. | |
| 319 | 317 | tabItemSpec.iconDrawable = new android.graphics.drawable.BitmapDrawable(application.android.context.getResources(), is.android); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | { | |
| 2 | 2 | "name": "tns-platform-declarations", | |
| 3 | - "version": "6.0.0", | ||
| 3 | + "version": "6.0.1", | ||
| 4 | 4 | "description": "Platform-specific TypeScript declarations for NativeScript for accessing native objects", | |
| 5 | 5 | "main": "", | |
| 6 | 6 | "scripts": { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments