From c38f7949e7c9f503eb140190b258821fd92112b5 Mon Sep 17 00:00:00 2001 From: wjnRance Date: Thu, 29 May 2025 20:08:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=9E=82=E7=9B=B4=E5=AF=B9?= =?UTF-8?q?=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wjnRance --- arkui/ace_engine/native/native_node.h | 16 ++++++++++++++++ arkui/ace_engine/native/native_type.h | 22 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 3c85e8617..83f78efb5 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2444,6 +2444,22 @@ typedef enum { */ NODE_TEXT_RADIAL_GRADIENT = 1034, + /** + * @brief Sets the vertical alignment of the text content. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: vertical alignment of the text content, specified using the {@link ArkUI_TextVerticalAlignment} + * enum. The default value is ARKUI_TEXT_VERTICAL_ALIGNMENT_BASELINE. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: vertical alignment of the text content, specified using the {@link ArkUI_TextVerticalAlignment} + * enum. \n + * + * @since 20 + */ + NODE_TEXT_VERTICAL_ALIGN = 1035, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 828ba5b7d..b94eb2080 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -389,6 +389,22 @@ typedef enum { ARKUI_TEXT_ALIGNMENT_JUSTIFY, } ArkUI_TextAlignment; +/** + * @brief Enumerates text vertical alignment styles. + * + * @since 20 + */ +typedef enum { + /** Aligned to the baseline. */ + ARKUI_TEXT_VERTICAL_ALIGNMENT_BASELINE = 0, + /** Bottom aligned. */ + ARKUI_TEXT_VERTICAL_ALIGNMENT_BOTTOM, + /** Center aligned. */ + ARKUI_TEXT_VERTICAL_ALIGNMENT_CENTER, + /** Top aligned. */ + ARKUI_TEXT_VERTICAL_ALIGNMENT_TOP, +} ArkUI_TextVerticalAlignment; + /** * @brief Enumerates the types of the Enter key for a single-line text box. * @@ -1273,6 +1289,12 @@ typedef enum { ARKUI_IMAGE_SPAN_ALIGNMENT_CENTER, /** The image is top aligned with the text. */ ARKUI_IMAGE_SPAN_ALIGNMENT_TOP, + /** + * The image alignment mode follows the text component's alignment mode. + * + * @since 20 + */ + ARKUI_IMAGE_SPAN_ALIGNMENT_FOLLOW_PARAGRAPH, } ArkUI_ImageSpanAlignment; /** -- Gitee