Merge #827 into sdk602patch0626 from refs/changes/827/head 830/target/1 831/target/1 832/target/1
author彭磊 <1624952103@qq.com>
Thu, 29 Aug 2024 13:29:29 +0000 (13:29 +0000)
committersnickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Thu, 29 Aug 2024 13:29:29 +0000 (13:29 +0000)
Code review from 彭磊

* refs/changes/827/head: (4 commits squashed)

  - 优化睡眠状态时间戳计算

  - Merge branch &#39;sdk602patch0626&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0626

  - 优化黑曜表盘UI

  - Merge branch &#39;sdk602patch0626&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0626

Signed-off-by: aliyun6865282430 <1624952103@qq.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Merged-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/827
code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelWeather.h
code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelWeatherStr.h
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font_library/Audiowide_Regular.ttf [new file with mode: 0644]
code/sdk/middleware/services/gui/uikit/utils/interfaces/innerkits/graphic_config.h
tools/dial_converter_tool/instance/114/obsidianrhythm.xml

index 27ce088..098d787 100644 (file)
@@ -459,10 +459,11 @@ namespace OHOS
         // ConfigModel::GetInstance()->Init();
         // 初始化语言
         GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE, OHOS::VECTOR_FONT_DIR, DEFAULT_VECTOR_FONT_FILENAME);
-        GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE, OHOS::NEW_FONT_DIR, GILROY_BOLD_FONT); // 注册字体
+        GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE, OHOS::NEW_FONT_DIR, GILROY_BOLD_FONT);          // 注册字体
+        GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE, OHOS::NEW_FONT_DIR, AUDIOWIDE_REGULAR_FONT);    // 注册字体
 #if 0
-        GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE, OHOS::NEW_FONT_DIR, SHEEPING_CATS_FONT);  // 注册字体
-        GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE, OHOS::NEW_FONT_DIR, GILROY_REGULAR_FONT); // 注册字体
+        GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE, OHOS::NEW_FONT_DIR, SHEEPING_CATS_FONT);        // 注册字体
+        GraphicStartUp::InitFontEngine(MEM_POOL_UI_FONT, MEM_POOL_UI_FONT_SIZE, OHOS::NEW_FONT_DIR, GILROY_REGULAR_FONT);       // 注册字体
 #endif
 
         WEARABLE_LOGI(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "NativeLauncher::InitNativeLauncher");
index eefd660..c5e7463 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: penglei 1624952103@qq.com
  * @Date: 2024-06-07 11:18:25
  * @LastEditors: penglei 1624952103@qq.com
- * @LastEditTime: 2024-08-28 11:28:26
+ * @LastEditTime: 2024-08-29 17:52:26
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelWeather.h
  * @Description: 
  * 
@@ -38,8 +38,8 @@ namespace OHOS
         int GetWeatherData(void);
 
     private:
-        float Weather_ = 0; // 默认晴天
-        std::string Weather_Str = "25° 晴";
+        float Weather_ = 11; // 默认unkown
+        std::string Weather_Str = "/°";
     };
 }
 #endif
index 4220289..6aa88a4 100644 (file)
@@ -33,7 +33,7 @@ namespace OHOS
         void UpdateWeatherStr(const std::string dialWeatherStr);
 
     private:
-        std::string dialWeatherStr_;
+        std::string dialWeatherStr_ = "/°";
     };
 }
 #endif
