From 4112519eb394ce55dfef2a627e089c6e2b018987 Mon Sep 17 00:00:00 2001 From: wjyrich Date: Tue, 17 Mar 2026 15:05:21 +0800 Subject: [PATCH] fix: change notification title elide mode to right MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed the elide property of the notification title text from ElideMiddle to ElideRight. This modification ensures that when notification titles are too long to fit within the available space, the text will be truncated from the end (right side) rather than the middle. This provides better readability and user experience as users typically expect to see the beginning of titles which often contain the most important information. Log: Notification titles now truncate from the end instead of the middle for better readability Influence: 1. Test notifications with long titles to verify truncation occurs at the end 2. Verify that short titles display completely without truncation 3. Check that the layout remains stable with various title lengths 4. Test with different system font sizes to ensure proper text rendering 5. Verify that mouse hover tooltips (if present) still show full titles fix: 修改通知标题省略模式为右侧省略 将通知标题文本的省略属性从 ElideMiddle 更改为 ElideRight。此修改确保当 通知标题过长无法在可用空间内显示时,文本将从末尾(右侧)截断,而不是从中 间截断。这提供了更好的可读性和用户体验,因为用户通常期望看到标题的开头部 分,这部分通常包含最重要的信息。 Log: 通知标题现在从末尾截断而不是从中间截断,以提高可读性 Influence: 1. 测试带有长标题的通知,验证截断发生在末尾 2. 验证短标题能够完整显示而不被截断 3. 检查不同标题长度下布局是否保持稳定 4. 使用不同的系统字体大小测试,确保文本渲染正确 5. 验证鼠标悬停提示(如果存在)仍能显示完整标题 PMS: BUG-353223 --- panels/notification/plugin/NotifyItemContent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panels/notification/plugin/NotifyItemContent.qml b/panels/notification/plugin/NotifyItemContent.qml index 1e20e0742..743da1741 100644 --- a/panels/notification/plugin/NotifyItemContent.qml +++ b/panels/notification/plugin/NotifyItemContent.qml @@ -266,7 +266,7 @@ NotifyItem { color: palette.windowText renderType: Text.QtRendering wrapMode: Text.NoWrap - elide: Text.ElideMiddle + elide: Text.ElideRight Layout.fillWidth: true Layout.alignment: Qt.AlignLeft | Qt.AlignTop }