From 5874dfdaf6d096843053a97c51866ef8d5f9dd98 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Wed, 21 Jan 2026 15:04:45 +0800 Subject: [PATCH] =?utf8?q?=E5=88=A0=E9=99=A4=E6=8B=A8=E5=8F=B7=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../dropdown/DropDownCardPageUiConfig.h | 2 +- .../main/src/dropdown/DropDownCardPage1.cpp | 20 +++++++++---------- .../themestyle/include/ThemeStyleView.h | 2 +- .../themestyle/src/ThemeStyleView.cpp | 9 ++++++--- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/include/dropdown/DropDownCardPageUiConfig.h b/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/include/dropdown/DropDownCardPageUiConfig.h index 55202056d..bb653960d 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/include/dropdown/DropDownCardPageUiConfig.h +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/include/dropdown/DropDownCardPageUiConfig.h @@ -44,7 +44,7 @@ namespace OHOS "/user/res/themestyle/list.bin", // 列表 "/user/res/themestyle/arclist.bin", // 弧形列表 "/user/res/themestyle/hexagons.bin", // 蜂窝 - "/user/res/themestyle/dialplate.bin", // 拨号盘 + // "/user/res/themestyle/dialplate.bin", // 拨号盘 "/user/res/themestyle/grid.bin", // 瀑布流 }; } diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp index 3aa86a04b..7c62e9277 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp @@ -167,13 +167,13 @@ namespace OHOS else if (style == ThemeStyle::HEXAGONS_STYLE) { toggleButton[toggleButton_3]->SetImages(DROPDOWN_APPLIST_DISPLAY_IMAGE[3], DROPDOWN_APPLIST_DISPLAY_IMAGE[3]); // 切换到拨号盘 - ThemeStyleModel::GetInstance().SetAppListDisplayStyle(ThemeStyle::CIRCLE_LIST_STYLE); - } - else if (style == ThemeStyle::CIRCLE_LIST_STYLE) - { - toggleButton[toggleButton_3]->SetImages(DROPDOWN_APPLIST_DISPLAY_IMAGE[4], DROPDOWN_APPLIST_DISPLAY_IMAGE[4]); // 切换到瀑布流 ThemeStyleModel::GetInstance().SetAppListDisplayStyle(ThemeStyle::WATERFALL_STYLE); } + // else if (style == ThemeStyle::CIRCLE_LIST_STYLE) + // { + // toggleButton[toggleButton_3]->SetImages(DROPDOWN_APPLIST_DISPLAY_IMAGE[4], DROPDOWN_APPLIST_DISPLAY_IMAGE[4]); // 切换到瀑布流 + // ThemeStyleModel::GetInstance().SetAppListDisplayStyle(ThemeStyle::WATERFALL_STYLE); + // } else if (style == ThemeStyle::WATERFALL_STYLE) { toggleButton[toggleButton_3]->SetImages(DROPDOWN_APPLIST_DISPLAY_IMAGE[0], DROPDOWN_APPLIST_DISPLAY_IMAGE[0]); // 切换到列表 @@ -208,13 +208,13 @@ namespace OHOS { index = 2; } - else if (style == ThemeStyle::CIRCLE_LIST_STYLE) // 拨号盘 - { - index = 3; - } + // else if (style == ThemeStyle::CIRCLE_LIST_STYLE) // 拨号盘 + // { + // index = 3; + // } else if (style == ThemeStyle::WATERFALL_STYLE) // 瀑布流 { - index = 4; + index = 3; } ToggleButtonConfig toggleButtonConfig[] = { diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/themestyle/include/ThemeStyleView.h b/code/sdk/application/wearable/fd272/nativeapp/nativeui/themestyle/include/ThemeStyleView.h index afac7918a..a400b0360 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/themestyle/include/ThemeStyleView.h +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/themestyle/include/ThemeStyleView.h @@ -24,7 +24,7 @@ namespace OHOS { - static constexpr const uint16_t MAX_STYLE = MAX_THEME_STYLE - 1; //直线列表和足球不显示所以删除了两个 + static constexpr const uint16_t MAX_STYLE = MAX_THEME_STYLE - 2; //直线列表和足球不显示所以删除了两个 static constexpr char *THEME_STYLE_LIST = "themestyleList"; // 列表 static constexpr char *THEME_STYLE_HEXAGONS = "themestyleHexagons"; // 蜂窝 static constexpr char *THEME_STYLE_FOOTBALL = "themestyleFootball"; // 足球 diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/themestyle/src/ThemeStyleView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/themestyle/src/ThemeStyleView.cpp index 49a0c0770..5a0957820 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/themestyle/src/ThemeStyleView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/themestyle/src/ThemeStyleView.cpp @@ -182,7 +182,8 @@ namespace OHOS scrollView->Add(titleText); /* -------------------------------------------------------------------------- */ // int16_t textId[] = {STR_LIST_DISPLAY, STR_CELLULAR_DISPLAY, STR_ARC_SCALE_LIST_DISPLAY,STR_DIAL_PLATE}; - int16_t textId[] = {STR_LIST_DISPLAY,STR_ARC_SCALE_LIST_DISPLAY, STR_CELLULAR_DISPLAY,STR_DIAL_PLATE,STR_WATERFALL_DISPLAY}; + // int16_t textId[] = {STR_LIST_DISPLAY,STR_ARC_SCALE_LIST_DISPLAY, STR_CELLULAR_DISPLAY,STR_DIAL_PLATE,STR_WATERFALL_DISPLAY}; + int16_t textId[] = {STR_LIST_DISPLAY,STR_ARC_SCALE_LIST_DISPLAY, STR_CELLULAR_DISPLAY,STR_WATERFALL_DISPLAY}; LabelConfig labelConfig = { .left = 143, .top = 153, @@ -235,7 +236,8 @@ namespace OHOS }; // const char *viewId[] = {THEME_STYLE_LIST, THEME_STYLE_HEXAGONS, THEME_STYLE_ARC_LIST,THEME_STYLE_CIRCLE_LIST}; - const char *viewId[] = {THEME_STYLE_LIST,THEME_STYLE_ARC_LIST, THEME_STYLE_HEXAGONS,THEME_STYLE_CIRCLE_LIST,THEME_STYLE_WATERFALL}; + // const char *viewId[] = {THEME_STYLE_LIST,THEME_STYLE_ARC_LIST, THEME_STYLE_HEXAGONS,THEME_STYLE_CIRCLE_LIST,THEME_STYLE_WATERFALL}; + const char *viewId[] = {THEME_STYLE_LIST,THEME_STYLE_ARC_LIST, THEME_STYLE_HEXAGONS,THEME_STYLE_WATERFALL}; for (int i = 0; i < sizeof(viewId) / sizeof(viewId[0]); i++) { labelbuttonconfig.top = 120 + 120 * i; @@ -277,7 +279,8 @@ namespace OHOS }; int y = 150; // const char *src[MAX_STYLE] = {THEMESTYLE_LIST_IMAGEPATH, THEMESTYLE_HEXAGONS_IMAGEPATH, THEMESTYLE_ARCLIST_IMAGEPATH,THEMESTYLE_CIRCLELIST_IMAGEPATH}; - const char *src[] = {THEMESTYLE_LIST_IMAGEPATH,THEMESTYLE_ARCLIST_IMAGEPATH, THEMESTYLE_HEXAGONS_IMAGEPATH,THEMESTYLE_CIRCLELIST_IMAGEPATH,THEMESTYLE_WATERFALL_IMAGEPATH}; + // const char *src[] = {THEMESTYLE_LIST_IMAGEPATH,THEMESTYLE_ARCLIST_IMAGEPATH, THEMESTYLE_HEXAGONS_IMAGEPATH,THEMESTYLE_CIRCLELIST_IMAGEPATH,THEMESTYLE_WATERFALL_IMAGEPATH}; + const char *src[] = {THEMESTYLE_LIST_IMAGEPATH,THEMESTYLE_ARCLIST_IMAGEPATH, THEMESTYLE_HEXAGONS_IMAGEPATH,THEMESTYLE_WATERFALL_IMAGEPATH}; for (int i = 0; i < sizeof(src) / sizeof(src[0]); i++) { imageconfig.y = y + 120 * i; -- 2.17.1