mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
delete navigation.more
Signed-off-by: yuzhicheng <yuzhicheng4@huawei.com> Change-Id: I837e19e3546bbcda20407873f2bb66adf1fad8de
This commit is contained in:
parent
bcec66de0f
commit
9a350681ea
@ -84,6 +84,7 @@ static const std::set<std::string> stringAttrs = {
|
||||
"dialog_icon_primary",
|
||||
"dialog_font_primary",
|
||||
"menu_has_filter",
|
||||
"navigation_general_more",
|
||||
"calendar_picker_dialog_button_transparent",
|
||||
"calendar_picker_dialog_divider_transparent",
|
||||
"textfield_accessibility_property_clear",
|
||||
|
@ -84,6 +84,7 @@ public:
|
||||
theme->navBarUnfocusColor_ = pattern->GetAttr<Color>("color_panel_bg", Color::TRANSPARENT);
|
||||
theme->titlebarBackgroundBlurStyle_ = pattern->GetAttr<int>("titlebar_background_blur_style", 0);
|
||||
theme->toolbarBackgroundBlurStyle_ = pattern->GetAttr<int>("toolbar_background_blur_style", 0);
|
||||
theme->moreMessage_ = pattern->GetAttr<std::string>("navigation_general_more", "null");
|
||||
}
|
||||
ParsePattern(themeConstants, theme);
|
||||
return theme;
|
||||
@ -585,6 +586,10 @@ public:
|
||||
{
|
||||
return dividerGradientDarkBlue_;
|
||||
}
|
||||
const std::string& GetMoreMessage() const
|
||||
{
|
||||
return moreMessage_;
|
||||
}
|
||||
protected:
|
||||
NavigationBarTheme() = default;
|
||||
|
||||
@ -647,6 +652,7 @@ private:
|
||||
Dimension toolbarItemBottomPadding_ = 4.0_vp;
|
||||
Dimension toolbarItemMargin_ = 4.0_vp;
|
||||
Dimension toolbarItemSpecialMargin_ = 0.0_vp;
|
||||
std::string moreMessage_ = "";
|
||||
uint32_t toolbarLimitGridCount_ = 8;
|
||||
uint32_t dividerShadowEnable_ = 0;
|
||||
Color navigationDividerColor_;
|
||||
|
@ -195,7 +195,7 @@ RefPtr<FrameNode> CreateMenuItems(const int32_t menuNodeId, const std::vector<NG
|
||||
NavigationTitleUtil::InitTitleBarButtonEvent(menuItemNode, iconNode, true);
|
||||
|
||||
// read navigation "more" button
|
||||
std::string message = Localization::GetInstance()->GetEntryLetters("navigation.more");
|
||||
std::string message = theme->GetMoreMessage();
|
||||
NavigationTitleUtil::SetAccessibility(menuItemNode, message);
|
||||
|
||||
// set navigation titleBar "more" button inspectorId
|
||||
|
@ -65,7 +65,7 @@ bool NavigationTitleUtil::BuildMoreButton(bool isButtonEnabled, const RefPtr<Nav
|
||||
InitTitleBarButtonEvent(menuItemNode, iconNode, true);
|
||||
|
||||
// read navdestination "more" button
|
||||
std::string message = Localization::GetInstance()->GetEntryLetters("navigation.more");
|
||||
std::string message = theme ? theme->GetMoreMessage() : "";
|
||||
SetAccessibility(menuItemNode, message);
|
||||
|
||||
// set navdestination titleBar "more" button inspectorId
|
||||
@ -338,7 +338,9 @@ void NavigationTitleUtil::InitTitleBarButtonEvent(const RefPtr<FrameNode>& butto
|
||||
auto targetNode = weakTargetNode.Upgrade();
|
||||
CHECK_NULL_VOID(targetNode);
|
||||
auto popupParam = AceType::MakeRefPtr<PopupParam>();
|
||||
popupParam->SetMessage(Localization::GetInstance()->GetEntryLetters("common.more"));
|
||||
auto theme = NavigationGetTheme();
|
||||
CHECK_NULL_VOID(theme);
|
||||
popupParam->SetMessage(theme->GetMoreMessage());
|
||||
popupParam->SetIsShow(isHover);
|
||||
popupParam->SetBlockEvent(false);
|
||||
ViewAbstract::BindPopup(popupParam, targetNode, nullptr);
|
||||
@ -557,7 +559,7 @@ RefPtr<FrameNode> NavigationTitleUtil::CreatePopupDialogNode(
|
||||
if (barItemNode->IsMoreItemNode()) {
|
||||
auto theme = NavigationGetTheme();
|
||||
CHECK_NULL_RETURN(theme, nullptr);
|
||||
message = Localization::GetInstance()->GetEntryLetters("common.more");
|
||||
message = theme->GetMoreMessage();
|
||||
if (message.empty()) {
|
||||
message = accessibilityProperty->GetAccessibilityText();
|
||||
}
|
||||
|
@ -342,7 +342,9 @@ void BuildToolbarMoreItemNode(const RefPtr<BarItemNode>& barItemNode, bool enabl
|
||||
} else {
|
||||
BuildImageToolbarMoreItemNode(barItemNode, enabled);
|
||||
}
|
||||
auto textNode = CreateToolbarItemTextNode(Localization::GetInstance()->GetEntryLetters("common.more"));
|
||||
auto theme = NavigationGetTheme();
|
||||
CHECK_NULL_VOID(theme);
|
||||
auto textNode = CreateToolbarItemTextNode(theme->GetMoreMessage());
|
||||
CHECK_NULL_VOID(textNode);
|
||||
barItemNode->SetTextNode(textNode);
|
||||
barItemNode->SetBarItemUsedInToolbarConfiguration(true);
|
||||
|
@ -163,7 +163,7 @@ void NavToolbarPattern::ShowDialogWithNode(const RefPtr<BarItemNode>& barItemNod
|
||||
if (barItemNode->IsMoreItemNode()) {
|
||||
auto theme = NavigationGetTheme();
|
||||
CHECK_NULL_VOID(theme);
|
||||
message = Localization::GetInstance()->GetEntryLetters("common.more");
|
||||
message = theme->GetMoreMessage();
|
||||
if (AceApplicationInfo::GetInstance().GreatOrEqualTargetAPIVersion(PlatformVersion::VERSION_TWELVE)) {
|
||||
auto symbolNode = AceType::DynamicCast<FrameNode>(barItemNode->GetFirstChild());
|
||||
CHECK_NULL_VOID(symbolNode);
|
||||
|
Loading…
Reference in New Issue
Block a user