Skip to content

Commit 95eaf8f

Browse files
committed
chore: N 8.4 updates
1 parent c71ba38 commit 95eaf8f

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

src/canvas.android.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { CSSType, Color, Device, Font, ImageSource, View } from '@nativescript/core';
22
import { android as androidApp } from '@nativescript/core/application';
3-
import { FontStyle, FontWeight } from '@nativescript/core/ui/styling/font';
3+
import { FontStyle, FontStyleType, FontWeight, FontWeightType } from '@nativescript/core/ui/styling/font';
44
import lazy from '@nativescript/core/utils/lazy';
55
import { layout } from '@nativescript/core/utils/layout-helper';
66
import { Canvas as ICanvas, Paint as IPaint } from './canvas';
@@ -284,21 +284,21 @@ export class Paint extends ProxyClass<android.graphics.Paint> {
284284
}
285285
}
286286
}
287-
set fontWeight(weight: FontWeight) {
287+
set fontWeight(weight: FontWeightType) {
288288
this.setFontWeight(weight);
289289
}
290-
setFontWeight(weight: FontWeight) {
290+
setFontWeight(weight: FontWeightType) {
291291
if (this.font.fontWeight !== weight) {
292292
this.mFontInternal = this.font.withFontWeight(weight);
293293
if (!this.handlesFont) {
294294
this.mNeedsFontUpdate = true;
295295
}
296296
}
297297
}
298-
set fontStyle(style: FontStyle) {
298+
set fontStyle(style: FontStyleType) {
299299
this.setFontStyle(style);
300300
}
301-
setFontStyle(style: FontStyle) {
301+
setFontStyle(style: FontStyleType) {
302302
if (this.font.fontStyle !== style) {
303303
this.mFontInternal = this.font.withFontStyle(style);
304304
if (!this.handlesFont) {

src/canvas.common.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { layout } from '@nativescript/core/utils/layout-helper';
33
import { Canvas, Rect, RectF } from './canvas';
44
import Shape from './shapes/shape';
55

6-
declare module '@nativescript/core/ui/core/view' {
7-
interface View {
8-
_raiseLayoutChangedEvent();
9-
}
10-
}
6+
// declare module '@nativescript/core/ui/core/view' {
7+
// interface ViewCommon {
8+
// _raiseLayoutChangedEvent();
9+
// }
10+
// }
1111

1212
export function createRect(x: number, y: number, w: number, h: number) {
1313
return new Rect(x, y, x + w, y + h);

src/canvas.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @typescript-eslint/adjacent-overload-signatures */
22
/* eslint-disable @typescript-eslint/unified-signatures */
33
import { Color, ImageSource, ObservableArray, View } from '@nativescript/core';
4-
import { Font, FontStyle, FontWeight } from '@nativescript/core/ui/styling/font';
4+
import { Font, FontStyle, FontStyleType, FontWeight, FontWeightType } from '@nativescript/core/ui/styling/font';
55
import Shape from './shapes/shape';
66

77
export function createRect(x: number, y: number, w: number, h: number): Rect;
@@ -30,8 +30,8 @@ export class Paint {
3030
textSize: number;
3131
letterSpacing: number;
3232
fontFamily: string;
33-
fontWeight: FontWeight;
34-
fontStyle: FontStyle;
33+
fontWeight: FontWeightType;
34+
fontStyle: FontStyleType;
3535
font: Font;
3636
getFont(): Font;
3737
setFont(font: Font);
@@ -78,8 +78,8 @@ export class Paint {
7878
public getStrokeCap(): Cap;
7979
public setTextSize(value: number): void;
8080
public setFontFamily(familyName: string);
81-
public setFontWeight(weight: FontWeight);
82-
public setFontStyle(style: FontStyle);
81+
public setFontWeight(weight: FontWeightType);
82+
public setFontStyle(style: FontStyleType);
8383
public getFontFamily(): string;
8484
public setShader(value: any): any;
8585
// public descent(): number;

src/canvas.ios.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable no-redeclare */
2-
import { Font, FontStyle, FontWeight } from '@nativescript/core/ui/styling/font';
2+
import { Font, FontStyle, FontStyleType, FontWeight, FontWeightType } from '@nativescript/core/ui/styling/font';
33
import { CSSType, Color, View, backgroundColorProperty } from '@nativescript/core';
44
import { layout } from '@nativescript/core/utils/layout-helper';
55
import { ImageSource } from '@nativescript/core/image-source';
@@ -1065,20 +1065,20 @@ export class Paint implements IPaint {
10651065
return this.font.fontFamily || this.getUIFont().familyName;
10661066
}
10671067

1068-
set fontWeight(weight: FontWeight) {
1068+
set fontWeight(weight: FontWeightType) {
10691069
if (this.mFont && this.mFont.fontWeight === weight) {
10701070
return;
10711071
}
10721072
this.setFontWeight(weight);
10731073
}
1074-
setFontWeight(weight: FontWeight) {
1074+
setFontWeight(weight: FontWeightType) {
10751075
this.mFont = this.font.withFontWeight(weight);
10761076
this.mTextAttribs = null;
10771077
}
1078-
set fontStyle(style: FontStyle) {
1078+
set fontStyle(style: FontStyleType) {
10791079
this.setFontStyle(style);
10801080
}
1081-
setFontStyle(style: FontStyle) {
1081+
setFontStyle(style: FontStyleType) {
10821082
if (this.mFont && this.mFont.fontStyle === style) {
10831083
return;
10841084
}

0 commit comments

Comments
 (0)