\ No newline at end of file
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font_library/Audiowide_Regular.ttf b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font_library/Audiowide_Regular.ttf
new file mode 100644 (file)
index 0000000..348817d
Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/font_library/Audiowide_Regular.ttf differ
index 07e4f00..4f41a4e 100755 (executable)
@@ -507,6 +507,7 @@ namespace OHOS {
 #define GILROY_BOLD_FONT                  "Gilroy_Bold.ttf"
 #define GILROY_MEDIUM_FONT                "Gilroy_Medium.ttf"
 #define SHEEPING_CATS_FONT                "Sheeping_Cats.ttf"
+#define AUDIOWIDE_REGULAR_FONT            "Audiowide_Regular.ttf"
 #else
 #if ENABLE_VECTOR_FONT
 #define DEFAULT_VECTOR_FONT_FILENAME      "SourceHanSansSC-Regular.otf"
index e544170..6deae99 100644 (file)
     <static_img id="back_ground" position="0 0" img_name="./instance/114/MAIN_FACE_IMAGE.png"></static_img>\r
 \r
     <!-- 天气显示 -->\r
-    <option_img position="201 69" img_names="./instance/114/weather/SUNNY.png,./instance/114/weather/SUNNY.png,./instance/114/weather/CLEAR_SUNNY.png,./instance/114/weather/SUNNY_CLOUDY.png,./instance/114/weather/CLEAR_CLOUDY.png,./instance/114/weather/OVERCAST.png,./instance/114/weather/RAIN.png,./instance/114/weather/THUNDERSHOWER.png,./instance/114/weather/SNOW.png,./instance/114/weather/FOGGY.png,./instance/114/weather/HAZE.png,./instance/114/weather/DUSTSTORM.png,./instance/114/weather/UNKNOWN.png" bind_data="24" ></option_img>\r
+    <option_img position="201 69" img_names="./instance/114/weather/SUNNY.png,./instance/114/weather/CLEAR_SUNNY.png,./instance/114/weather/SUNNY_CLOUDY.png,./instance/114/weather/CLEAR_CLOUDY.png,./instance/114/weather/OVERCAST.png,./instance/114/weather/RAIN.png,./instance/114/weather/THUNDERSHOWER.png,./instance/114/weather/SNOW.png,./instance/114/weather/FOGGY.png,./instance/114/weather/HAZE.png,./instance/114/weather/DUSTSTORM.png,./instance/114/weather/UNKNOWN.png" bind_data="24" ></option_img>\r
     \r
     <!-- 星期显示 -->\r
     <option_img position="75 173" img_names="./instance/114/week/WEEK_SUN.png,./instance/114/week/WEEK_MON.png,./instance/114/week/WEEK_TUE.png,./instance/114/week/WEEK_WED.png,./instance/114/week/WEEK_THU.png,./instance/114/week/WEEK_FRI.png,./instance/114/week/WEEK_SAT.png" bind_data="17" period="10"></option_img>\r
 \r
     <!-- 天气信息显示 -->\r
-    <label id="weather_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="83 134 300 30" text="%s" font_size="26" align="center" bind_data="20482" ></label>\r
+    <label id="weather_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="83 130 300 30" text="%s" font_size="26" align="center" bind_data="20482" ></label>\r
 \r
     <!-- 日期显示 -->\r
-    <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="125 225 33 40" text="%2.0f" font_size="26" align="center" bind_data="16" period="10"></label>\r
+    <label id="day_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="adapt" rect="120 222 33 40" text="%2.0f" font_size="26" align="center" bind_data="16" period="10"></label>\r
     \r
     <!-- 心率显示 -->\r
-    <label id="heart_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="127 348 49 25" text="%3.0f" font_size="20" align="center" bind_data="2"></label>\r
+    <label id="heart_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="126 348 49 25" text="%3.0f" font_size="20" align="center" bind_data="2"></label>\r
     <!-- 步数显示 -->\r
-    <label id="step_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="188 374 67 25" text="%5.0f" font_size="20" align="center" bind_data="1"></label>\r
+    <label id="step_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="187 374 67 25" text="%5.0f" font_size="20" align="center" bind_data="1"></label>\r
     <!-- 卡路里显示 -->\r
-    <label id="calories_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="282 348 45 25" text="%3.f" font_size="20" align="center" bind_data="3"></label>\r
+    <label id="calories_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="281 348 45 25" text="%3.f" font_size="20" align="center" bind_data="3"></label>\r
     \r
     <!-- 心率icon显示 -->\r
     <static_img  position="144 315"  img_name="./instance/114/module/heartrate.png"></static_img>\r
     <static_img  position="300 213"  img_name="./instance/114/module/ellipse.png"></static_img>\r
 \r
     <!-- 小时显示 -->\r
-    <label id="hour_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="312 220 77 104" text="%02.0f" font_size="26" align="center" bind_data="15" period="10"></label>\r
+    <label id="hour_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="adapt" rect="312 220 77 104" text="%02.0f" font_size="24" align="center" bind_data="15" period="10"></label>\r
     <!-- 分号显示 -->\r
-    <label id="point_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="342 220 28 139" text=":" font_size="26" align="center"></label>\r
+    <label id="point_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="adapt" rect="342 220 28 139" text=":" font_size="24" align="center"></label>\r
     <!-- 分钟显示 -->\r
-    <label id="minute_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="350 220 77 104" text="%02.0f" font_size="26" align="center" bind_data="14" period="10"></label>\r
+    <label id="minute_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="adapt" rect="350 220 77 104" text="%02.0f" font_size="24" align="center" bind_data="14" period="10"></label>\r
 \r
     <!-- 小时 -->\r
     <rotate_img id="hour" position="212 75" rotate_center="21.0 158.0" rotate_start="0" rotate_end="360" img_name="./instance/114/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r