Showing
1 changed file
with
11 additions
and
6 deletions
| @@ -3,7 +3,7 @@ import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' | @@ -3,7 +3,7 @@ import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' | ||
| 3 | import { WDRouterRule } from 'wdRouter/Index' | 3 | import { WDRouterRule } from 'wdRouter/Index' |
| 4 | import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog' | 4 | import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog' |
| 5 | import { Logger } from 'wdKit'; | 5 | import { Logger } from 'wdKit'; |
| 6 | -import { window } from '@kit.ArkUI'; | 6 | +import { font, window } from '@kit.ArkUI'; |
| 7 | 7 | ||
| 8 | /** | 8 | /** |
| 9 | * 读报纸半屏弹窗 | 9 | * 读报纸半屏弹窗 |
| @@ -56,6 +56,11 @@ export struct ENewspaperListDialog { | @@ -56,6 +56,11 @@ export struct ENewspaperListDialog { | ||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | async aboutToAppear() { | 58 | async aboutToAppear() { |
| 59 | + //注册字体 | ||
| 60 | + font.registerFont({ | ||
| 61 | + familyName: 'BebasNeueBold', | ||
| 62 | + familySrc: $rawfile('font/BebasNeueBold.otf') | ||
| 63 | + }) | ||
| 59 | // 屏幕高度 - 滑动高度计算 | 64 | // 屏幕高度 - 滑动高度计算 |
| 60 | let windowClass: window.Window = await window.getLastWindow(getContext(this)); | 65 | let windowClass: window.Window = await window.getLastWindow(getContext(this)); |
| 61 | let changeHeight = 85 + 44 + px2vp(windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height) | 66 | let changeHeight = 85 + 44 + px2vp(windowClass.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height) |
| @@ -151,7 +156,7 @@ export struct ENewspaperListDialog { | @@ -151,7 +156,7 @@ export struct ENewspaperListDialog { | ||
| 151 | Column() { | 156 | Column() { |
| 152 | if (itemIndex == 0) { | 157 | if (itemIndex == 0) { |
| 153 | Text(item.pageNum + '版:' + item.pageName) | 158 | Text(item.pageNum + '版:' + item.pageName) |
| 154 | - .fontSize($r('app.float.font_size_14')) | 159 | + .fontSize($r('app.float.font_size_13')) |
| 155 | .fontColor($r('app.color.color_ED2800')) | 160 | .fontColor($r('app.color.color_ED2800')) |
| 156 | .fontWeight(600) | 161 | .fontWeight(600) |
| 157 | .width('100%') | 162 | .width('100%') |
| @@ -165,7 +170,7 @@ export struct ENewspaperListDialog { | @@ -165,7 +170,7 @@ export struct ENewspaperListDialog { | ||
| 165 | Column() { | 170 | Column() { |
| 166 | if (positionItem.shortTitle) { | 171 | if (positionItem.shortTitle) { |
| 167 | Text(positionItem.shortTitle) | 172 | Text(positionItem.shortTitle) |
| 168 | - .fontSize($r('app.float.font_size_14')) | 173 | + .fontSize($r('app.float.font_size_13')) |
| 169 | .fontColor($r('app.color.color_222222')) | 174 | .fontColor($r('app.color.color_222222')) |
| 170 | .fontWeight(600) | 175 | .fontWeight(600) |
| 171 | // .maxLines(2) | 176 | // .maxLines(2) |
| @@ -176,7 +181,7 @@ export struct ENewspaperListDialog { | @@ -176,7 +181,7 @@ export struct ENewspaperListDialog { | ||
| 176 | 181 | ||
| 177 | if (positionItem.title) { | 182 | if (positionItem.title) { |
| 178 | Text(positionItem.title) | 183 | Text(positionItem.title) |
| 179 | - .fontSize($r('app.float.font_size_17')) | 184 | + .fontSize($r('app.float.font_size_16')) |
| 180 | .fontColor($r('app.color.color_222222')) | 185 | .fontColor($r('app.color.color_222222')) |
| 181 | .fontWeight(600) | 186 | .fontWeight(600) |
| 182 | .margin({ | 187 | .margin({ |
| @@ -187,7 +192,7 @@ export struct ENewspaperListDialog { | @@ -187,7 +192,7 @@ export struct ENewspaperListDialog { | ||
| 187 | 192 | ||
| 188 | if (positionItem.downTitle) { | 193 | if (positionItem.downTitle) { |
| 189 | Text(positionItem.downTitle) | 194 | Text(positionItem.downTitle) |
| 190 | - .fontSize($r('app.float.font_size_14')) | 195 | + .fontSize($r('app.float.font_size_13')) |
| 191 | .fontColor($r('app.color.color_222222')) | 196 | .fontColor($r('app.color.color_222222')) |
| 192 | .fontWeight(600) | 197 | .fontWeight(600) |
| 193 | .margin({ | 198 | .margin({ |
| @@ -197,7 +202,7 @@ export struct ENewspaperListDialog { | @@ -197,7 +202,7 @@ export struct ENewspaperListDialog { | ||
| 197 | } | 202 | } |
| 198 | if (positionItem.newsTxt) { | 203 | if (positionItem.newsTxt) { |
| 199 | Text(positionItem.newsTxt) | 204 | Text(positionItem.newsTxt) |
| 200 | - .fontSize($r('app.float.font_size_14')) | 205 | + .fontSize($r('app.float.font_size_13')) |
| 201 | .fontColor($r('app.color.color_999999')) | 206 | .fontColor($r('app.color.color_999999')) |
| 202 | .lineHeight(25) | 207 | .lineHeight(25) |
| 203 | .margin({ | 208 | .margin({ |
-
Please register or login to post a comment