mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 17:21:11 +00:00
!29930 当indexer弹出框只有一个文本时不显示底板
Merge pull request !29930 from yangziyong/indexer
This commit is contained in:
commit
83290cf9d8
@ -849,7 +849,7 @@ void IndexerPattern::UpdateBubbleView()
|
||||
auto currentListData =
|
||||
popListData ? popListData(actualChildIndex >= 0 ? actualChildIndex : actualIndex) : std::vector<std::string>();
|
||||
UpdateBubbleListView(currentListData);
|
||||
UpdateBubbleLetterView(!currentListData.empty());
|
||||
UpdateBubbleLetterView(!currentListData.empty(), currentListData);
|
||||
auto columnRenderContext = popupNode_->GetRenderContext();
|
||||
CHECK_NULL_VOID(columnRenderContext);
|
||||
if (Container::GreatOrEqualAPITargetVersion(PlatformVersion::VERSION_TWELVE)) {
|
||||
@ -953,7 +953,7 @@ void IndexerPattern::UpdateBubbleSize()
|
||||
popupNode_->MarkDirtyNode();
|
||||
}
|
||||
|
||||
void IndexerPattern::UpdateBubbleLetterView(bool showDivider)
|
||||
void IndexerPattern::UpdateBubbleLetterView(bool showDivider, std::vector<std::string>& currentListData)
|
||||
{
|
||||
CHECK_NULL_VOID(popupNode_);
|
||||
auto host = GetHost();
|
||||
@ -981,8 +981,8 @@ void IndexerPattern::UpdateBubbleLetterView(bool showDivider)
|
||||
? paintProperty->GetPopupItemBorderRadiusValue()
|
||||
: Dimension(BUBBLE_ITEM_RADIUS, DimensionUnit::VP);
|
||||
letterContext->UpdateBorderRadius({ radius, radius, radius, radius });
|
||||
letterNodeRenderContext->UpdateBackgroundColor(
|
||||
paintProperty->GetPopupTitleBackground().value_or(indexerTheme->GetPopupTitleBackground()));
|
||||
letterNodeRenderContext->UpdateBackgroundColor(paintProperty->GetPopupTitleBackground().value_or(
|
||||
currentListData.size() > 0 ? indexerTheme->GetPopupTitleBackground() : Color(POPUP_TITLE_BG_COLOR_SINGLE)));
|
||||
} else {
|
||||
auto bubbleSize = Dimension(BUBBLE_BOX_SIZE, DimensionUnit::VP).ConvertToPx();
|
||||
letterLayoutProperty->UpdateUserDefinedIdealSize(CalcSize(CalcLength(bubbleSize), CalcLength(bubbleSize)));
|
||||
|
@ -142,7 +142,7 @@ private:
|
||||
RefPtr<FrameNode> CreatePopupNode();
|
||||
void UpdateBubbleView();
|
||||
void UpdateBubbleSize();
|
||||
void UpdateBubbleLetterView(bool showDivider);
|
||||
void UpdateBubbleLetterView(bool showDivider, std::vector<std::string>& currentListData);
|
||||
void CreateBubbleListView(std::vector<std::string>& currentListData);
|
||||
void UpdateBubbleListView(std::vector<std::string>& currentListData);
|
||||
void UpdatePopupOpacity(float ratio);
|
||||
|
@ -97,6 +97,7 @@ inline constexpr float BUBBLE_COLLAPSE_LIST_MAX_SIZE = 178.0f;
|
||||
inline constexpr double GRADIENT_COVER_HEIGHT = 16.0;
|
||||
inline constexpr uint32_t INDEXER_BUBBLE_MAXSIZE_COLLAPSED_API_TWELVE = 3; // 2 items + 1 letter
|
||||
inline constexpr float INDEXER_PADDING_TOP_API_TWELVE = 4.0f;
|
||||
inline constexpr uint32_t POPUP_TITLE_BG_COLOR_SINGLE = 0x00ffffff;
|
||||
|
||||
enum class AlignStyle {
|
||||
LEFT = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user