diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 0f982cd2b3fa8c5bd1b62335dda8313021586804..fbd980d9c72bcb32bc969a51c7250221bae936d0 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -158,10 +158,10 @@ struct Index { build() { Column({ space: CommonConstants.SPACE_TEN }) { Row({ space: CommonConstants.SPACE_TEN }) { - Text($r('app.string.max_compression_image_size')).fontSize($r('app.float.font_size_20')) + Text($r('app.string.max_compression_image_size')).fontSize($r('app.float.font_size_16')) TextInput() .type(InputType.Number) - .fontSize($r('app.float.font_size_20')) + .fontSize($r('app.float.font_size_16')) .width($r('app.string.text_input_width')) .onChange((value: string) => { this.maxCompressedImageSize = Number(value); @@ -192,13 +192,13 @@ struct Index { } this.compressedImageSrc = ''; this.imageCompression(); - }).fontSize($r('app.float.font_size_20')).width($r('app.string.button_width')) + }).fontSize($r('app.float.font_size_16')).width($r('app.string.button_width')) Row() { Text($r('app.string.image_size_before_compression')) - .fontSize($r('app.float.font_size_20')) + .fontSize($r('app.float.font_size_16')) Text(this.beforeCompressionSize) - .fontSize($r('app.float.font_size_20')) + .fontSize($r('app.float.font_size_16')) } Image($rawfile('beforeCompression.jpeg')) @@ -207,9 +207,9 @@ struct Index { Row() { Text($r('app.string.image_size_after_compression')) - .fontSize($r('app.float.font_size_20')) + .fontSize($r('app.float.font_size_16')) Text(this.afterCompressionSize) - .fontSize($r('app.float.font_size_20')) + .fontSize($r('app.float.font_size_16')) } Image(this.compressedImageSrc) diff --git a/entry/src/main/resources/base/element/float.json b/entry/src/main/resources/base/element/float.json index 0870e2d1d9b041f1f4c17a7118a9845e606c1126..5e968ae9ef26cdcb90c437568acc742a92262b66 100644 --- a/entry/src/main/resources/base/element/float.json +++ b/entry/src/main/resources/base/element/float.json @@ -1,8 +1,8 @@ { "float": [ { - "name": "font_size_20", - "value": "20fp" + "name": "font_size_16", + "value": "16vp" }, { "name": "column_padding", diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index f0dc8c923472b5bc86e9468e7d0b97c751874eff..d4a1e6e22b80c46ac332751573248021e60347cd 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -18,31 +18,31 @@ }, { "name": "image_compression", - "value": "图片压缩" + "value": "Image Compression" }, { "name": "max_compression_image_size", - "value": "输入图片压缩目标大小(kb):" + "value": "Input image compression target size(kb):" }, { "name": "image_size_before_compression", - "value": "压缩前图片大小(kb): " + "value": "Image size before compression(kb): " }, { "name": "image_size_after_compression", - "value": "压缩后图片大小(kb): " + "value": "Compressed image size(kb): " }, { "name": "prompt_enter_value_greater_than_0", - "value": "请输入大于0的值" + "value": "Enter a value greater than 0." }, { "name": "prompt_not_require_compression", - "value": "符合压缩要求,无需压缩" + "value": "Compiles with compression requirement and doesn't require compression." }, { "name": "image_get_failed", - "value": "图片获取失败" + "value": "Failed to obtain the image." }, { "name": "module_desc", diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..1b1fd0d9192624cfe994fe8d09dd99454780041f --- /dev/null +++ b/entry/src/main/resources/en_US/element/string.json @@ -0,0 +1,60 @@ +{ + "string": [ + { + "name": "text_input_width", + "value": "20%" + }, + { + "name": "button_width", + "value": "60%" + }, + { + "name": "image_width", + "value": "100%" + }, + { + "name": "image_height", + "value": "30%" + }, + { + "name": "image_compression", + "value": "Image Compression" + }, + { + "name": "max_compression_image_size", + "value": "Input compression target size(kb):" + }, + { + "name": "image_size_before_compression", + "value": "Image size before compression(kb): " + }, + { + "name": "image_size_after_compression", + "value": "Compressed image size(kb): " + }, + { + "name": "prompt_enter_value_greater_than_0", + "value": "Enter a value greater than 0." + }, + { + "name": "prompt_not_require_compression", + "value": "Compiles with compression requirement and doesn't require compression." + }, + { + "name": "image_get_failed", + "value": "Failed to obtain the image." + }, + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "ImageCompression" + } + ] +} \ No newline at end of file diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..a92563e7267dd2514dd03cb22620f8d5e545bfe9 --- /dev/null +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,60 @@ +{ + "string": [ + { + "name": "text_input_width", + "value": "20%" + }, + { + "name": "button_width", + "value": "50%" + }, + { + "name": "image_width", + "value": "100%" + }, + { + "name": "image_height", + "value": "30%" + }, + { + "name": "image_compression", + "value": "图片压缩" + }, + { + "name": "max_compression_image_size", + "value": "输入图片压缩目标大小(kb):" + }, + { + "name": "image_size_before_compression", + "value": "压缩前图片大小(kb): " + }, + { + "name": "image_size_after_compression", + "value": "压缩后图片大小(kb): " + }, + { + "name": "prompt_enter_value_greater_than_0", + "value": "请输入大于0的值" + }, + { + "name": "prompt_not_require_compression", + "value": "符合压缩要求,无需压缩" + }, + { + "name": "image_get_failed", + "value": "图片获取失败" + }, + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "ImageCompression" + } + ] +} \ No newline at end of file