diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 2550558f9bc96d0fbb3e9b5446b1590a99d73f9b..9cc3b61ebcc3ac20bd195443d8ac73b51ba76b14 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -64,8 +64,15 @@ struct Index { } .width(CommonConstants.FULL_PERCENT) .backgroundColor(Color.White) - .tabBar(SubTabBarStyle.of($r('app.string.tab_index_one_title')) - .indicator({ color: $r('app.color.ohos_id_color_emphasize') }) + .tabBar( + SubTabBarStyle.of($r('app.string.tab_index_one_title')) + .indicator({ color: $r('app.color.ohos_id_color_emphasize') }) + .labelStyle({ + overflow: TextOverflow.Clip, + minFontSize: $r('app.integer.min_font_size'), + maxFontSize: $r('app.integer.max_font_size'), + font: { size: $r('app.integer.font_size') } + }) ) // Preview network PDF files. @@ -103,6 +110,12 @@ struct Index { .tabBar( SubTabBarStyle.of($r('app.string.tab_index_two_title')) .indicator({ color: $r('app.color.ohos_id_color_emphasize') }) + .labelStyle({ + overflow: TextOverflow.Clip, + minFontSize: $r('app.integer.min_font_size'), + maxFontSize: $r('app.integer.max_font_size'), + font: { size: $r('app.integer.font_size') } + }) ) } .barBackgroundColor(Color.White) diff --git a/entry/src/main/resources/base/element/integer.json b/entry/src/main/resources/base/element/integer.json index 29d19548575a1a08c66bf0ec7b4e8b10b3662ec3..4b52f797dd7be809187cb15a3ac3cc9dcf4f78c6 100644 --- a/entry/src/main/resources/base/element/integer.json +++ b/entry/src/main/resources/base/element/integer.json @@ -7,6 +7,18 @@ { "name": "home_margin_top", "value": 15 + }, + { + "name": "min_font_size", + "value": 12 + }, + { + "name": "max_font_size", + "value": 16 + }, + { + "name": "font_size", + "value": 16 } ] } \ No newline at end of file