/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/ |
H A D | text_adapt_font_sizer.cpp | 22 double maxFontSize = 0.0; in AdaptMaxFontSize() local 24 GetAdaptMaxMinFontSize(textStyle, maxFontSize, minFontSize, contentConstraint); in AdaptMaxFontSize() 25 if (LessNotEqual(maxFontSize, minFontSize) || LessOrEqual(minFontSize, 0.0)) { in AdaptMaxFontSize() 26 // minFontSize or maxFontSize is invalid in AdaptMaxFontSize() 42 auto tag = static_cast<int32_t>((maxFontSize - minFontSize) / stepSize); in AdaptMaxFontSize() 43 auto length = tag + 1 + (GreatNotEqual(maxFontSize, minFontSize + stepSize * tag) ? 1 : 0); in AdaptMaxFontSize() 49 fontSize = static_cast<float>((mid == length - 1) ? (maxFontSize) : (minFontSize + stepSize * mid)); in AdaptMaxFontSize() 60 fontSize = static_cast<float>((left - 1 == length - 1) ? (maxFontSize) : (minFontSize + stepSize * (left - 1))); in AdaptMaxFontSize() 62 fontSize = GreatNotEqual(fontSize, maxFontSize) ? maxFontSize in AdaptMaxFontSize() 70 double maxFontSize = 0.0; AdaptMinFontSize() local 93 GetAdaptMaxMinFontSize(const TextStyle& textStyle, double& maxFontSize, double& minFontSize, const LayoutConstraintF& contentConstraint) GetAdaptMaxMinFontSize() argument 138 IsNeedAdaptFontSize(const double& maxFontSize, const double& minFontSize) IsNeedAdaptFontSize() argument 148 double maxFontSize = 0.0; IsNeedAdaptFontSize() local [all...] |
H A D | text_layout_algorithm.cpp | 389 double maxFontSize = 0.0; in AdaptMinTextSize() local 393 GetAdaptMaxMinFontSize(textStyle, maxFontSize, minFontSize, contentConstraint); in AdaptMinTextSize() 394 if (!IsNeedAdaptFontSize(maxFontSize, minFontSize)) { in AdaptMinTextSize() 415 * brief: Find the optimal font size within the range [minFontSize, maxFontSize]. 423 double maxFontSize = 0.0; in GetSuitableSize() local 425 GetAdaptMaxMinFontSize(textStyle, maxFontSize, minFontSize, contentConstraint); in GetSuitableSize() 436 int32_t stepCount = (maxFontSize - minFontSize) / stepSize; in GetSuitableSize() 449 double maxFontSize = 0.0; in GetSuitableSizeLD() local 451 GetAdaptMaxMinFontSize(textStyle, maxFontSize, minFontSize, contentConstraint); in GetSuitableSizeLD() 457 double suitableSize = maxFontSize; in GetSuitableSizeLD() 474 double maxFontSize = 0.0; GetSuitableSizeBS() local [all...] |
H A D | text_adapt_font_sizer.h | 48 static bool IsNeedAdaptFontSize(const double& maxFontSize, const double& minFontSize); 50 static void GetAdaptMaxMinFontSize(const TextStyle& textStyle, double& maxFontSize, double& minFontSize,
|
/foundation/arkui/ace_engine/advanced_ui_component/editabletitlebar/interfaces/ |
H A D | editabletitlebar.js | 423 Text.maxFontSize(TITLE_F_VP); 451 Text.maxFontSize(SUBTITLE_F_VP); 700 this.maxFontSize = 3.2; 758 if (c4.maxFontSize !== undefined) { 759 this.maxFontSize = c4.maxFontSize; 1142 this.maxFontSize = 3.2; 1177 if (n1.maxFontSize !== undefined) { 1178 this.maxFontSize = n1.maxFontSize; [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/button/ |
H A D | button_request_data.h | 41 std::optional<Dimension> maxFontSize; member
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/ |
H A D | js_tab_content.cpp | 305 JSRef<JSVal> maxFontSizeValue = obj->GetProperty("maxFontSize"); in SetLabelStyle() 306 CalcDimension maxFontSize; in SetLabelStyle() local 307 if (ParseJsDimensionFp(maxFontSizeValue, maxFontSize) && NonNegative(maxFontSize.Value()) && in SetLabelStyle() 308 maxFontSize.Unit() != DimensionUnit::PERCENT) { in SetLabelStyle() 309 labelStyle.maxFontSize = maxFontSize; in SetLabelStyle() 500 if (!labelStyle.maxFontSize.has_value()) { in CompleteParameters() 501 labelStyle.maxFontSize = 0.0_vp; in CompleteParameters()
|
H A D | js_text.cpp | 565 CalcDimension maxFontSize = theme->GetTextStyle().GetAdaptMaxFontSize(); in SetMaxFontSize() local 567 if (!ParseJsDimensionFpNG(args, maxFontSize, false)) { in SetMaxFontSize() 568 maxFontSize = theme->GetTextStyle().GetAdaptMaxFontSize(); in SetMaxFontSize() 569 TextModel::GetInstance()->SetAdaptMaxFontSize(maxFontSize); in SetMaxFontSize() 572 if (maxFontSize.IsNegative()) { in SetMaxFontSize() 573 maxFontSize = theme->GetTextStyle().GetAdaptMaxFontSize(); in SetMaxFontSize() 575 TextModel::GetInstance()->SetAdaptMaxFontSize(maxFontSize); in SetMaxFontSize() 1112 JSClass<JSText>::StaticMethod("maxFontSize", &JSText::SetMaxFontSize, opt); in JSBind()
|
H A D | js_search.cpp | 148 JSClass<JSSearch>::StaticMethod("maxFontSize", &JSSearch::SetMaxFontSize); in JSBindMore() 1244 CalcDimension maxFontSize = theme->GetTextStyle().GetAdaptMaxFontSize(); in SetMaxFontSize() local 1245 if (!ParseJsDimensionFpNG(info[0], maxFontSize, false)) { in SetMaxFontSize() 1246 maxFontSize = theme->GetTextStyle().GetAdaptMaxFontSize(); in SetMaxFontSize() 1247 SearchModel::GetInstance()->SetAdaptMaxFontSize(maxFontSize); in SetMaxFontSize() 1250 if (maxFontSize.IsNegative()) { in SetMaxFontSize() 1251 maxFontSize = theme->GetTextStyle().GetAdaptMaxFontSize(); in SetMaxFontSize() 1253 SearchModel::GetInstance()->SetAdaptMaxFontSize(maxFontSize); in SetMaxFontSize()
|
H A D | js_button.cpp | 333 JSRef<JSVal> maxFontSizeValue = obj->GetProperty("maxFontSize"); in SetLableStyle() 334 CalcDimension maxFontSize; in SetLableStyle() local 335 if (ParseJsDimensionFp(maxFontSizeValue, maxFontSize)) { in SetLableStyle() 336 buttonParameters.maxFontSize = maxFontSize; in SetLableStyle()
|
H A D | js_textfield.cpp | 1708 CalcDimension maxFontSize = theme->GetTextStyle().GetAdaptMaxFontSize(); in SetMaxFontSize() local 1709 if (!ParseJsDimensionFpNG(info[0], maxFontSize, false)) { in SetMaxFontSize() 1710 maxFontSize = theme->GetTextStyle().GetAdaptMaxFontSize(); in SetMaxFontSize() 1711 TextFieldModel::GetInstance()->SetAdaptMaxFontSize(maxFontSize); in SetMaxFontSize() 1714 if (maxFontSize.IsNegative()) { in SetMaxFontSize() 1715 maxFontSize = theme->GetTextStyle().GetAdaptMaxFontSize(); in SetMaxFontSize() 1717 TextFieldModel::GetInstance()->SetAdaptMaxFontSize(maxFontSize); in SetMaxFontSize()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text_field/ |
H A D | text_field_layout_algorithm.cpp | 1044 double maxFontSize = 0.0; in AdaptInlineFocusFontSize() local 1046 GetAdaptMaxMinFontSize(textStyle, maxFontSize, minFontSize, contentConstraint); in AdaptInlineFocusFontSize() 1047 if (LessNotEqual(maxFontSize, minFontSize) || LessOrEqual(minFontSize, 0.0)) { in AdaptInlineFocusFontSize() 1052 auto tag = static_cast<int32_t>((maxFontSize - minFontSize) / stepSize); in AdaptInlineFocusFontSize() 1053 auto length = tag + 1 + (GreatNotEqual(maxFontSize, minFontSize + stepSize * tag) ? 1 : 0); in AdaptInlineFocusFontSize() 1062 fontSize = static_cast<float>((mid == length - 1) ? (maxFontSize) : (minFontSize + stepSize * mid)); in AdaptInlineFocusFontSize() 1073 fontSize = static_cast<float>((left - 1 == length - 1) ? (maxFontSize) : (minFontSize + stepSize * (left - 1))); in AdaptInlineFocusFontSize() 1075 fontSize = GreatNotEqual(fontSize, maxFontSize) ? maxFontSize : fontSize; in AdaptInlineFocusFontSize() 1109 double maxFontSize in AdaptInlineFocusMinFontSize() local [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/gauge/ |
H A D | gauge_layout_algorithm.cpp | 322 Dimension maxFontSize; in MeasureFontSize() local 323 auto hasMaxFontSize = GetLimitFontSize(layoutWrapper, false, maxFontSize); in MeasureFontSize() 326 auto fontSize = minFontSize < maxFontSize ? minFontSize : maxFontSize; in MeasureFontSize()
|
/foundation/arkui/ace_engine/frameworks/core/components/text/ |
H A D | rosen_render_text.cpp | 294 double maxFontSize = NormalizeToPx(textStyle_.GetAdaptMaxFontSize()); in AdaptMinTextSize() local 296 if (LessNotEqual(maxFontSize, minFontSize) || LessOrEqual(textStyle_.GetAdaptMinFontSize().Value(), 0.0)) { in AdaptMinTextSize() 309 while (GreatOrEqual(maxFontSize, minFontSize)) { in AdaptMinTextSize() 310 textStyle_.SetFontSize(Dimension(maxFontSize)); in AdaptMinTextSize() 317 maxFontSize -= stepSize; in AdaptMinTextSize()
|
/foundation/arkui/ace_engine/frameworks/core/components/common/properties/ |
H A D | text_style.cpp | 53 const Dimension& maxFontSize, const Dimension& minFontSize, const Dimension& fontSizeStep) in SetAdaptTextSize() 55 adaptMaxFontSize_ = maxFontSize; in SetAdaptTextSize() 52 SetAdaptTextSize( const Dimension& maxFontSize, const Dimension& minFontSize, const Dimension& fontSizeStep) SetAdaptTextSize() argument
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/tabs/ |
H A D | tabs_sub_tab_bar_style_test_ng.cpp | 646 EXPECT_EQ(tabContentPattern->GetLabelStyle().maxFontSize, std::nullopt); in HWTEST_F() 688 EXPECT_EQ(tabContentPattern->GetLabelStyle().maxFontSize, std::nullopt); in HWTEST_F() 739 labelStyle.maxFontSize = 0.0_vp; in HWTEST_F() 752 EXPECT_EQ(tabContentPattern->GetLabelStyle().maxFontSize->ToString(), labelStyle.maxFontSize->ToString()); in HWTEST_F() 793 labelStyle.maxFontSize = 0.0_vp; in HWTEST_F() 806 EXPECT_EQ(tabContentPattern->GetLabelStyle().maxFontSize->ToString(), labelStyle.maxFontSize->ToString()); in HWTEST_F() 1003 labelStyle.maxFontSize = 0.0_vp; in HWTEST_F() 1025 EXPECT_EQ(layoutProperty->GetAdaptMaxFontSize(), labelStyle.maxFontSize); in HWTEST_F() [all...] |
H A D | tabs_attr_test_ng.cpp | 522 EXPECT_EQ(tabContentPattern->GetLabelStyle().maxFontSize, std::nullopt); in HWTEST_F() 547 labelStyle.maxFontSize = 0.0_vp; in HWTEST_F() 560 EXPECT_EQ(tabContentPattern->GetLabelStyle().maxFontSize->ToString(), labelStyle.maxFontSize->ToString()); in HWTEST_F() 618 labelStyle.maxFontSize = 0.0_vp; in HWTEST_F() 633 EXPECT_EQ(layoutProperty->GetAdaptMaxFontSize(), labelStyle.maxFontSize); in HWTEST_F()
|
/foundation/arkui/ace_engine/advanced_ui_component/selecttitlebar/interfaces/ |
H A D | selecttitlebar.js | 1324 this.maxFontSize = 3.2; 1359 if (params.maxFontSize !== undefined) { 1360 this.maxFontSize = params.maxFontSize; 1448 Column.width(this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG); 1450 minHeight: this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG 1540 Column.width(this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG); 1542 minHeight: this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG
|
/foundation/arkui/ace_engine/advanced_ui_component/composetitlebar/interfaces/ |
H A D | composetitlebar.js | 1161 this.maxFontSize = 3.2; 1195 if (h1.maxFontSize !== undefined) { 1196 this.maxFontSize = h1.maxFontSize; 1273 Column.width(this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG); 1274 Column.constraintSize({ minHeight: this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG }); 1336 Column.width(this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG); 1337 Column.constraintSize({ minHeight: this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG });
|
/foundation/arkui/ace_engine/advanced_ui_component/interstitialdialogaction/interfaces/ |
H A D | interstitialdialogaction.js | 182 Text.maxFontSize({ "id": -1, "type": 10002, params: ['sys.float.ohos_id_text_size_sub_title1'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 195 Text.maxFontSize({ "id": -1, "type": 10002, params: ['sys.float.ohos_id_text_size_caption'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
|
/foundation/arkui/advanced_ui_component/interstitialdialogaction/interfaces/ |
H A D | interstitialdialogaction.js | 182 Text.maxFontSize({ "id": -1, "type": 10002, params: ['sys.float.ohos_id_text_size_sub_title1'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" }); 195 Text.maxFontSize({ "id": -1, "type": 10002, params: ['sys.float.ohos_id_text_size_caption'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
|
/foundation/arkui/ui_lite/frameworks/font/ |
H A D | ui_font_vector.cpp | 963 uint8_t maxFontSize = fontSize; in GetOffsetPosY() local 985 isEmojiLarge = emojiMaxNode.rows > maxFontSize; in GetOffsetPosY() 989 if (emojiMaxNode.top >= maxFontSize) { in GetOffsetPosY() 990 offset = emojiMaxNode.top - maxFontSize; in GetOffsetPosY() 994 if (maxFontSize >= emojiMaxNode.rows) { in GetOffsetPosY() 995 offset = maxFontSize - emojiMaxNode.rows; in GetOffsetPosY()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/tabs/ |
H A D | tab_content_model.h | 102 std::optional<Dimension> maxFontSize; member
|
H A D | tab_content_node.cpp | 144 label->Put("maxFontSize", labelStyle.maxFontSize.value_or(Dimension(0)).ToString().c_str()); in ToJsonValue()
|
/foundation/arkui/ace_engine/advanced_ui_component/tabtitlebar/interfaces/ |
H A D | tabtitlebar.js | 1305 this.maxFontSize = 3.2; 1339 if (y.maxFontSize !== undefined) { 1340 this.maxFontSize = y.maxFontSize; 1414 Column.width(this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG); 1415 Column.constraintSize({ minHeight: this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG }); 1465 Column.width(this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG); 1466 Column.constraintSize({ minHeight: this.fontSize === this.maxFontSize ? MAX_DIALOG : MIN_DIALOG });
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/button/ |
H A D | button_test_ng.cpp | 115 std::optional<Dimension> maxFontSize = std::nullopt; member 382 if (lableStyleProperty.maxFontSize.has_value()) { in CreateLabelButtonParagraphForLableStyle() 383 buttonParameters.maxFontSize = lableStyleProperty.maxFontSize; in CreateLabelButtonParagraphForLableStyle() 1151 buttonParameters.maxFontSize = std::make_optional(BUTTON_FONT_SIZE_VALUE); in HWTEST_F() 1450 buttonParameters.maxFontSize = std::make_optional(BUTTON_FONT_SIZE_VALUE); in HWTEST_F()
|