Home
last modified time | relevance | path

Searched refs:maxFontSize (Results 1 - 25 of 40) sorted by relevance

12

/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/
H A Dtext_adapt_font_sizer.cpp22 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 Dtext_layout_algorithm.cpp389 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 Dtext_adapt_font_sizer.h48 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 Deditabletitlebar.js423 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 Dbutton_request_data.h41 std::optional<Dimension> maxFontSize; member
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/
H A Djs_tab_content.cpp305 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 Djs_text.cpp565 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 Djs_search.cpp148 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 Djs_button.cpp333 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 Djs_textfield.cpp1708 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 Dtext_field_layout_algorithm.cpp1044 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 Dgauge_layout_algorithm.cpp322 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 Drosen_render_text.cpp294 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 Dtext_style.cpp53 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 Dtabs_sub_tab_bar_style_test_ng.cpp646 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 Dtabs_attr_test_ng.cpp522 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 Dselecttitlebar.js1324 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 Dcomposetitlebar.js1161 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 Dinterstitialdialogaction.js182 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 Dinterstitialdialogaction.js182 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 Dui_font_vector.cpp963 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 Dtab_content_model.h102 std::optional<Dimension> maxFontSize; member
H A Dtab_content_node.cpp144 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 Dtabtitlebar.js1305 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 Dbutton_test_ng.cpp115 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()

Completed in 41 milliseconds

12