| 38 | } |
| 39 | |
| 40 | void ChatView::createInputBar(lv_obj_t* parent) { |
| 41 | inputWrapper = lv_obj_create(parent); |
| 42 | auto* wrapper = inputWrapper; |
| 43 | lv_obj_set_flex_flow(wrapper, LV_FLEX_FLOW_ROW); |
| 44 | lv_obj_set_size(wrapper, LV_PCT(100), LV_SIZE_CONTENT); |
| 45 | lv_obj_set_style_pad_all(wrapper, 0, 0); |
| 46 | lv_obj_set_style_pad_column(wrapper, 4, 0); |
| 47 | lv_obj_set_style_border_opa(wrapper, 0, LV_STATE_DEFAULT); |
| 48 | |
| 49 | inputField = lv_textarea_create(wrapper); |
| 50 | lv_obj_set_flex_grow(inputField, 1); |
| 51 | lv_textarea_set_placeholder_text(inputField, "Type a message..."); |
| 52 | lv_textarea_set_one_line(inputField, true); |
| 53 | lv_textarea_set_max_length(inputField, MAX_MESSAGE_LEN); |
| 54 | |
| 55 | auto* sendBtn = lv_button_create(wrapper); |
| 56 | lv_obj_set_style_margin_all(sendBtn, 0, LV_STATE_DEFAULT); |
| 57 | lv_obj_set_style_margin_top(sendBtn, 2, LV_STATE_DEFAULT); |
| 58 | lv_obj_add_event_cb(sendBtn, onSendClicked, LV_EVENT_CLICKED, this); |
| 59 | |
| 60 | auto* btnLabel = lv_label_create(sendBtn); |
| 61 | lv_label_set_text(btnLabel, "Send"); |
| 62 | lv_obj_center(btnLabel); |
| 63 | } |
| 64 | |
| 65 | void ChatView::createSettingsPanel(lv_obj_t* parent) { |
| 66 | settingsPanel = lv_obj_create(parent); |
nothing calls this directly
no outgoing calls
no test coverage detected