Skip to content

Commit ab53ff6

Browse files
committed
refactor: Update chat label long mode for Electron and Otto emoji displays
- Changed chat label text mode from wrap to circular scrolling for both Electron and Otto emoji displays. - Improved consistency in chat label setup across both implementations.
1 parent 444ce5c commit ab53ff6

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

main/boards/electron-bot/electron_emoji_display.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ void ElectronEmojiDisplay::SetupChatLabel() {
8989
chat_message_label_ = lv_label_create(container_);
9090
lv_label_set_text(chat_message_label_, "");
9191
lv_obj_set_width(chat_message_label_, width_ * 0.9); // 限制宽度为屏幕宽度的 90%
92-
<<<<<<< HEAD
93-
lv_label_set_long_mode(chat_message_label_, LV_LABEL_LONG_WRAP); // 设置为自动换行模式
94-
=======
9592
lv_label_set_long_mode(chat_message_label_, LV_LABEL_LONG_SCROLL_CIRCULAR); // 设置为自动换行模式
96-
>>>>>>> dev
9793
lv_obj_set_style_text_align(chat_message_label_, LV_TEXT_ALIGN_CENTER, 0); // 设置文本居中对齐
9894
lv_obj_set_style_text_color(chat_message_label_, lv_color_white(), 0);
9995
SetTheme(LvglThemeManager::GetInstance().GetTheme("dark"));

main/boards/otto-robot/otto_emoji_display.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,7 @@ void OttoEmojiDisplay::SetupChatLabel() {
8888
chat_message_label_ = lv_label_create(container_);
8989
lv_label_set_text(chat_message_label_, "");
9090
lv_obj_set_width(chat_message_label_, width_ * 0.9); // 限制宽度为屏幕宽度的 90%
91-
<<<<<<< HEAD
92-
lv_label_set_long_mode(chat_message_label_, LV_LABEL_LONG_WRAP); // 设置为自动换行模式
93-
=======
9491
lv_label_set_long_mode(chat_message_label_, LV_LABEL_LONG_SCROLL_CIRCULAR);
95-
>>>>>>> dev
9692
lv_obj_set_style_text_align(chat_message_label_, LV_TEXT_ALIGN_CENTER, 0); // 设置文本居中对齐
9793
lv_obj_set_style_text_color(chat_message_label_, lv_color_white(), 0);
9894
SetTheme(LvglThemeManager::GetInstance().GetTheme("dark"));

0 commit comments

Comments
 (0)