/*
 * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
 *
 * SPDX-License-Identifier: Apache-2.0
 */
// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.0
// LVGL version: 9.1.0
// Project name: Smart_Gadget

#include "../ui.h"

void ui_screen_weather_screen_init(void)
{
    ui_screen_weather = lv_obj_create(NULL);
    lv_obj_remove_flag(ui_screen_weather, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_screen_weather, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_screen_weather, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_image_src(ui_screen_weather, &ui_img_pattern_png, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_image_tiled(ui_screen_weather, true, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_weather_small_label_pary_cloud = ui_label_small_label_create(ui_screen_weather);
    lv_obj_set_x(ui_weather_small_label_pary_cloud, 0);
    lv_obj_set_y(ui_weather_small_label_pary_cloud, -67);
    lv_obj_set_align(ui_weather_small_label_pary_cloud, LV_ALIGN_CENTER);
    lv_label_set_text(ui_weather_small_label_pary_cloud, "Partly cloudy");
    lv_obj_set_style_text_color(ui_weather_small_label_pary_cloud, lv_color_hex(0x000746), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_weather_small_label_pary_cloud, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_weather_small_label_new_york = ui_label_small_label_create(ui_screen_weather);
    lv_obj_set_x(ui_weather_small_label_new_york, 0);
    lv_obj_set_y(ui_weather_small_label_new_york, 37);
    lv_obj_set_align(ui_weather_small_label_new_york, LV_ALIGN_CENTER);
    lv_label_set_text(ui_weather_small_label_new_york, "New York");
    lv_obj_set_style_text_color(ui_weather_small_label_new_york, lv_color_hex(0x9C9CD9), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_weather_small_label_new_york, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_weather_image_cloud = lv_image_create(ui_screen_weather);
    lv_image_set_src(ui_weather_image_cloud, &ui_img_cloud_png);
    lv_obj_set_width(ui_weather_image_cloud, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_weather_image_cloud, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_weather_image_cloud, -2);
    lv_obj_set_y(ui_weather_image_cloud, 19);
    lv_obj_set_align(ui_weather_image_cloud, LV_ALIGN_TOP_MID);
    lv_obj_add_flag(ui_weather_image_cloud, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_remove_flag(ui_weather_image_cloud, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_image_recolor(ui_weather_image_cloud, lv_color_hex(0x293062), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_image_recolor_opa(ui_weather_image_cloud, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_weather_label_celsius = lv_label_create(ui_screen_weather);
    lv_obj_set_width(ui_weather_label_celsius, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_weather_label_celsius, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_weather_label_celsius, 0);
    lv_obj_set_y(ui_weather_label_celsius, 125);
    lv_obj_set_align(ui_weather_label_celsius, LV_ALIGN_TOP_MID);
    lv_label_set_text(ui_weather_label_celsius, "26°");
    lv_obj_set_style_text_color(ui_weather_label_celsius, lv_color_hex(0x293062), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_weather_label_celsius, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_weather_label_celsius, &ui_font_Number, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_weather_panel_weather_icons = lv_obj_create(ui_screen_weather);
    lv_obj_set_height(ui_weather_panel_weather_icons, 56);
    lv_obj_set_width(ui_weather_panel_weather_icons, lv_pct(100));
    lv_obj_set_x(ui_weather_panel_weather_icons, 0);
    lv_obj_set_y(ui_weather_panel_weather_icons, -33);
    lv_obj_set_align(ui_weather_panel_weather_icons, LV_ALIGN_BOTTOM_MID);
    lv_obj_remove_flag(ui_weather_panel_weather_icons, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_weather_panel_weather_icons, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_weather_panel_weather_icons, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_weather_image_w1 = lv_image_create(ui_weather_panel_weather_icons);
    lv_image_set_src(ui_weather_image_w1, &ui_img_weather_1_png);
    lv_obj_set_width(ui_weather_image_w1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_weather_image_w1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_weather_image_w1, 40);
    lv_obj_set_y(ui_weather_image_w1, 0);
    lv_obj_add_flag(ui_weather_image_w1, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_remove_flag(ui_weather_image_w1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_image_recolor(ui_weather_image_w1, lv_color_hex(0x293062), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_image_recolor_opa(ui_weather_image_w1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_weather_image_w2 = lv_image_create(ui_weather_panel_weather_icons);
    lv_image_set_src(ui_weather_image_w2, &ui_img_weather_2_png);
    lv_obj_set_width(ui_weather_image_w2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_weather_image_w2, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_align(ui_weather_image_w2, LV_ALIGN_TOP_MID);
    lv_obj_add_flag(ui_weather_image_w2, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_remove_flag(ui_weather_image_w2, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_image_recolor(ui_weather_image_w2, lv_color_hex(0x293062), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_image_recolor_opa(ui_weather_image_w2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_weather_image_w3 = lv_image_create(ui_weather_panel_weather_icons);
    lv_image_set_src(ui_weather_image_w3, &ui_img_weather_3_png);
    lv_obj_set_width(ui_weather_image_w3, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_weather_image_w3, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_weather_image_w3, -40);
    lv_obj_set_y(ui_weather_image_w3, 0);
    lv_obj_set_align(ui_weather_image_w3, LV_ALIGN_TOP_RIGHT);
    lv_obj_add_flag(ui_weather_image_w3, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_remove_flag(ui_weather_image_w3, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_image_recolor(ui_weather_image_w3, lv_color_hex(0x293062), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_image_recolor_opa(ui_weather_image_w3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_weather_small_label_w1_num = ui_label_small_label_create(ui_weather_panel_weather_icons);
    lv_obj_set_x(ui_weather_small_label_w1_num, 35);
    lv_obj_set_y(ui_weather_small_label_w1_num, 25);
    lv_obj_set_align(ui_weather_small_label_w1_num, LV_ALIGN_TOP_LEFT);
    lv_label_set_text(ui_weather_small_label_w1_num, "65°");

    ui_weather_small_label_w2_num = ui_label_small_label_create(ui_weather_panel_weather_icons);
    lv_obj_set_x(ui_weather_small_label_w2_num, 0);
    lv_obj_set_y(ui_weather_small_label_w2_num, 25);
    lv_obj_set_align(ui_weather_small_label_w2_num, LV_ALIGN_TOP_MID);
    lv_label_set_text(ui_weather_small_label_w2_num, "24km/h");

    ui_weather_small_label_w3_num = ui_label_small_label_create(ui_weather_panel_weather_icons);
    lv_obj_set_x(ui_weather_small_label_w3_num, -30);
    lv_obj_set_y(ui_weather_small_label_w3_num, 25);
    lv_obj_set_align(ui_weather_small_label_w3_num, LV_ALIGN_TOP_RIGHT);
    lv_label_set_text(ui_weather_small_label_w3_num, "18%");

    ui_weather_scrolldots_scrolldots4 = ui_panel_scrolldots_create(ui_screen_weather);
    lv_obj_set_x(ui_weather_scrolldots_scrolldots4, 0);
    lv_obj_set_y(ui_weather_scrolldots_scrolldots4, -8);

    lv_obj_set_width(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D1), 4);
    lv_obj_set_height(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D1), 4);

    lv_obj_set_x(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D2), 10);
    lv_obj_set_y(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D2), 0);

    lv_obj_set_x(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D3), 20);
    lv_obj_set_y(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D3), 0);

    lv_obj_set_x(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D4), 30);
    lv_obj_set_y(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D4), 0);

    lv_obj_set_width(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D5), 8);
    lv_obj_set_height(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D5), 8);
    lv_obj_set_x(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D5), 41);
    lv_obj_set_y(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D5), 0);
    lv_obj_set_style_bg_color(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D5),
                              lv_color_hex(0x101C52), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_comp_get_child(ui_weather_scrolldots_scrolldots4, UI_COMP_PANEL_SCROLLDOTS_PANEL_D5), 255,
                            LV_PART_MAIN | LV_STATE_DEFAULT);



    lv_obj_add_event_cb(ui_screen_weather, ui_event_screen_weather, LV_EVENT_ALL, NULL);

}
