Showing
3 changed files
with
8 additions
and
8 deletions
| @@ -28,7 +28,7 @@ export class GradeSpan extends CustomSpan { | @@ -28,7 +28,7 @@ export class GradeSpan extends CustomSpan { | ||
| 28 | canvas.attachBrush(brush); | 28 | canvas.attachBrush(brush); |
| 29 | let options2 = new drawing.SamplingOptions(drawing.FilterMode.FILTER_MODE_NEAREST); | 29 | let options2 = new drawing.SamplingOptions(drawing.FilterMode.FILTER_MODE_NEAREST); |
| 30 | if (this.imagePixelMap) { | 30 | if (this.imagePixelMap) { |
| 31 | - canvas.drawImage(this.imagePixelMap, options.x , options.lineBottom - vp2px(this.height) - 10, options2); | 31 | + canvas.drawImage(this.imagePixelMap, options.x + vp2px(6) , options.lineBottom - vp2px(this.height) - 10, options2); |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | brush.setColor({ alpha: 255, red: 237, green: 40, blue: 0 }); | 34 | brush.setColor({ alpha: 255, red: 237, green: 40, blue: 0 }); |
| @@ -38,7 +38,7 @@ export class GradeSpan extends CustomSpan { | @@ -38,7 +38,7 @@ export class GradeSpan extends CustomSpan { | ||
| 38 | font.setSize(vp2px(12)); | 38 | font.setSize(vp2px(12)); |
| 39 | const textBlob = drawing.TextBlob.makeFromString(this.word, font, drawing.TextEncoding.TEXT_ENCODING_UTF8); | 39 | const textBlob = drawing.TextBlob.makeFromString(this.word, font, drawing.TextEncoding.TEXT_ENCODING_UTF8); |
| 40 | // canvas.drawTextBlob(textBlob, options.x + 20, options.lineBottom - 15); | 40 | // canvas.drawTextBlob(textBlob, options.x + 20, options.lineBottom - 15); |
| 41 | - canvas.drawTextBlob(textBlob, options.x + vp2px(9), options.lineBottom - vp2px(7.5)); | 41 | + canvas.drawTextBlob(textBlob, options.x + vp2px(9) + vp2px(6) , options.lineBottom - vp2px(7.5)); |
| 42 | 42 | ||
| 43 | canvas.detachBrush(); | 43 | canvas.detachBrush(); |
| 44 | } | 44 | } |
| @@ -123,9 +123,9 @@ struct MineHomePage { | @@ -123,9 +123,9 @@ struct MineHomePage { | ||
| 123 | Column() { | 123 | Column() { |
| 124 | Row() { | 124 | Row() { |
| 125 | 125 | ||
| 126 | - UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId >9 ? 50 : 45}) | 126 | + UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId > 9 ? (this.levelId > 10 ? 55 : 50 ): 45}) |
| 127 | 127 | ||
| 128 | - }.constraintSize({maxWidth:`calc(100% - 16vp - 90vp)`}) | 128 | + }.constraintSize({maxWidth:`calc(100% - 16vp - 80vp)`}) |
| 129 | .padding({top:8}) | 129 | .padding({top:8}) |
| 130 | .onClick(()=>{ | 130 | .onClick(()=>{ |
| 131 | let params: editModelParams = { | 131 | let params: editModelParams = { |
| @@ -187,7 +187,7 @@ struct MineHomePage { | @@ -187,7 +187,7 @@ struct MineHomePage { | ||
| 187 | } | 187 | } |
| 188 | }) | 188 | }) |
| 189 | .backgroundColor($r('app.color.color_transparent')) | 189 | .backgroundColor($r('app.color.color_transparent')) |
| 190 | - .height(100) | 190 | + .height(120) |
| 191 | .width('100%') | 191 | .width('100%') |
| 192 | .padding({ left: 10 }) | 192 | .padding({ left: 10 }) |
| 193 | 193 |
| @@ -111,9 +111,9 @@ struct OtherNormalUserHomePage { | @@ -111,9 +111,9 @@ struct OtherNormalUserHomePage { | ||
| 111 | 111 | ||
| 112 | Column() { | 112 | Column() { |
| 113 | Row() { | 113 | Row() { |
| 114 | - UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId >9 ? 50 : 45}) | 114 | + UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId > 9 ? (this.levelId > 10 ? 55 : 50 ): 45}) |
| 115 | 115 | ||
| 116 | - }.constraintSize({maxWidth:`calc(100% - 16vp - 90vp)`}) | 116 | + }.constraintSize({maxWidth:`calc(100% - 16vp - 80vp)`}) |
| 117 | .padding({top:8}) | 117 | .padding({top:8}) |
| 118 | 118 | ||
| 119 | /*Row() { | 119 | /*Row() { |
| @@ -189,7 +189,7 @@ struct OtherNormalUserHomePage { | @@ -189,7 +189,7 @@ struct OtherNormalUserHomePage { | ||
| 189 | } | 189 | } |
| 190 | }) | 190 | }) |
| 191 | // .backgroundColor($r('app.color.color_transparent')) | 191 | // .backgroundColor($r('app.color.color_transparent')) |
| 192 | - .height('184lpx') | 192 | + .height('220lpx') |
| 193 | .width('100%') | 193 | .width('100%') |
| 194 | .padding({ left: '6lpx' }) | 194 | .padding({ left: '6lpx' }) |
| 195 | 195 |
-
Please register or login to post a comment