Files
OpenMQTTGateway/lib/sqlUI/components/ui_comp_hkbuttoncontainer.c
NorthernMan54 ae98db35fb Booted
2024-12-03 22:34:23 -05:00

101 lines
5.7 KiB
C

// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.4.2
// LVGL version: 9.1.0
// Project name: JC3248W535CIY
#include "../ui.h"
// COMPONENT hkButtonContainer
lv_obj_t *ui_hkButtonContainer_create(lv_obj_t *comp_parent) {
lv_obj_t *cui_hkButtonContainer;
cui_hkButtonContainer = lv_obj_create(comp_parent);
lv_obj_remove_style_all(cui_hkButtonContainer);
lv_obj_set_width( cui_hkButtonContainer, 130);
lv_obj_set_height( cui_hkButtonContainer, 100);
lv_obj_set_align( cui_hkButtonContainer, LV_ALIGN_CENTER );
lv_obj_set_flex_flow(cui_hkButtonContainer,LV_FLEX_FLOW_ROW);
lv_obj_set_flex_align(cui_hkButtonContainer, LV_FLEX_ALIGN_SPACE_BETWEEN, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_SPACE_BETWEEN);
lv_obj_remove_flag( cui_hkButtonContainer, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE ); /// Flags
lv_obj_set_style_radius(cui_hkButtonContainer, 10, LV_PART_MAIN| LV_STATE_DEFAULT);
ui_object_set_themeable_style_property(cui_hkButtonContainer, LV_PART_MAIN| LV_STATE_DEFAULT, LV_STYLE_BG_COLOR, _ui_theme_color_HK_Orange);
ui_object_set_themeable_style_property(cui_hkButtonContainer, LV_PART_MAIN| LV_STATE_DEFAULT, LV_STYLE_BG_OPA, _ui_theme_alpha_HK_Orange);
ui_object_set_themeable_style_property(cui_hkButtonContainer, LV_PART_MAIN| LV_STATE_DEFAULT, LV_STYLE_BORDER_COLOR, _ui_theme_color_HK_Orange);
ui_object_set_themeable_style_property(cui_hkButtonContainer, LV_PART_MAIN| LV_STATE_DEFAULT, LV_STYLE_BORDER_OPA, _ui_theme_alpha_HK_Orange);
lv_obj_set_style_text_color(cui_hkButtonContainer, lv_color_hex(0x060000), LV_PART_MAIN | LV_STATE_DEFAULT );
lv_obj_set_style_text_opa(cui_hkButtonContainer, 255, LV_PART_MAIN| LV_STATE_DEFAULT);
lv_obj_set_style_text_font(cui_hkButtonContainer, &lv_font_montserrat_16, LV_PART_MAIN| LV_STATE_DEFAULT);
lv_obj_set_style_radius(cui_hkButtonContainer, 10, LV_PART_MAIN| LV_STATE_CHECKED);
lv_obj_set_style_bg_color(cui_hkButtonContainer, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_CHECKED );
lv_obj_set_style_bg_opa(cui_hkButtonContainer, 255, LV_PART_MAIN| LV_STATE_CHECKED);
lv_obj_set_style_border_width(cui_hkButtonContainer, 0, LV_PART_MAIN| LV_STATE_CHECKED);
ui_object_set_themeable_style_property(cui_hkButtonContainer, LV_PART_MAIN| LV_STATE_CHECKED, LV_STYLE_TEXT_COLOR, _ui_theme_color_HK_Orange);
ui_object_set_themeable_style_property(cui_hkButtonContainer, LV_PART_MAIN| LV_STATE_CHECKED, LV_STYLE_TEXT_OPA, _ui_theme_alpha_HK_Orange);
lv_obj_set_style_text_font(cui_hkButtonContainer, &lv_font_montserrat_16, LV_PART_MAIN| LV_STATE_CHECKED);
lv_obj_t *cui_Container3;
cui_Container3 = lv_obj_create(cui_hkButtonContainer);
lv_obj_remove_style_all(cui_Container3);
lv_obj_set_width( cui_Container3, lv_pct(5));
lv_obj_set_height( cui_Container3, lv_pct(100));
lv_obj_set_align( cui_Container3, LV_ALIGN_CENTER );
lv_obj_remove_flag( cui_Container3, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE ); /// Flags
lv_obj_t *cui_hkIcon;
cui_hkIcon = lv_image_create(cui_hkButtonContainer);
lv_image_set_src(cui_hkIcon, &ui_img_lightoff_png);
lv_obj_set_width( cui_hkIcon, lv_pct(20));
lv_obj_set_height( cui_hkIcon, lv_pct(100));
lv_obj_set_align( cui_hkIcon, LV_ALIGN_CENTER );
lv_obj_add_flag( cui_hkIcon, LV_OBJ_FLAG_CLICKABLE ); /// Flags
lv_obj_remove_flag( cui_hkIcon, LV_OBJ_FLAG_SCROLLABLE ); /// Flags
lv_obj_t *cui_Container4;
cui_Container4 = lv_obj_create(cui_hkButtonContainer);
lv_obj_remove_style_all(cui_Container4);
lv_obj_set_width( cui_Container4, lv_pct(5));
lv_obj_set_height( cui_Container4, lv_pct(100));
lv_obj_set_align( cui_Container4, LV_ALIGN_CENTER );
lv_obj_remove_flag( cui_Container4, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE ); /// Flags
lv_obj_t *cui_hkLabelContainer;
cui_hkLabelContainer = lv_obj_create(cui_hkButtonContainer);
lv_obj_remove_style_all(cui_hkLabelContainer);
lv_obj_set_width( cui_hkLabelContainer, lv_pct(70));
lv_obj_set_height( cui_hkLabelContainer, lv_pct(100));
lv_obj_set_align( cui_hkLabelContainer, LV_ALIGN_LEFT_MID );
lv_obj_set_flex_flow(cui_hkLabelContainer,LV_FLEX_FLOW_COLUMN);
lv_obj_set_flex_align(cui_hkLabelContainer, LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START);
lv_obj_remove_flag( cui_hkLabelContainer, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE ); /// Flags
lv_obj_t *cui_hkDisplayName;
cui_hkDisplayName = lv_label_create(cui_hkLabelContainer);
lv_obj_set_width( cui_hkDisplayName, lv_pct(100));
lv_obj_set_height( cui_hkDisplayName, LV_SIZE_CONTENT); /// 1
lv_obj_set_align( cui_hkDisplayName, LV_ALIGN_CENTER );
lv_label_set_text(cui_hkDisplayName,"Display Name");
lv_obj_t *cui_hkStatus;
cui_hkStatus = lv_label_create(cui_hkLabelContainer);
lv_obj_set_width( cui_hkStatus, lv_pct(100));
lv_obj_set_height( cui_hkStatus, LV_SIZE_CONTENT); /// 1
lv_obj_set_align( cui_hkStatus, LV_ALIGN_CENTER );
lv_label_set_text(cui_hkStatus,"Status");
lv_obj_t ** children = lv_malloc(sizeof(lv_obj_t *) * _UI_COMP_HKBUTTONCONTAINER_NUM);
children[UI_COMP_HKBUTTONCONTAINER_HKBUTTONCONTAINER] = cui_hkButtonContainer;
children[UI_COMP_HKBUTTONCONTAINER_CONTAINER3] = cui_Container3;
children[UI_COMP_HKBUTTONCONTAINER_HKICON] = cui_hkIcon;
children[UI_COMP_HKBUTTONCONTAINER_CONTAINER4] = cui_Container4;
children[UI_COMP_HKBUTTONCONTAINER_HKLABELCONTAINER] = cui_hkLabelContainer;
children[UI_COMP_HKBUTTONCONTAINER_HKLABELCONTAINER_HKDISPLAYNAME] = cui_hkDisplayName;
children[UI_COMP_HKBUTTONCONTAINER_HKLABELCONTAINER_HKSTATUS] = cui_hkStatus;
lv_obj_add_event_cb(cui_hkButtonContainer, get_component_child_event_cb, LV_EVENT_GET_COMP_CHILD, children);
lv_obj_add_event_cb(cui_hkButtonContainer, del_component_child_event_cb, LV_EVENT_DELETE, children);
ui_comp_hkButtonContainer_create_hook(cui_hkButtonContainer);
return cui_hkButtonContainer;
}