From: luozheng <1732036298@qq.com> Date: Fri, 14 Jun 2024 11:46:48 +0000 (+0800) Subject: applist与主题样式修改 X-Git-Tag: release_V1.2.70_20241020_135402~1000 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F289%2F1;p=mirrors%2FFD230.git applist与主题样式修改 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp index dfcff847a..25105cb27 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp @@ -20,6 +20,7 @@ #include "ApplistModel.h" #include "ApplistPresenter.h" #include "SetDesktopModel.h" +#include "themestyle/include/ThemeStyleModel.h" namespace OHOS { @@ -195,6 +196,6 @@ namespace OHOS bool ApplistModel::GetIsUseListStyle(void) { - return (SetDesktopModel::GetInstance().GetDesktopStyle() == APPLIST_STYLE); + return (ThemeStyleModel::GetInstance().GetAppListDisplayStyle() == APPLIST_STYLE); } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStylePresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStylePresenter.cpp index 956a9a7ee..3771bf5ea 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStylePresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStylePresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-04-08 16:43:48 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-06-14 19:14:53 + * @LastEditTime: 2024-06-14 19:39:03 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/set_desktop/src/ThemeStylePresenter.cpp */ @@ -65,26 +65,28 @@ namespace OHOS NativeAbility::GetInstance().Back(TransitionType::TRANSITION_BACK_TO_HEXAGONS); return true; } - /* -------------------------------------------------------------------------- */ - if (viewId == THEME_STYLE_LIST) - { - ThemeStyleModel::GetInstance().SetAppListDisplayStyle(ThemeStyle::APPLIST_STYLE); - } - else if (viewId == THEME_STYLE_HEXAGONS) - { - ThemeStyleModel::GetInstance().SetAppListDisplayStyle(ThemeStyle::HEXAGONS_STYLE); - } - LabelButtonExt->SetImageSrc(PNG_CHECKBOX_ON_IMAGE, PNG_CHECKBOX_ON_IMAGE); - LabelButtonExt->Invalidate(); - uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId(); - if (preSlice == VIEW_APPLIST) - { - NativeAbility::GetInstance().Back(TransitionType::TRANSITION_BACK_TO_HEXAGONS); - } else { - NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST); - NativeAbility::GetInstance().ClearSliceIdStack(); + if (viewId == THEME_STYLE_LIST) + { + ThemeStyleModel::GetInstance().SetAppListDisplayStyle(ThemeStyle::APPLIST_STYLE); + } + else if (viewId == THEME_STYLE_HEXAGONS) + { + ThemeStyleModel::GetInstance().SetAppListDisplayStyle(ThemeStyle::HEXAGONS_STYLE); + } + // LabelButtonExt->SetImageSrc(PNG_CHECKBOX_ON_IMAGE, PNG_CHECKBOX_ON_IMAGE); + // LabelButtonExt->Invalidate(); + uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId(); + if (preSlice == VIEW_APPLIST) + { + NativeAbility::GetInstance().Back(TransitionType::TRANSITION_BACK_TO_HEXAGONS); + } + else + { + NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST); + NativeAbility::GetInstance().ClearSliceIdStack(); + } } return true;