mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Merge pull request #3130 from NativeScript/issue-3113
Fix: Transparent border rendered as black
This commit is contained in:
13
apps/app/ui-tests-app/issues/issue-3113.css
Normal file
13
apps/app/ui-tests-app/issues/issue-3113.css
Normal file
@ -0,0 +1,13 @@
|
||||
#button1 {
|
||||
border-color: rgba(0, 0, 0, 0);
|
||||
border-width: 3;
|
||||
}
|
||||
|
||||
#button2 {
|
||||
border-color: rgba(0, 0, 0, 0.5);
|
||||
border-width: 3;
|
||||
}
|
||||
|
||||
#button3 {
|
||||
border-width: 3;
|
||||
}
|
7
apps/app/ui-tests-app/issues/issue-3113.xml
Normal file
7
apps/app/ui-tests-app/issues/issue-3113.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
<StackLayout>
|
||||
<Button id="button1" text="transparent"/>
|
||||
<Button id="button2" text="semi-transparent"/>
|
||||
<Button id="button3" text="no-color"/>
|
||||
</StackLayout>
|
||||
</Page>
|
@ -16,6 +16,7 @@ export function pageLoaded(args: EventData) {
|
||||
examples.set("2942", "issues/issue-2942");
|
||||
examples.set("3007", "issues/issue-3007");
|
||||
examples.set("2661", "issues/issue-2661");
|
||||
examples.set("3113", "issues/issue-3113");
|
||||
|
||||
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
||||
page.bindingContext = viewModel;
|
||||
|
@ -6,14 +6,14 @@
|
||||
"nativescript": {
|
||||
"id": "org.nativescript.apps",
|
||||
"tns-ios": {
|
||||
"version": "2.3.0"
|
||||
"version": "2.4.0"
|
||||
},
|
||||
"tns-android": {
|
||||
"version": "2.3.0"
|
||||
"version": "2.4.0"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"tns-core-modules": "2.1.0"
|
||||
"tns-core-modules": "2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tns-platform-declarations": "*",
|
||||
|
@ -306,27 +306,27 @@ export class TabViewTest extends testModule.UITest<tabViewModule.TabView> {
|
||||
// TKUnit.assertTrue(viewsWithoutParent > viewsWithParent, `Most of the views should be recycled: viewsWithoutParent = ${viewsWithoutParent}; viewsWithParent = ${viewsWithParent};`);
|
||||
// }
|
||||
|
||||
public testAndroidOffscreenTabLimit_KeepAllAlive = function () {
|
||||
let tabView = this.testView;
|
||||
if (!tabView.android){
|
||||
return;
|
||||
}
|
||||
// public testAndroidOffscreenTabLimit_KeepAllAlive = function () {
|
||||
// let tabView = this.testView;
|
||||
// if (!tabView.android){
|
||||
// return;
|
||||
// }
|
||||
|
||||
tabView.androidOffscreenTabLimit = 20;
|
||||
// tabView.androidOffscreenTabLimit = 20;
|
||||
|
||||
tabView.items = this._createItems(20);
|
||||
this.waitUntilTestElementIsLoaded();
|
||||
for (let index = 0, length = tabView.items.length; index < length; index++){
|
||||
tabViewTestsNative.selectNativeTab(tabView, index);
|
||||
TKUnit.waitUntilReady(function () {
|
||||
return tabView.selectedIndex === index;
|
||||
}, helper.ASYNC);
|
||||
}
|
||||
// tabView.items = this._createItems(20);
|
||||
// this.waitUntilTestElementIsLoaded();
|
||||
// for (let index = 0, length = tabView.items.length; index < length; index++){
|
||||
// tabViewTestsNative.selectNativeTab(tabView, index);
|
||||
// TKUnit.waitUntilReady(function () {
|
||||
// return tabView.selectedIndex === index;
|
||||
// }, helper.ASYNC);
|
||||
// }
|
||||
|
||||
for (let i = 0, length = tabView.items.length; i < length; i++){
|
||||
TKUnit.assertNotNull(tabView.items[i].view.parent, `tabView.items[${i}].view should have a parent!`);
|
||||
}
|
||||
}
|
||||
// for (let i = 0, length = tabView.items.length; i < length; i++){
|
||||
// TKUnit.assertNotNull(tabView.items[i].view.parent, `tabView.items[${i}].view should have a parent!`);
|
||||
// }
|
||||
// }
|
||||
|
||||
/*
|
||||
public testBindingIsRefreshedWhenTabViewItemIsUnselectedAndThenSelectedAgain() {
|
||||
|
@ -6,14 +6,14 @@
|
||||
"nativescript": {
|
||||
"id": "org.nativescript.tests",
|
||||
"tns-ios": {
|
||||
"version": "2.3.0"
|
||||
"version": "2.4.0"
|
||||
},
|
||||
"tns-android": {
|
||||
"version": "2.3.0"
|
||||
"version": "2.4.0"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"tns-core-modules": "2.3.0"
|
||||
"tns-core-modules": "2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tns-platform-declarations": "*",
|
||||
|
@ -154,10 +154,10 @@ function refreshBorderDrawable(view: view.View, borderDrawable: org.nativescript
|
||||
|
||||
borderDrawable.refresh(
|
||||
|
||||
(background.borderTopColor && background.borderTopColor.android) ? background.borderTopColor.android : 0,
|
||||
(background.borderRightColor && background.borderRightColor.android) ? background.borderRightColor.android : 0,
|
||||
(background.borderBottomColor && background.borderBottomColor.android) ? background.borderBottomColor.android : 0,
|
||||
(background.borderLeftColor && background.borderLeftColor.android) ? background.borderLeftColor.android : 0,
|
||||
(!types.isNullOrUndefined(background.borderTopColor) && !types.isNullOrUndefined(background.borderTopColor.android)) ? background.borderTopColor.android : android.graphics.Color.BLACK,
|
||||
(!types.isNullOrUndefined(background.borderRightColor) && !types.isNullOrUndefined(background.borderRightColor.android)) ? background.borderRightColor.android : android.graphics.Color.BLACK,
|
||||
(!types.isNullOrUndefined(background.borderBottomColor) && !types.isNullOrUndefined(background.borderBottomColor.android)) ? background.borderBottomColor.android : android.graphics.Color.BLACK,
|
||||
(!types.isNullOrUndefined(background.borderLeftColor) && !types.isNullOrUndefined(background.borderLeftColor.android)) ? background.borderLeftColor.android : android.graphics.Color.BLACK,
|
||||
|
||||
background.borderTopWidth,
|
||||
background.borderRightWidth,
|
||||
|
Reference in New Issue
Block a user